Your agents can code.
Can they survive your environment?
Test changes. Compare outcomes. Keep the evidence.
A coding agent may know the right command and still miss the failure mode in your repository. Hardknock gives it disposable Git environments to rehearse changes, test alternatives, and record what actually happened before a team relies on the lesson.

“Winning once means you found a move. Breaking it five different ways means you started learning it.”
Axolotls regenerate after injury; Murph represents the same ambition: fail safely, test alternatives, and retain validated experience.
Part of the OpenKedge program
Practice creates evidence. Governance decides what to do with it.
Hardknock explores what agents can learn in controlled environments. PCI asks which lessons and claims may become part of a persistent identity. PDDS asks when an agent may change protected state. A Hardknock result does not automatically become accepted memory or execution authority; those decisions require explicit review and integration.
01 · Rehearse
Run a risky coding task away from the production workspace.
02 · Inspect
Compare the failed and alternative paths with recorded checks.
03 · Decide
Review what may be retained or admitted under your own policy.
Skills make agents capable. Lessons make them resilient.
A model may know the standard procedure and still miss the conditions that break it in your environment. Controlled trials expose those conditions.
An agent entering a codebase for the first time has not personally learned:
- •Which migration repeatedly breaks this database
- •Which package upgrade introduces subtle regressions
- •Which strategy works until network latency appears
- •Which warning signs predict an imminent outage
- •Which lesson learned 6 months ago is now obsolete
pnpm install.pnpm-workspace.yaml, npm install introduces conflicting lockfiles. Prefer pnpm under tested conditions.pnpm-workspace.yaml + npm install before execution → warn/replan.7b4c9e1, stdout/stderr, diffs, test exit 1, and paired counterfactual trials.A plausible plan is not a tested plan.
Follow one scripted repository example from failed action to alternative trial. It illustrates the evidence Hardknock aims to record; it is not a live production run. Reflection proposes. Tests challenge.
“Ouch! I ran `npm install` inside this pnpm workspace and broke the build! In Hardknock, this failure becomes an immutable scar, not an outage.”
Explore a sample comparison from starting snapshot 7b4c9e1. The worktrees and outcomes shown here are illustrative.
npm install @openkedge/corepnpm add @openkedge/coreProduction is a terrible classroom.
Live failures are expensive and scarce. Teams try to avoid them rather than repeat them for learning. The Dojo changes the economics through failure amplification without production impact.
Hardknock reconstructs the starting commit, forks isolated Git worktrees, tests competing actions, and discards the trial environments while retaining the records.
Discover the Operating Envelope
This experimental direction asks: “Under what conditions does this agent's learned strategy stop behaving correctly?” Perturbation features are still being developed.
“Hardknock doesn't just teach agents what works. It teaches them where it stops working.”
Your model is replaceable.
Your experience shouldn't be.
A lesson stored with the repository can remain inspectable when an organization changes models or providers. Reuse across agents requires compatible integrations and fresh checks in the new environment.
Hardknock records candidate lessons outside model weights in an inspectable SQLite ledger with environment fingerprints and linked trial records. That gives a team evidence to review before reuse.
“A learning system that cannot unlearn eventually becomes a mythology system.”
Interactive CLI Explorer 💻
Inspect execution records, manage candidate hypotheses, and trace decisions backwards with hardknock why.
Illustrative CLI transcript · no command is run on this page
Executes an agent task in a disposable Reality, verifies required checks, and retries automatically if a validated Lesson is retrieved.
[hardknock] Verified clean starting snapshot: commit 7b4c9e1
[hardknock] Created disposable Reality: worktree/r0-trial-01
[retrieval] Found 1 matching lesson: lesson-402 [COUNTERFACTUALLY_SUPPORTED] (conf: 0.78)
[context] Injected advice via .hardknock/context.md:
"Prefer 'pnpm install' over 'npm install' in this workspace."
[agent: claude-code] Reading advice... Executing: pnpm install @openkedge/sdk
[evaluator] Running required check: ./test.sh
[evaluator] ✅ All 14 tests PASSED (Exit 0).
[hardknock] Task complete. Experience exp-398a linked. Reality discarded.Where Hardknock fits in your agent stack
Compare its role with agent runtimes, tracing platforms, benchmarks, and sandboxes. These tools answer different buyer questions; the matrices show where controlled experience adds value.
Bring a failure mode.
Let an agent test it first.
Start with one repository, one recurring agent mistake, and one check your team trusts. A controlled pilot can show what Hardknock records, what it learns, and what still needs an operator's decision.
Pre-alpha open source. Evaluate the evidence and integration requirements with your own team.