How to hand document reading to a cheap model from Claude Code and Codex
Based on a guide by Ercan Atay on Medium · Nov 30, 2026
You'll end with: Headless, tool-free calls to a small model that read documents and lists for your main Claude Code or Codex agent, which plans and checks.
Why it's worth having: A short task as a headless call used 810 tokens instead of 255,000 as a subagent, and one contract folder question fell from 90,000 to 21,800 tokens.
At a glance
The method, in short
- 1Run the small model headless with no tools, no MCP servers, no settings files, and a one-line system prompt, from an empty folder.
- 2Convert PDF, Word, and Excel files to Markdown locally with markitdown, then send 30,000-token chunks that match your keywords.
- 3Have the small model write long results to a file and return only the path and a short summary to the main model.
- 4Add a Claude Code PreToolUse hook that blocks small-model subagents and points to the headless call instead.
Read the full guide from Ercan Atay on Medium
The article has the exact Claude Code and Codex flags, the hook, the team rollout, and every measured token count.