Thread title is auto-generated with malformed/error-like text (e.g. _invalid correction, Oops invalid JSON? I)

Open 💬 3 comments Opened Feb 18, 2026 by dev-minsoo
💡 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.217.1959 (669)

What subscription do you have?

Pro

What platform is your computer?

Darwin 25.3.0 arm64 arm

What issue are you seeing?

In the thread list, some conversation titles are automatically saved with malformed suffix text that looks like parser/correction output, instead of a clean summary of my prompt.

<img width="442" height="364" alt="Image" src="https://github.com/user-attachments/assets/f08efc56-a840-46b0-ac70-c5c248b917f8" />

What steps can reproduce the bug?

  1. Open Codex desktop app and create a new thread.
  2. Ask Codex to perform a task that may trigger tool/runtime errors (in my case: creating a new skill).
  3. Let the run hit an error-like response (examples I saw: missing dependency message like PyYAML not installed, or a fork/collab-related error during git/fork workflow).
  4. Return to the thread list and check the auto-generated title.
  5. Sometimes the title is corrupted with error/correction-like fragments instead of a clean summary.

It occurs intermittently. My guess is that it tends to happen when an error occurs in the thread.

What is the expected behavior?

Thread title should always be a clean natural-language summary of the conversation, without parser/correction/error-like fragments.

Additional information

_No response_

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 6 months ago

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

  • #11396

Powered by Codex Action

dev-minsoo · 6 months ago

Potentially related to #11396, but my case appears slightly different.

In my case, the issue is intermittent and seems more likely after error/failure messages in the thread (e.g., missing PyYAML dependency message, or fork/collab-related error). When that happens, the thread title is sometimes generated with malformed fragments (for example, }_invalid correction, Oops invalid JSON? I), instead of a clean summary.

If maintainers confirm this is the same root cause as #11396, I can close this as a duplicate.

Astro-Han · 5 months ago

I can confirm a likely host-side root cause for this issue on a newer Codex Desktop build.

Environment

  • Codex Desktop: 26.325.21211 (1255)
  • macOS: 26.3.1 (Darwin 25.3.0 arm64)
  • Subscription: Pro

What I observed

I have multiple local examples where the auto-generated conversation title is saved with garbage suffix text, for example:

  • 梳理可参与议题与PR机会'}]}}]}
  • 修复自动会话命名尾部乱码后缀天地?】
  • 审查微信发布时刻修复差异​】}'}】
  • 查看我提交的PR状态】}】}】}】}
  • 查找 issue-502 诊断文档'}

This is not just a UI rendering problem. The malformed title is already persisted in local session/thread metadata.

Important implementation detail

I inspected the desktop app bundle locally and the thread-title path appears to be:

  • webview calls generate-thread-title
  • main process route generate-thread-title delegates to an internal title generator
  • returned title is then written directly via thread/name/set

The interesting part is that the host-side title generator appears to use structured output, not plain text fallback:

  • model: gpt-5.4-mini
  • reasoning effort: low
  • hidden ephemeral read-only thread
  • output schema is effectively:

``json
{ "title": "<string, 18-36 chars>" }
``

After parsing, the post-processing step only does light cleanup:

  • remove leading title:
  • strip wrapping quotes
  • collapse whitespace
  • strip trailing ., ?, !

It does not sanitize trailing characters like:

  • 】
  • }
  • ]
  • similar malformed suffix fragments

Why this matters

This suggests the bug is probably not "JSON parse failed and raw text was used as fallback".

Instead, the more likely root cause is:

  1. the model returns valid structured JSON
  2. the title field itself already contains malformed suffix text
  3. schema validation only checks length, not title quality
  4. cleanup is too weak to remove these suffixes
  5. the app then persists the bad title directly

Repro timing

In my local logs, thread/name/set happens a few seconds after thread creation, which matches the auto-title generation path rather than later UI mutation.

Expected behavior

Auto-generated thread titles should never persist malformed parser-like or garbage suffix text, even if the model emits odd characters. The host should validate or sanitize titles before saving them.

If useful, I can provide sanitized local log excerpts and more malformed-title examples.