CLI cancelling agent when no keyboard input
What version of Codex is running?
0.92.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.2-codex
What platform is your computer?
Darwin 25.2.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
just vanilla macos terminal Version 2.15 (466)
What issue are you seeing?
The CLI is causing the agent processing to be cancelled even though i didn't type in anything or press Escape or intend to cause the agent to stop in any way.
What steps can reproduce the bug?
Uploaded thread: 019c0291-59b3-7ea2-b2a0-2e604863ad24
On my computer, it happens about 50% of the time when i switch from a different window into the macos terminal while the codex agent is running. I think it might be keyboard scroll events? there are some weird characters that get insertted into the terminal when this happens. I see stuff like "› [O[O[O[I[O" often when i switch into the terminal while codex is running.
What is the expected behavior?
Able to switch to and from the Codex window without the agent stopping its work - so I can monitor what its doing without interrupting it.
Additional information
_No response_
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Hmm, that's very strange. We haven't heard of any other reports of this, so I suspect it's something that's unique to your system or configuration. Perhaps you have some extension or app installed on your system that's injecting key events into your terminal session? I think it's unlikely that this is a Codex bug.
<img width="1470" height="956" alt="Image" src="https://github.com/user-attachments/assets/cf78c7c4-ea72-43fa-855d-643fa2b043fa" />
Its only happening in codex for me. No other apps or CLI's having issues or exhibiting this behavior. Not sure how to proceed on diagnosis.
Without a repro, there's not much I can do to help you. You could clone the Codex repo (since it's open source), build it locally, and use Codex to debug the issue for you.
I can easily reproduce the issue, I could show you on a Zoom. For me it seems to be happening predictably after one of the recent updates over the last few weeks.
A zoom call or screen shot won't do much to diagnose the issue.
If you think this is regression, it would be helpful if you could pinpoint the version where it started.
Having a similar issue, but not the one that OP described. For me codex finishes, and then it'll have the input line available to type like normal but I cant type anything. I can't replicate it manually - but it always hapens. On mac OS, using either terminal or alacritty same issue. It doesn't happen on any other CLI.
I have to open a new tab, go through all my prompts again and then continue where it left off