SpecAgent: multi-session Claude Code pipeline with measured 3x context cost savings
AdOtherwise9458 · reddit · 2026-11-05
A developer open-sourced SpecAgent, an Apache 2.0 project template for Claude Code targeting large multi-package projects where one context window can't hold the work. Instead of subagents, each role (spec writer, planner, critic, builders, verifier, judge) runs as its own background session with its own context window, worktree, sandbox and transcript; stages advance only when code checks pass, findings require proof, plan-caused issues route back to the planner, and sessions hand off via written notes so a watcher can restart crashed sessions from files.
Measured findings: unrestricted context grew calls to 500-740k tokens at 3x the cost of fresh sessions (now compacting near 197k); after ten calls a session hit 81k tokens with 84% being tool results; prompt caching is byte-exact — keeping a role's prompt prefix identical yields 98% cached input, while changing one byte invalidates everything after it. The template built itself in one run: 22 sessions, 3h12m, one in-run fix, 1,874 tests passing. Repo: github.com/ghvinashvili/specagent
More from coding & agent
- Agent ships hf_dataset() in DuckDB: query Hugging Face datasets with SQL — lhoestq · 2026-11-05
- French search engine ibou launches API to ground LLMs and AI agents in the real web — IgorCarron · 2026-11-05
- YC's Weave raises $13.5M to measure whether AI coding tools actually pay off — ycombinator · 2026-11-05
- Team places 7th of 5,000+ in ARC-AGI-3 Challenge: a good harness beats a bigger model — gklambauer · 2026-11-05
- Intent mobile adds PR views, syntax highlighting and private agent secret requests — LukeW · 2026-11-05
- Codex fixes long-running turn memory leaks, /goal can now run indefinitely — Dimillian · 2026-11-05