mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why When a turn ends, recovered question answers are appended to the composer draft. If that draft starts with a shell or slash command, submitting the combined text can interpret it as a command instead of a prompt. ## What changed Escape command prefixes before appending recovered answers so the combined draft stays editable and submits as literal prompt text. Convert shell mode's separate `!` prefix into escaped composer text, and leave slash-prefixed paths such as `/tmp/file` unchanged. Keep prefix escaping and answer recovery in the same Vim undo edit. ## Testing Add regression coverage for immediate and queued submission, whitespace around command prefixes, slash-prefixed paths, and already escaped commands. Extend Vim undo coverage to shell and slash command drafts, including shell mode, and add a snapshot of the recovered shell draft. GitOrigin-RevId: 03c40f72a834a65bf367103cb9170a86dc35ad98