mirror of
https://github.com/openai/codex.git
synced 2026-08-25 13:28:55 +00:00
## Summary - sanitize Claude-derived fallback titles without changing explicit custom or generated source titles - recognize known leading control wrappers, including `ide_opened_file`, `ide_selection`, `local-command-stdout`, and `local-command-stderr` - skip separate control-only user records and use the next meaningful user message as the fallback title - use `Imported session` only when every user record is control-only - preserve raw imported messages, previews, and transcript provenance unchanged ## Why 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 passed - `just test -p codex-app-server external_agent_config_import_creates_session_rollouts` — focused integration test passed - `just fix -p codex-external-agent-sessions` - `just fix -p codex-app-server` - `just bazel-lock-check` - `just fmt`