Skip to content

fix: ignore recommended plugin context in thread titles - #734

Open
fscfede-beep wants to merge 1 commit into
openai:mainfrom
fscfede-beep:fix/history-session-title-726
Open

fix: ignore recommended plugin context in thread titles#734
fscfede-beep wants to merge 1 commit into
openai:mainfrom
fscfede-beep:fix/history-session-title-726

Conversation

@fscfede-beep

Copy link
Copy Markdown

Summary

Fixes #726.

Codex Companion task threads are explicitly named from the task prompt. When Claude prepends its injected <recommended_plugins>...</recommended_plugins> context block, that metadata currently becomes the visible Codex history title.

This patch strips only a leading recommended_plugins block before deriving the thread-name excerpt. The task prompt itself is unchanged and still reaches Codex verbatim; only the display-name source is sanitized.

Validation

Windows 11 / Node 26.3.1:

  • test-first reproduction via --prompt-file: RED on upstream/main with thread name Codex Companion Task: <recommended_plugins> Here is a list of plugins. </re...
  • after the patch: Codex Companion Task: Fix the flaky login test
  • targeted naming / resume-last / background runtime: 3 passed, 0 failed
  • node --check plugins/codex/scripts/lib/codex.mjs
  • git diff --check

Fresh collision check immediately before publication found no open PR for #726.

@fscfede-beep
fscfede-beep requested a review from a team September 4, 2026 18:55

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping the sanitisation title-only is the correct boundary: the task prompt still reaches Codex verbatim, so execution context is unchanged. Anchoring at the beginning prevents removing user text later in the prompt, and the non-greedy close-tag match limits stripping to the injected recommended_plugins block. The regression exercises the real task/thread path rather than only the helper. No blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex history shows <recommended_plugins> instead of session titles

2 participants