Repository navigation
Launch Codex inline so its transcript scrolls again (CROW-1319) - #1320
Merged
Merged
Conversation
Codex 0.157.0 made its fullscreen transcript the default: the TUI owns the alternate screen and scrolls only with mouse-wheel events it captures. Codex skips mouse capture when tmux reports `mouse off`, which crow-tmux.conf sets on purpose. Measured on 0.160.1 under the bundled config, the pane sat at alternate_on=1 with mouse_any=0. The web client cannot scroll that state: the CROW-1023 latch caps xterm's scrollback to 0, and #850 never forwards a non-tracking wheel. A long Codex conversation was unreachable, and reload re-attached to the same dead state. Pass `--no-alt-screen` on every Crow launch of Codex: setup.sh, work/job/review first launch and resume, both Manager forms, and the handoff launcher. Inline, Codex writes its transcript into the pane's scrollback (verified clean, including across resizes), so it joins Cursor in ADR 0013's inline-agent class with no client change: unified 50k history, CROW-606 replay on reload, local wheel, Shift+PageUp, and native selection. The flag dates to at least Codex 0.110 and overrides a user's tui.alternate_screen. Documented as an ADR 0013 amendment with the measurements and the rejected alternatives (unsetting TMUX, client-side key forwarding). 🐦⬛ Generated with Claude Code, orchestrated by Crow Co-Authored-By: Claude <[REDACTED_EMAIL]> Crow-Session: C01C5E80-A3EA-4D37-A661-E6E03DED27A9
dgershman
approved these changes
Oct 6, 2026
dgershman
left a comment
Collaborator
There was a problem hiding this comment.
Code & Security Review
Critical Issues
None.
Architecture / Existing Patterns
- Existing pathway: ADR 0013's inline-agent class (the Cursor row:
alternate_on=0, unified 50k scrollback, local wheel). Codex 0.157+ left that class by defaulting to a fullscreen alt-screen transcript that will not mouse-track undercrow-tmux.conf'smouse off. This change puts Codex back in that class by passing--no-alt-screenon every Crow launch, instead of adding a second client scroll path. - The flag is the one constant
OpenAICodexAgent.inlineRenderingFlag, and every Swift launch builds from it: fresh andresume --lastinautoLaunchCommand, both Manager forms inmanagerLaunchCommand, and the handoff path inCodexLauncher.launchCommand.skills/crow-workspace/setup.shandResources/crow-workspace-setup.sh.templateare byte-identical and pass the same flag on the first-launch prompt. Placement matches Codex:resumeflattens the TUI options, so the flag belongs afterresume --last/resume <id>(confirmed on installedcodex-cli 0.141.0, whoseresume --helplists--no-alt-screen). A prompt argv still follows the flag. - Recreate already relaunches managed work/job/review terminals through
autoLaunchCommand(the persisted row storescommand: nil) and rebuilds Manager commands throughmanagerLaunchCommand. The rollout note matches that path.
Security Review
Strengths:
- The new argv is a fixed flag, not user input. Prompt bodies still go through
ShellLaunchArgs.evalPromptLaunch(quoted path,printf %q). Manager resume still sanitizes the conversation id and single-quotes it before the flag.
Concerns:
- None.
Code Quality
- Green —
skills/crow-workspace/setup.shhardcodes--no-alt-screenwhile Swift usesinlineRenderingFlag. Both shell copies match today, andeveryLaunchRendersInlinewalks every Swift kind × prompt × auto-permission combination.scripts/check-workspace-custom-instructions.shpins othersetup.shinvariants withrequirebut does not pin this flag, so a one-sided shell edit would not fail that check. Worth a needle when someone next touches that script; the flag is present on both copies in this diff.
swift test --package-path Packages/CrowCodex: 105 tests passed. bash -n skills/crow-workspace/setup.sh is clean.
Summary Table
| Color | Meaning | Verdict effect |
|---|---|---|
| Red | Must fix | Request changes |
| Yellow | Should fix | Request changes |
| Green | Consider | Approve allowed |
Recommendation: Approve — driven by [0 Red, 0 Yellow, 1 Green] findings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1319
Root cause
Codex 0.157.0 made
tui.fullscreen_transcriptthe default. In that mode the TUI owns the alternate screen and scrolls its transcript only with mouse-wheel events it captures. Codex asks tmux for#{mouse}and skips mouse capture when the answer isoff, whichcrow-tmux.confsets on purpose. It falls back to DECSET 1007 alternate scroll instead, and tmux doesn't pass 1007 to the client.I measured this live against Codex 0.160.1 in an isolated tmux server running the bundled
crow-tmux.conf, with the window optionalternate-screen on, as crowd sets it:alternate_onmouse_anyTMUX/TMUX_PANEunset--no-alt-screenThe default launch is the state behind this report. The transcript can't be reached by wheel or trackpad, and Reload re-attaches to the same state. Codex 0.141 rendered inline (CROW-1001), so the Codex upgrade caused this, not a Crow change.
Fix
Every Crow launch of Codex now passes
--no-alt-screen(OpenAICodexAgent.inlineRenderingFlag):setup.shlaunch_codex, plus its byte-identical templateautoLaunchCommandfor work, job, and review, first launch andresume --last, with and without-a never -s workspace-writemanagerLaunchCommand, both fresh andresume <id>(explore and handoff seeds append their brief after the flag)CodexLauncher.launchCommand, which a handoff to Codex usesInline, Codex writes its transcript into the pane's scrollback, so it lands in ADR 0013's existing inline-agent class with no client change. That class already gives it the unified 50k history, the CROW-606 replay on reload, the local wheel and trackpad scroll, Shift+PageUp, ⌘F search, and native selection. The flag overrides a user's
tui.alternate_screensetting. It exists back to at least Codex 0.110, below Crow's Codex floor, so it needs no version gate.Recorded as an ADR 0013 amendment (#1319) with the measurements and the alternatives I rejected:
TMUX: hides tmux from Codex's keyboard negotiation and from every command Codex spawns.mouse on: tmux would take the wheel into copy-mode for every pane.Verification
crow-tmux.conf, using an isolatedCODEX_HOMEwith a dummy key:alternate_on=1 mouse_any=0.alternate_on=0._CROW_P=…; eval "codex --no-alt-screen $(printf %q …)") pre-fills the composer.resume --last --no-alt-screen -a never -s workspace-writelaunches.swift test --package-path Packages/CrowCodex: 105 pass. New tests:everyLaunchRendersInlinewalks every kind × prompt-dispatched × auto-permission combination plus both Manager forms, and asserts the flag comes before any prompt argv.handoffLaunchCommandRendersInlinecovers the handoff path.LaunchScaffold/WebTerminalAsset(36) pass.check-workspace-custom-instructions.shand all fiveskills/crow-workspace/*_test.shpass.bash -n setup.shis clean.Rollout note
A Codex session that is already running keeps its alt screen until it relaunches. Recreate its terminal: the new window clears the CROW-1023 latch for its index, and the relaunch runs
codex resume … --no-alt-screen, so the conversation is kept. For a Codex primary Manager,crow restart-managerdoes the same.Known gap (pre-existing, not addressed here)
This affects every inline agent, including Cursor today. An in-place agent tab or session switch clears xterm's buffer and calls
select-windowwithreplay: false(CROW-1035). After you switch back, the wheel works, but history older than the current screen returns only on Reload. Fixing that means a history-only replay that doesn't race the live redraw, which the CROW-1035 replay did. It's worth a separate ticket.🤖 Generated with Claude Code