Coding agents burn more tokens finding code than changing it — the interface is to blame
Wise_Reflection_8340 · reddit · 2026-10-05
The hidden cost
Coding agents spend most tokens finding code rather than changing it: every search resends the whole context, every file opened along the way stays in the window, and text-based edits fail and retry when old text appears twice or the file changed.
How sem handles it
In sem, an open source tool, the repo is parsed into functions and call graphs. Asking for a function returns its body, callers, callees and covering tests in one response; repeated requests with no changes return a short note. Edits target functions by name and are version-checked so stale edits fail cleanly; after a change only tests that can reach it run first.
Results and limits
- Biggest gains on large, hard-to-navigate repos with slow tests; modest on small tasks
- Moving code is still slow (models rewrite functions instead of relocating them) — next fix
- References SWE-agent on agent interfaces and "Lost in the Middle" on irrelevant context
Open source: sem
More from coding & agent
- Amazon (2B) and Cloudflare (9B/27B) ship open-source decision models rivaling Jev — mark_k · 2026-10-05
- Autonomous agents only pay off where value justifies engineer escalation, dev argues — Pavel_Asparagus · 2026-10-05
- Users report agents like Codex feel noticeably slower than three months ago — koltregaskes · 2026-10-05
- Building After Effects motion graphics engines with Opus 5.5 — notiansans · 2026-10-05
- Local inference in practice: mining repos, AI chat logs and media libraries with a tiny model — natesiggard · 2026-10-05
- repOx packs 3k-file repos into LLM prompts in ~14ms, stripping 30k-token lockfile waste — Wvdy_CC · 2026-10-05