mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
## Why Cursor session messages can place `<cursor_commands>` and `<timestamp>` context before the actual `<user_query>`. Treating both external session formats with one parser left that context in the imported message and generated title. ## What changed - Route detected sessions through format-specific Claude and Cursor parsers. - Strip recognized Cursor context wrappers when extracting a trailing `<user_query>`, while preserving messages with unknown leading context. - Keep shared content-block, tool-call, and timestamp parsing in a common module. ## Testing Add parser coverage for wrapped Cursor queries, unknown context, working-directory precedence, Claude metadata, content hashing, and shared tool annotations. GitOrigin-RevId: b49328d46ab4937e3c599588a3d3081e8ab798cd