The Claude Code Harness Now Ships as CrewAI Config Flags
An open-source framework hands you most of what makes Claude Code work — the flag-by-flag map, plus the three layers no framework builds.
What Changed
The failure mode that makes a harness matter has a name: context rot — the original objective crowded out as tool outputs fill the window. A bare ~30-line loop hits it fast: it opens the wrong files, loses the goal midway, and floods context with junk. The same model inside a real harness finishes clean. CrewAI fights rot two ways — planning supplies a persistent roadmap, and subagents isolate context and return only summaries.
Under the Hood
The mapping from Claude Code's harness to CrewAI is nearly flag-for-flag:
kickoff()runs the agent loop, model-agnostic — no hand-rolled while-loop.planning=Truegenerates a pre-execution roadmap (default gpt-4o-mini, swappable — an OpenAI model as the default planner inside an Anthropic-centric stack).reasoning=True+max_reasoning_attemptsfor per-agent reasoning.- Hierarchical process for manager→specialist delegation — but
allow_delegationis OFF by default, an easy miss. E2BExecTool/E2BPythonToolspin a fresh VM per session;memory=Truefor cross-run facts;JsonProvider/SqliteProviderfor checkpointing.
Safety is architectural, not prompted: a permission layer plus a per-session sandbox means even an approved command can't touch the host.
In Your Stack
Three things no framework builds: your prompts (role/goal/backstory), the execution environment, and per-agent tool selection. That's where the unavoidable iteration lives. Bound it with the eval methodology: a BankAccount class with 2 real bugs and 5 tests (3 failing), fix-implementation-only, went from 3-failing to all-5-passing — a reproducible harness benchmark you can drop onto your own repos. Watch the cost curve: planning, subagents, and looping each add API calls, so on simple tasks a complex harness can cost more than a single model call. And some scaffolding is transient — Anthropic dropped context resets once Opus 4.5 replaced Sonnet 4.5. Keep every layer flag-gated so you can retire it as models improve.
The model is the commodity you rent; the harness is the product you build — and 80% of it now ships as flags you flip, not code you write.
What to do
Prototype the four-agent hierarchical pattern (Explorer/Engineer/Test Runner + manager) in CrewAI against one real repo with a fixed failing-test suite as the eval, and instrument token/API cost per task against a single-call baseline
Stand up E2B per-session sandboxing (E2BExecTool/E2BPythonTool) before granting any agent shell or code-execution access
Keep every scaffolding layer (planning, reasoning, context resets) flag-gated so it can be disabled as you upgrade models