[codex] Sanitize imported session fallback titles - #29875
Merged
stefanstokic-oai merged 6 commits intoJul 8, 2026
Merged
Conversation
stefanstokic-oai
force-pushed
the
stefanstokic/external-agent-import-title-sanitization
branch
from
July 8, 2026 12:07
bf4b331 to
7638986
Compare
stefanstokic-oai
marked this pull request as ready for review
July 8, 2026 12:19
charlesgong-openai
approved these changes
Jul 8, 2026
stefanstokic-oai
deleted the
stefanstokic/external-agent-import-title-sanitization
branch
July 8, 2026 19:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ide_opened_file,ide_selection,local-command-stdout, andlocal-command-stderrImported sessiononly when every user record is control-onlyWhy
Sessions without an explicit source title fall back to user-message content. Claude metadata can arrive as separate leading user records, so stripping only the first record still exposed raw control markup or produced an unhelpful fallback.
Impact
Imported chats now receive readable fallback titles such as
Fix auth flow, while the original wrapper-bearing messages remain visible in the imported transcript.Validation
just test -p codex-external-agent-sessions— 37 tests passedjust test -p codex-app-server external_agent_config_import_creates_session_rollouts— focused integration test passedjust fix -p codex-external-agent-sessionsjust fix -p codex-app-serverjust bazel-lock-checkjust fmt