run-tool: MCP server keeps shell output out of the agent context window, cuts failure tokens 81%
Fine_Mess5501 · reddit · 2026-12-06
The author open-sourced run-tool, a zero-dependency MIT-licensed MCP server (also a Claude Code PreToolUse hook and plain CLI) that stops long shell output from re-entering the agent's context window on every call.
- Passing tests/builds/installs/git pushes return one line; failures return a deterministic error extract (failing tests, compiler errors, stack frames) with line references into the full log on disk—no LLM summary, so no extra model call or invented error text
- Real-session A/B against Claude Code: bash output −14% (session-level gain within noise, honestly disclosed), long failures −81% (eslint 8,571 → 361 tokens); agents already piping through tail gain less
- Setup: claude mcp add run-tool -- run-tool-mcp
More from coding & agent
- pnpm CVE-2026-145650 scores CVSS 10.0: malicious deps can overwrite git hooks via path traversal, fixed in 12.10.0 — evilsocket · 2026-12-06
- New Floridi paper argues LLM capability and safety hinge on the agent harness, not the weights — rvp · 2026-12-06
- Open Artifacts: open-source local-first layer lets any coding agent build editable artifacts — vista8 · 2026-12-06
- Open Artifacts plugin turns a tweet into a narrated explainer video — dotey · 2026-12-06
- Dev builds all-in-one AI Media Composer generating video, music and vocals — wavefnx · 2026-12-06
- Developer's first Rust project: a cute terminal crab mascot named Kiki — aahiknsv · 2026-12-06