Add copy shortcut to onboarding auth link and device code screens
Resolved 💬 2 comments Opened Mar 25, 2026 by tzarebczan Closed May 10, 2026
Summary
The onboarding auth flow exposes browser-link and device-code screens, but there is no keyboard shortcut to copy the auth link or device code from those screens.
This is awkward in remote/headless setups, where users often need to move the URL or device code to another device manually.
Current behavior
In the onboarding auth flow:
- Continue in browser shows the auth URL, but there is no copy action.
- Device code shows the verification URL and user code, but there is no copy action.
Proposed behavior
Add a c shortcut on both screens:
- On the browser-link screen, c copies the auth URL.
- On the device-code screen, c copies the device user code.
- Show an inline hint such as Press c to copy ....
- Show transient success/failure feedback after the copy attempt.
This should be reflected in both:
- codex-rs/tui
- codex-rs/tui_app_server
Why this seems worth adding
- Improves usability in remote/headless environments.
- Reduces error-prone manual transcription of URLs/codes.
- Fits the existing keyboard-driven TUI interaction model.
- The repo already has clipboard support that can be reused.
Implementation notes
I validated a local implementation that:
- Reuses the existing clipboard text helper.
- Adds the c key handling only when one of these auth screens is active.
- Keeps the change local to onboarding auth rendering/state.
- Adds snapshot coverage for the browser-link screen.
I also mirrored the behavior in both ui and ui_app_server.
Validation performed locally
- cargo test -p codex-tui
- cargo test -p codex-tui-app-server
- just fix -p codex-tui
- just fix -p codex-tui-app-server
- scoped argument-comment lint run for the touched crates
- just fmt
Reference implementation
I have a working branch on my fork in case maintainers want to review or request a PR:
- Branch: copy-auth-prompt
- Compare view: https://github.com/tzarebczan/codex/compare/main...copy-auth-prompt
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗