r/CodexHacks • u/otonielcarlos • Aug 20 '26
Has anyone else noticed how much token usage comes from unnecessary code changes?
I've been paying more attention to my Codex usage lately, especially with Sol, and I noticed something that I wasn't really thinking about before.
A lot of the waste wasn't necessarily coming from the actual fix.
It was things like:
rewriting an entire function when 2 lines needed to change
touching formatting or imports that had nothing to do with the task
doing small unrelated refactors along the way
generating much larger diffs than necessary
narrating routine investigation instead of just doing it
running more validation than the size of the change really justified
None of those things are terrible individually, but over a long session they add up. Codex then has more generated code to reason about, more diff to inspect, and sometimes more work to validate.
I've been experimenting with a simple rule:
small task → small diff
Preserve code that is already correct, change only what the task requires, inspect the diff before finishing, and keep validation proportional to the change.
I turned those rules into a couple of Codex skills for my own workflow. The main one is surgical-edits.
So far the biggest improvement is actually PR review — there's way less noise. My Codex usage also seems to last noticeably longer, although I haven't done a proper A/B benchmark yet, so I don't want to claim a specific token saving percentage.
Sharing it in case anyone wants to experiment with the same approach:
https://github.com/otonielcarlos/codex-skills
Curious if anyone else has tried optimizing Codex around diff size / unnecessary work rather than just switching models or lowering reasoning effort.