WHAT NEW IN X10.29 THU

AI collections from X · 22 collections · 58,925 posts

claudeVIDEO

Claude Code three-model split: isolated worktree tests return a 3-line failure contract

Sonnet 5.5 patches code, Haiku 5.5 runs tests in a detached worktree and returns only a three-line failure summary, Opus 5.5 signs off, with Jev handling the no-thinker forks in milliseconds.

damkin
@damkina7Archived 1 day agoOriginally posted 2026.10.26
damkin @damkina7Originally posted 2026.10.26
Open original on X

THIS IS AN ABSOLUTE F*CKING GOLDMINE Anthropic just shared one of the cleanest tricks for Claude Code The brutal reality: letting AI run test suites in your main session burns 40,000 tokens on raw compiler output, floods your terminal with useless stack traces, and drowns the model in context rot Zero context pollution: run test runners in an ephemeral git worktree, let Haiku 5.5 swallow 4,000 lines of stdout at 340 tok/s, and emit only a 3-line failure contract back to your clean workspace You just launch Claude Code like this: CLAUDE_CODE_SUBAGENT_MODEL=haiku claude --model sonnet --settings '{"isolation":"worktree"}' here's how the workload splits: → Sonnet 5.5 executes code fixes: patches source files, updates types, and synchronizes AST imports in your clean main workspace → Haiku 5.5 runs isolated test suites: executes vitest inside a detached git worktree at 340 tok/s, swallowing 4,000 lines of stdout and returning only a 3-line failure contract → Opus 5.5 architects boundary rules: evaluates whether the failure is an edge regression and signs off on the unified diff before merging → you stop burning Opus context on compiler logs and keep your main session locked under 6k tokens Opus only steps in at three moments: → before the detached worktree sandbox is provisioned → when the isolated test harness turns Green with zero collateral drift → before committing changes to main branch Sonnet builds · Haiku isolates · Opus signs off JEV engineering is the same move one layer down: the forks that need no thinker (which file, which tool, retry or stop) go to JEV in milliseconds, and the big models only see the ones that split the full tree > Sonnet 5.5 runs the main session and coordinates code implementation > detached worktree provisions in .claude/worktrees/ at 0 context cost > Haiku 5.5 runs headless test runners (swallows 4,000 lines of stdout at 340 tok/s) > isolated runner emits a 3-line JSON abstract (assert failure, line number, exit code 1) > Sonnet 5.5 applies surgical code fix to turn test Green > Opus 5.5 on call as architect, reviews synthesized diff before sign-off > JEV routes micro-forks in milliseconds paste the tree and this prompt into Claude Code ↓ "Reconfigure my Claude Code setup around this tree: 1. Run the main session on Sonnet 5.5 with Opus 5.5 as architect and supervisor 2. Set isolation: worktree on test execution so all test suites run inside detached worktrees without polluting main branch 3. Delegate all test runner execution and stack trace triage to Haiku 5.5 subagents at 340 tok/s 4. Restrict all test runner telemetry returned to main session to a concise 3-line JSON contract: failed assertion, exact AST file/line, and exit status 5. Keep main session context under 6k tokens. Reserve Opus 5.5 for final diff verification and pre-commit sign-off Show me every change as a diff first. No edits until I say go" ↳ http://code.claude.com/docs/en/worktrees bookmark this, your context window will never drown in test logs again ↓

This post quotes another post: x.com/damkina7/status/2107924159397560795

x.com/damkina7/status/2114703673435554270Archived 2026.10.27 09:59