Surely compaction is down to the agent rather than the model, so are you comparing Claude Code to Codex CLI?
It's both.
It's both.