Skip to content

Instantly share code, notes, and snippets.

@b-nnett
Created May 16, 2026 06:13
Show Gist options
  • Select an option

  • Save b-nnett/be3c669166b320ea70df5cac36ce13dc to your computer and use it in GitHub Desktop.

Select an option

Save b-nnett/be3c669166b320ea70df5cac36ce13dc to your computer and use it in GitHub Desktop.
Codex log span nesting issue summary

Codex log growth: nested turn spans

codex-tui.log grew to hundreds of GB. The log was not mostly unique data: repeated log events were being written with a huge tracing prefix like:

turn{...}:turn{...}:turn{...}: codex_core_skills::loader: ignoring interface.icon_small...

The repeated warning itself came from plugin skill metadata, mostly Twilio Developer Kit skills and one CodeRabbit skill, using icon paths like ../../assets/logo.svg. The core skill loader rejects those because skill icons must stay under each skill's own assets/ directory.

The storage blow-up was caused by accidental turn-span nesting. Each follow-up turn could inherit the previous turn span, so later log lines carried more and more prior turn metadata. Ordinary warnings/tool-call logs became tens of KB per line.

The fix branch roots task-owned turn spans with parent: None. Logs still include the current turn's useful metadata, but no longer accumulate previous turn spans.

Branch/compare: https://github.com/openai/codex/compare/main...b-nnett:fix-root-turn-spans

Tested with:

cargo fmt --all
cargo test -p codex-core task_span_does_not_inherit_current_span
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment