When using entire attach the prompt is using the first message in the log, there is…
- User
When using entire attach the prompt is using the first message in the log, there is already The CLI already has exactly the right filter — isInjectedInstructionPrompt in strategy/manual_commit_rewind.go:836 skips <environment_context>-prefixed prompts — but only the rewind/display path uses it, not attach. That's why normal Codex sessions get good titles and only review sessions break. Can you look into fixing this?
Assistant
Now export the filter in the strategy package:
Assistant
Now update the rewind path to use the shared helper:
Assistant
Now add tests. First a strategy-level test for
FirstDisplayPrompt:Assistant
Now the attach-level tests:
Assistant
The shape is correct — so something in my env-context JSON is tripping the unmarshal. Let me test the exact line:
Assistant
Now the full package test suites:
Assistant
All green. Let me review the final diff:
Assistant
Done. The fix is in place and all tests pass (unit, lint, integration).
Root cause
entire attachpicks the checkpoint title from the transcript's first user message in / () — with . For Codex, returns the injected preamble (the first user message) before any genuine prompt, so review sessions got as their title, while normal sessions' first real message happened to be user content.