Thread title generation burn tokens unnecessarily by inheriting full Codex agent context and tools

Open 💬 1 comment Opened Aug 23, 2026 by PLPeeters
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

26.818.41509

What subscription do you have?

Plus

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

Codex Desktop's automatic thread-title generation appears to inherit almost the full normal Codex agent context, causing several thousand unnecessary input tokens for a task that only needs to generate a short title and description.

I captured the actual Responses API request used for title generation. Even for an initial user prompt of simply:

test

the Luna title-generation request includes:

  • the full additional_tools definitions, including exec, exec_command, apply_patch, MCP resource tools, image generation, etc.
  • the normal Codex agent developer prompt
  • the complete available-skills catalogue
  • global/project AGENTS.md
  • filesystem permissions and environment context

Only after all of that is the actual title-generation prompt appended.

The title-generation request consumed:

  • Input: 4.75K
  • Cache write: 0
  • Cache read: 691
  • Reasoning: 0
  • Output: 175
  • Total: 5.62K

While the main thread itself consumed:

  • Input: 11.1K
  • Cache write: 0
  • Cache read: 896
  • Reasoning: 0
  • Output: 65
  • Total: 12.1K

In other words, for a prompt as simple as "test", 30% of the total input tokens and 27% of the total output tokens consumed are just for the title generation. In absolute numbers it's a small volume, but it's still an avoidable one.

What steps can reproduce the bug?

  1. Setup a local proxy such as @liqngliz/tokenflow.
  2. Start a new conversation in Codex Desktop.
  3. Use a trivial initial prompt such as test.
  4. Locate the captured gpt-5.6-luna request containing the instruction to generate a short UI title.
  5. Inspect its input array.

The title-generation request contains the normal Codex developer instructions, tool definitions, skills, repository instructions, and environment context before the actual title-generation prompt.

The captured request also has tool_choice: "auto" despite the source prompt being only test.

What is the expected behavior?

Thread-title generation should use a narrowly scoped context containing approximately:

  • the title-generation instructions
  • the initial user prompt, or another small bounded transcript slice
  • the structured output schema
  • optionally, a minimal read-only lookup tool surface when the user prompt contains an opaque resource that genuinely needs resolving

It should not inherit unrelated coding tools, skills, repository instructions, filesystem context, or the normal Codex coding-agent developer prompt.

For a prompt such as test, title generation should require hundreds of input tokens at most rather than several thousand.

Additional information

I have a redacted capture of the complete Responses API request and can provide it if useful.

The request clearly shows that this is a separate Luna call used specifically for title generation, with structured title and description output.

Potentially related issues:

  • #24208

This reports extremely large context being passed to helper-generation tasks and specifically argues that thread-title generation should use a small bounded transcript slice. The observed failure mode there is timeout/reliability rather than the unnecessary baseline context demonstrated here.

  • #32708

This independently documents that automatic title generation runs as a separate ephemeral root thread. That issue concerns telemetry relationships rather than the context supplied to the helper.

This report is specifically about the context used to initialize that title-generation helper: even for a prompt as simple as test, it receives normal Codex agent instructions, tools, skills, repository instructions, and environment context that appear unnecessary for generating the title.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 5 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #39808

Powered by Codex Action