openai / openai/codex

Desktop: auto-title silently falls back to full first prompt when structured JSON title validation fails

Open
#44,502 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug custom-model session
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

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

26.903.61454

What subscription do you have?

Unknown (personal model configuration, see Additional information)

What platform is your computer?

Darwin 25.6.0 arm64 arm (macOS)

What issue are you seeing?

New Desktop threads do not get a concise auto-generated title. The sidebar keeps the user's entire first prompt as the title, e.g. a ~5000-character Chinese handoff summary appears in full in session_index.jsonl as thread_name.

Local log evidence (from logs_2.sqlite, table logs) shows the background title-generation thread does complete successfully, yet its result is never applied:

  • Title task runs on model gpt-5.6-luna with reasoning_effort=low, sandbox_policy=ReadOnly { network_access: false }, turn_trigger="thread_title".
  • Upstream request completes with HTTP 200.
  • The task emits Output item item_type="message" with no tool calls and model_needs_follow_up=false needs_follow_up=false.
  • session_index.jsonl afterwards still contains the full raw first prompt as thread_name.

The turn start options also contain a strict JSON schema:

final_output_json_schema = {
  "type": "object",
  "properties": {
    "title":       {"type": "string", "minLength": 1, "maxLength": 36},
    "description": {"type": "string", "minLength": 1}
  },
  "required": ["title", "description"],
  "additionalProperties": false
}

while the same prompt text instructs the model:

Output the title as plain text with no surrounding quotes or backticks.

These two instructions contradict each other. The observed outcome (a normal plain message is produced but no title is applied and no error is logged) is consistent with the model following the plain-text instruction, the response failing the JSON-schema check, and Codex silently falling back to the raw first prompt.

What steps can reproduce the bug?

  1. Open Codex Desktop and start a new thread.
  2. Paste a long, multi-section Chinese prompt (for example a handoff summary with headings, code fences and file paths; ~5000 characters).
  3. Wait for background title generation to finish.
  4. Check the sidebar / session_index.jsonl: the thread_name is still the full first prompt.

This reproduced 2/2 times today with the same long summary on two different threads. A related failure also occurred with a short prompt containing a commit hash: in that case the title model first ran read-only git show <hash> tools and still no title was applied.

What is the expected behavior?

Either:

  • accept a plain-text title produced by the naming model, or
  • if structured JSON output is strictly required, make the prompt text consistent with the JSON schema, and log a clear reason (schema validation failure / discarded title) instead of silently keeping the raw first prompt.

Additional information

  • I cannot see the raw model response text: helper title threads are not persisted in thread_history_1.sqlite, and the local relay does not log response bodies. The evidence above is from Codex's own logs_2.sqlite.
  • The naming model in this setup (gpt-5.6-luna) is served through a local HTTP relay (127.0.0.1:8787) that returns HTTP 200; the problem is the silent fallback, not an upstream error.
  • Related but not duplicates: #24491 (same symptom on mobile, no root cause), #12163 (malformed/JSON-error-like titles are applied), #29677 (custom title template request), #40223 (title task inherits full agent context/tools).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a long prompt, then inspect logs_2.sqlite and session_index.jsonl around the thread_title task and trace where its output is validated or discarded. Check whether the prompt and final_output_json_schema disagree, and ensure the completed task either applies a valid concise title or records a clear validation-failure reason instead of retaining the full first prompt.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.