bug: pasting in API key includes stray 'v' character on mac
Resolved 💬 4 comments Opened Oct 31, 2025 by rgodha24 Closed Nov 3, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.53.0
What subscription do you have?
n/a
Which model were you using?
n/a
What platform is your computer?
Darwin 24.6.0 arm64 arm with ghostty
What issue are you seeing?
Command+V to paste in the API key into the Provide your own API key prompt sometimes includes a stray v character at the end of the key.
<img width="454" height="276" alt="Image" src="https://github.com/user-attachments/assets/ba05acd9-5f49-4b12-9cc8-aaaf04fd60da" />
This also happens when sshed into a Linux machine from my mac+ghostty setup.
What steps can reproduce the bug?
- run
codex - run
/logout - copy an api key like
sk-something-super-secret - run
codex, and choose sign in with api key - attempt to paste in the API key, and see the stray
vcharacter appear.
https://github.com/user-attachments/assets/ee1ea44a-e1bd-419e-8d61-33735aca0ba3
This issue does NOT exist on Linux directly, where my paste keybinding is ctrl+shift+v.
What is the expected behavior?
pasting in API keys works as expected.
Additional information
Fixed by #4903
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I haven't been able to repro the problem. I've installed the latest version of ghostty on an Apple Silicon Mac. When I log in with an API Key and paste text, I don't see an extra "v". Is there anything else that needs to be done to repro?
You said above that it _sometimes_ inserts an extra "v". I presume that means it's intermittent. Do you suspect that it's timing related?
I think it's related to the order you release
cmdandv. it happens intermittently if you press thevbutton a little bit after you press thecmdbutton, and release thecmdbutton first. here's a video with the macos built in keyboard showing:https://github.com/user-attachments/assets/e4425b96-f39a-4b2c-95e5-3b334f79460f
Fix is merged. Thanks for the contribution!