I gave coding agents a map of the codebase.
Asked "what does changing this break?", gpt-5.5 found 97.9% of the affected endpoints with the map, vs 58.8% reading source alone.
And Claude Code and Codex picked it up on their own, 12 out of 12 runs.
It's open source. Here's how it works 👇
One call, the whole chain
On Miniflux (Go), ask who calls Storage.MarkFeedAsRead, and it returns all four ways a request gets there: the REST API, the web UI, the Google Reader and Fever APIs. Each comes with its route, traced down to main().
Why not just grep, or a code graph?
LayerMap resolves calls with each language's own compiler, so calls through interfaces, templates and decorators show up, and one call follows callers up to 8 levels. Other tools shine elsewhere: more languages, refactoring, semantic search.
The experiment, honestly
• 15-request budget: 97.9% vs 58.8% (6 tasks on Miniflux, Polar, Conductor, 3 runs each, graded blind)
• No limit: same accuracy, Claude Code cost −32%, Codex tokens −55%, ~20% slower
Small samples, and I wrote the tasks, so the setup, tasks and limits are all in the public report.
Try it
Claude Code:
/plugin marketplace add coffeecoproject/layermap
/plugin install layermap@layermap
Codex:
codex plugin marketplace add coffeecoproject/layermap
codex plugin add layermap@layermap
DeepSeek Harness:
npx layermap setup dsh
Then ask as usual. Runs locally and sends nothing. TS/JS, Go, Python, Java · macOS & Linux · Apache-2.0
https://t.co/6OIi1IfEFd
Good list. Most of these shrink output; the other leak is exploration, i.e. the agent grepping and reading files to learn who calls what. That's the part I built LayerMap for: local MCP, type-checked call graph for TS/JS, Go, Python, Java. https://t.co/HVFJhDvv0N
if you want to never hit your session limits on Claude/Codex,
bookmark and use these 10 tools.
1 → RTK - https://t.co/rq9QS4NVnf compresses terminal output from commands like git, grep and tests before it reaches your coding agent.
2 → Headroom - https://t.co/QQGWUq176I
compresses tool outputs, logs and other context so agents process less irrelevant information.
3 → Graphify - https://t.co/bK1znBT02f
turns your codebase into a queryable knowledge graph, helping agents find relevant code without repeatedly reading everything.
4 → Context Mode - https://t.co/hJxdd14Cnv
keeps bulky tool outputs out of your main context and preserves useful information locally.
5 → Claude Code usage guide - https://t.co/awqyle4UvM
learn how to manage context with /clear, /compact and /context (I will advise you turn it into a skill)
6 → Aider Repo Map - https://t.co/GQbz0GxKkM
gives your coding agent a compact structural map of your repository instead of dumping entire files into context.
7 → OpenAI Prompt Caching - https://t.co/vQ0OqDdjDG
reduces costs on repeated input tokens when building with supported OpenAI APIs.
8 → OpenAI Compaction - https://t.co/MLDDnELNbH
condenses long API conversations while preserving useful context for the next stage.
9 → ccusage - https://t.co/IUKZaiYEaZ
inspect Claude Code usage and token statistics so you can understand where your usage goes.
10 → LLMLingua - https://t.co/voziEU2wFG
compresses long prompts by removing less important information before sending them to a model.
Agreed, and verification should be scoped to what the change touches. I built LayerMap so the agent's done-check is concrete: it maps the diff through compiler-resolved callers to the routes and existing tests that reach it, then runs those. Open source: https://t.co/HVFJhDvv0N
A coding agent that runs unattended for eight hours isn't automatically better than one that finishes a task in 20 minutes with proper checks.
Autonomy without verification is just a bigger blast radius.
Haiku swarming the repo is cheaper, but it still rediscovers the same call paths every session. I built LayerMap to cache that once: a compiler-resolved call graph over MCP, updated per changed file, so subagents query "who calls X" instead of grepping. https://t.co/HVFJhDvv0N
holy sh*t. Official Anthropic tip for Claude Code: stop burning Opus 5.5 context on tasks Haiku 5.5 can swarm, while Sonnet 5.5 builds
put the architect on call with custom subagents
CLAUDE_CODE_SUBAGENT_MODEL=haiku claude --model sonnet
Sonnet 5.5 drives the primary session on high effort, writing diffs and running test suites
Haiku 5.5 subagents swarm the repo in parallel at 340 tok/s, handling file discovery and spec docs lookup
Opus 5.5 stays on call in ~/.claude/agents/ as the code reviewer, only stepping in at three critical moments:
→ before a plan locks: does the implementation plan miss auth invariants or schema contracts?
→ when a test breaks twice: are we fixing the root cause or falling into a recursive rabbit hole?
→ before calling done: did the full diff introduce hidden regressions or break pre-flight rules?
Opus 5.5 reviews. Sonnet 5.5 builds. Haiku 5.5 swarms
Claude Code subagent architecture runs the identical pattern through isolated contexts: high-volume operations (reading 30 files, grepping AST, running test suites) execute in separate worktrees, so 400k+ tokens stay in subagents while the primary session keeps a pristine 14k context
Plan on high. Delegate on medium. Keep Opus on call.
- the full subagent swarm setup
> Opus 5.5 on call in ~/.claude/agents/code-reviewer.md catches deep architectural traps
> Sonnet 5.5 lead drives edits, writes core logic, and executes test harnesses
> Haiku 5.5 subagents swarm AST parsing, grep scans, and API docs in parallel at 340 tok/s
> isolation: worktree guarantees test runs and scratch edits never pollute your git tree
> isolated context windows shield the primary session from 400k+ tokens of verbose output
paste the setup and this prompt into Claude Code below:
"Configure my Claude Code workspace for hierarchical subagent orchestration:
1. Audit ~/.claude/settings.json and project config for model roles fitting lead, subagents, and reviewer:
> Pin main session model: sonnet with effortLevel: high for primary execution
> Set CLAUDE_CODE_SUBAGENT_MODEL to haiku in settings.json with CLAUDE_CODE_SUBAGENT_MODEL_FORCE to 1
> Pin custom code-reviewer model: opus with effort: high in ~/.claude/agents/code-reviewer.md
2. Create specialized subagent files in ~/.claude/agents/:
> code-reviewer.md: model: opus, tools: Read, Grep, Glob, read-only review of plans and diffs
> explorer.md: model: haiku, tools: Read, Grep, Glob, fast codebase search and AST discovery
> researcher.md: model: haiku, tools: Read, WebFetch, external documentation and specification lookup
3. Configure automatic delegation checkpoints in ~/.claude/CLAUDE.md:
> Invoke @ code-reviewer before finalizing multi-file architecture plans
> Automatically summon @ code-reviewer when the same test or compiler error fails twice
> Enforce @ code-reviewer diff contract audit before declaring tasks complete or staging git commits
4. Constrain subagent scopes:
> Enable isolation: worktree for subagents making edits or running test harnesses
> Return structured summaries only without flooding the main conversation context
Show every configuration diff first. Do not apply edits until confirmed"
↳ https://t.co/eydosabfTa
For "understand a large codebase" I'd add a precomputed symbol/call graph built with the language's own compiler, updated incrementally by file hash, so search isn't just embeddings + grep. I built one (LayerMap, open source) if a reference helps: https://t.co/HVFJhDvv0N
System Design Interview:
Design an AI Coding Agent (like Cursor or Devin)
A user gives the agent a coding task, and it explores the codebase, writes code, and runs tests.
Requirements:
• Understand and search a large codebase
• Break tasks into smaller steps
• Execute code in an isolated sandbox
• Run tests and fix failures automatically
• Stream progress to the user in real time
• Resume tasks after failures or restarts
• Support multiple concurrent coding sessions
How would you design the architecture?
"Evidence over vibes" matters most for the dead-code part. Before deleting, an agent should be able to show zero callers from a type-checked graph, not an empty grep. That's what I built LayerMap to answer (TS/JS, Go, Python, Java, local MCP): https://t.co/HVFJhDvv0N
OpenAI published how their engineers use Codex for maintenance. 5 engineers, part-time, ~2 weeks: 1,400+ PRs merged, 800k+ lines of dead code deleted, median CI from ~10 to 4.5 min.
Worth reading even if you live in Claude Code. My takeaways:
1. Evidence over vibes. The agent checked production telemetry and live feature-flag configs before deleting anything, not just "nothing imports this".
2. One small draft PR per cleanup, with the reasoning attached. Reviewable beats impressive.
3. Explicit "do not modify" rules in audit prompts. Report first, changes later.
4. Try the cheaper config first. A smaller setup found 92% of the findings at 14% of the cost.
5. Revisit your prompts with every new model. What worked last version drifts.
Maintenance was always the job nobody wanted. Turns out it's the perfect job for an agent: boring, verifiable and easy to roll back.
https://t.co/wZHbQ1ygJY
"Who checks what it breaks" is the question I kept hitting, so I built a tool for it: LayerMap reads your uncommitted diff and lists the HTTP routes and existing tests that reach the changed code. Open source, fully local, works in Claude Code & Codex: https://t.co/HVFJhDvv0N
AI can write the code. But who checks what it breaks?
Anyone who's worked on a large codebase knows the real headaches: tracing bugs, understanding unfamiliar code, reviewing changes and keeping costs under control.
That's why these Claude Code tools caught my attention.
Practical solutions to problems developers deal with every day 🛠️
Haiku grep swarms are cheaper, but grep still can't tell you who calls what across an interface. I built LayerMap for that piece: a local MCP that answers "callers of X up to the route" from the compiler's view, so the swarm needn't rebuild it. https://t.co/HVFJhDvv0N
Anthropic's own advice for Claude Code now reads like an org chart: put Sonnet in charge, let Haiku subagents swarm the repo at 340 tokens a second doing file discovery and grep, and keep Opus on call in a markdown file, only summoned when a plan might miss an auth invariant or the same test fails twice in a row. Isolated worktrees keep 400k tokens of discovery noise out of the primary session so it stays at a clean 14k.
That's a good pattern. It's also three separate pieces of config a developer has to wire by hand, in one CLI, pointed at one vendor's models, with no visibility into whether the Haiku subagent actually found the right file before Sonnet started writing the diff.
I built Campfire around the idea that this shouldn't be a single vendor trick. It runs Claude Code, Codex, Goose, Aider, and OpenHands side by side in one browser tab, each agent in its own git worktree so a subagent exploring the codebase can't step on the one writing code. Permission voting across backends means a risky action needs majority approval, or any one agent can veto it, on a 30 second timer, instead of trusting a single model's judgment on when to escalate. Session replay and a cost dashboard show which backend actually earned its keep on a given task, and agent races let you run the identical prompt across Claude, Codex, and Goose in isolated worktrees to see which one gets there first, instead of guessing.
The hierarchy Anthropic is describing is the right instinct. It just shouldn't stop at the edge of one agent's config file.
https://t.co/WwOLZbN45P
https://t.co/UcJ2Wdc7Zb
"Broke something else" is the part worth measuring. Did those 2 break code reachable from the changed function, or something unrelated? I built LayerMap to surface that: it lists routes and existing tests a diff reaches via compiler-resolved callers. Open source: https://t.co/XApZbSIC7T
The scary case is "touched a util, ran its tests" when 3 endpoints call it. Choosing tests from the call graph instead of file names fixes a lot. I built an open-source MCP for that (LayerMap): from the uncommitted diff it walks callers to the affected routes and existing tests. https://t.co/XApZbSJ9Xr
POV: your coding agent decides which tests to run
"Changed https://t.co/mCOK5fdMK7. Running the auth tests, not all 900."
"Touched payments. Full suite. No shortcuts."
"Docs only. Skipping tests."
"Confidence 0.71 on skipping. Below 0.8. Running them anyway."
Fast when it's safe.
Paranoid when it isn't.
That's Jev making the call.
How to build it 👇
This is the exact failure I worry about too. Grep can't tell "no callers" from "couldn't see". I built LayerMap so the agent asks a compiler-resolved call graph instead (TS/JS, Go, Python, Java), which also catches callers via interfaces/aliases grep misses. Open source, local: https://t.co/XApZbSJ9Xr
LayerMap 0.1.19 works across repos.
Start your agent in a folder holding several repos, or let it move to another repo mid-session: each map call now maps the repo its path points to, and every result says which repo it came from.
https://t.co/HVFJhDvv0N
I gave coding agents a map of the codebase.
Asked "what does changing this break?", gpt-5.5 found 97.9% of the affected endpoints with the map, vs 58.8% reading source alone.
And Claude Code and Codex picked it up on their own, 12 out of 12 runs.
It's open source. Here's how it works 👇
One call, the whole chain
On Miniflux (Go), ask who calls Storage.MarkFeedAsRead, and it returns all four ways a request gets there: the REST API, the web UI, the Google Reader and Fever APIs. Each comes with its route, traced down to main().
Why not just grep, or a code graph?
LayerMap resolves calls with each language's own compiler, so calls through interfaces, templates and decorators show up, and one call follows callers up to 8 levels. Other tools shine elsewhere: more languages, refactoring, semantic search.
The experiment, honestly
• 15-request budget: 97.9% vs 58.8% (6 tasks on Miniflux, Polar, Conductor, 3 runs each, graded blind)
• No limit: same accuracy, Claude Code cost −32%, Codex tokens −55%, ~20% slower
Small samples, and I wrote the tasks, so the setup, tasks and limits are all in the public report.
Try it
Claude Code:
/plugin marketplace add coffeecoproject/layermap
/plugin install layermap@layermap
Codex:
codex plugin marketplace add coffeecoproject/layermap
codex plugin add layermap@layermap
DeepSeek Harness:
npx layermap setup dsh
Then ask as usual. Runs locally and sends nothing. TS/JS, Go, Python, Java · macOS & Linux · Apache-2.0
https://t.co/6OIi1IfEFd
LayerMap 0.1.18 starts without a network.
The plugins used to check npm on every start. Offline or behind a flaky proxy, that took over a minute and agents gave up.
Now a version you already have starts right away: 78s → 3s in our offline test.
https://t.co/HVFJhDvv0N
LayerMap 0.1.18 starts without a network.
The plugins used to check npm on every start. Offline or behind a flaky proxy, that took over a minute and agents gave up.
Now a version you already have starts right away: 78s → 3s in our offline test.
https://t.co/HVFJhDvv0N
I gave coding agents a map of the codebase.
Asked "what does changing this break?", gpt-5.5 found 97.9% of the affected endpoints with the map, vs 58.8% reading source alone.
And Claude Code and Codex picked it up on their own, 12 out of 12 runs.
It's open source. Here's how it works 👇
One call, the whole chain
On Miniflux (Go), ask who calls Storage.MarkFeedAsRead, and it returns all four ways a request gets there: the REST API, the web UI, the Google Reader and Fever APIs. Each comes with its route, traced down to main().
Why not just grep, or a code graph?
LayerMap resolves calls with each language's own compiler, so calls through interfaces, templates and decorators show up, and one call follows callers up to 8 levels. Other tools shine elsewhere: more languages, refactoring, semantic search.
The experiment, honestly
• 15-request budget: 97.9% vs 58.8% (6 tasks on Miniflux, Polar, Conductor, 3 runs each, graded blind)
• No limit: same accuracy, Claude Code cost −32%, Codex tokens −55%, ~20% slower
Small samples, and I wrote the tasks, so the setup, tasks and limits are all in the public report.
Try it
Claude Code:
/plugin marketplace add coffeecoproject/layermap
/plugin install layermap@layermap
Codex:
codex plugin marketplace add coffeecoproject/layermap
codex plugin add layermap@layermap
DeepSeek Harness:
npx layermap setup dsh
Then ask as usual. Runs locally and sends nothing. TS/JS, Go, Python, Java · macOS & Linux · Apache-2.0
https://t.co/6OIi1IfEFd
SmartCompact 0.1.4 is out.
Since 0.1.3 it only compacts right after a piece of work is finished, and no longer sets its own token cap. If that moment never comes, native compaction takes over near the limit. Background tasks no longer block it either.
0.1.4: a queued compact is skipped if it's no longer needed.
https://t.co/oZP6dsDjxy
Long AI coding sessions get pricey: every step re-reads the whole chat.
SmartCompact compacts early, at a pause after a commit or passing tests, never mid-task.
60 tasks on Claude: -44% cost, same pass rate.
Free, open source: Claude Code, pi, Codex
https://t.co/rwUXjfYh4e