Repository navigation
Fix claude shim conflicting with --resume and --continue - #78
Conversation
The shim always injected --session-id with a fresh UUID, which broke `claude --resume <id>` and `claude --continue` by conflicting with the user's session flag. Now scans args and skips injection when the user already specifies a session/resume flag. Also passes through subcommands (mcp, config, api-key) without injecting hooks or session flags since they don't support them.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Preview Videos and ScreenshotsOpen Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap Screenshot capture was skipped.
Generated by manaflow preview system |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07f44954f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case "${1:-}" in | ||
| mcp|config|api-key) exec "$REAL_CLAUDE" "$@" ;; |
There was a problem hiding this comment.
Unset CLAUDECODE before subcommand passthrough
The new early passthrough for mcp|config|api-key executes claude before CLAUDECODE is cleared, which bypasses the wrapper’s own nested-session safeguard for these commands. In cmux terminals launched from Claude Code (where CLAUDECODE is set), this can reintroduce nested-session detection specifically for these subcommands, even though other invocations still unset the variable first. Move unset CLAUDECODE above this case so all cmux invocations get consistent environment sanitization.
Useful? React with 👍 / 👎.
…id (manaflow-ai#78) The shim always injected --session-id with a fresh UUID, which broke `claude --resume <id>` and `claude --continue` by conflicting with the user's session flag. Now scans args and skips injection when the user already specifies a session/resume flag. Also passes through subcommands (mcp, config, api-key) without injecting hooks or session flags since they don't support them.
Final review round on the link-under-mouse-reporting fix (codex P2/P3): the report-suppression latched at press but the link-open path re-derived from live modifiers, so releasing ctrl/super before the button swallowed the click, and the latch reset wasn't reached on the link-open early return. ghostty #78 makes linkAtPos use the latched chord and attempts processLinks whenever the click is latched, and clears the latch via a function-level defer. One press-time decision now drives press/drag/release suppression and link opening. Re-pins the ghostty submodule from 59fb750 to 9f014e9 and repoints the prebuilt GhosttyKit release/checksum + docs. 9f014e9 is an ancestor of manaflow-ai/ghostty main once #78 merges. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ex) (#5406) * Bump ghostty to 55d154a: open links on cmd-click under mouse reporting Fixes #5128. Clicking a link inside a fullscreen alternate-screen TUI (Claude Code, Codex) opened the OS default browser instead of honoring the configured cmux link-open target. cmux's GHOSTTY_ACTION_OPEN_URL handler is already mode-independent (resolveTerminalOpenURLTarget routes per BrowserAvailabilitySettings, no mouse-mode branch); the gap was in ghostty core, where link hover state was refreshed only when mouse reporting was off or shift released capture, so a Cmd-click under a mouse-grabbing TUI never fired open_url. Bumps the ghostty submodule to 55d154a (previous pin 176bd55 + the two link-fix commits from manaflow-ai/ghostty#71, merged into fork main). The fix also evaluates links locally when the ctrl/super link modifier is held, using the effective mouse-reporting state, matching iTerm2 and macOS Terminal. Publishes and pins the matching GhosttyKit xcframework (xcframework-55d154a...-crashsubdir-cmux-crash-v1) and updates docs/ghostty-fork.md. No cmux Swift change is required (no cmux-only gap), so there are no new user-facing strings to localize. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Re-pin ghostty to d1dbbec: suppress half-click leak on cmd-clicked links Addresses codex/greptile review of the link fix: under mouse reporting a Cmd-click over a link still leaked a half-click to the program because mouseButtonCallback reported the press (link-open runs only on release). The ghostty follow-up (manaflow-ai/ghostty#74) suppresses the whole click — press and release — whenever the ctrl/super link chord is held, keyed on the modifier like the existing shift-release path so cursor jitter can't leak a press or a release. Eliminates the half-click in both directions. Re-pins the ghostty submodule from 55d154a to d1dbbec, repoints the prebuilt GhosttyKit release/checksum, and updates docs/ghostty-fork.md. d1dbbec is an ancestor of manaflow-ai/ghostty main (PR #71 and #74 merged). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Re-pin ghostty to 76ead3e: full click+drag suppression for cmd-clicked links Final review iteration (codex P2). After #74 suppressed the press/release of a ctrl/super-chord link click, cursorPosCallback could still emit .motion reports during a Cmd-held drag (click_state == .press), leaking button-motion to a mouse-grabbing program. ghostty #75 mirrors the shift "grab override" for the ctrl/super chord in the motion path, so the link chord now suppresses the whole click+drag — press, release, and motion — consistently. Re-pins the ghostty submodule from d1dbbec to 76ead3e and repoints the prebuilt GhosttyKit release/checksum + docs. 76ead3e is an ancestor of manaflow-ai/ghostty main (PR #71, #74, #75 merged). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Re-pin ghostty to f241952: scope link suppression + clear stale hover Final review iteration (codex P2 x2). After #74/#75 suppressed the whole click+ drag for the ctrl/super link chord, two edges remained: the suppression fired for any button (swallowing ctrl/super right/middle clicks instead of delivering them to the program), and a stale link highlight/cursor could persist when the chord was released through cursorPosCallback's mods. ghostty #76 scopes the suppression to the left button and clears the hover by refreshing when over_link is set (mirroring keyCallback's existing reset branch). Re-pins the ghostty submodule from 76ead3e to f241952 and repoints the prebuilt GhosttyKit release/checksum + docs. f241952 is an ancestor of manaflow-ai/ghostty main (PR #71, #74, #75, #76 merged). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Re-pin ghostty to 59fb750: clear link-click latch unconditionally Addresses the final review round on the link-under-mouse-reporting fix: - codex P2: the suppression re-checked live modifiers, so releasing ctrl/super before the mouse button could leak the release. ghostty #77 latches the decision at left-button press (mouse.link_click_active) and applies it through the release. - greptile P2: the latch was cleared only inside the mouse-reporting block, so toggling reporting off mid-click could leave it stale; it is now cleared unconditionally on left release. Re-pins the ghostty submodule from f241952 to 59fb750 and repoints the prebuilt GhosttyKit release/checksum + docs. 59fb750 is an ancestor of manaflow-ai/ghostty main once #77 merges. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Re-pin ghostty to 9f014e9: unify link-click suppression and open Final review round on the link-under-mouse-reporting fix (codex P2/P3): the report-suppression latched at press but the link-open path re-derived from live modifiers, so releasing ctrl/super before the button swallowed the click, and the latch reset wasn't reached on the link-open early return. ghostty #78 makes linkAtPos use the latched chord and attempts processLinks whenever the click is latched, and clears the latch via a function-level defer. One press-time decision now drives press/drag/release suppression and link opening. Re-pins the ghostty submodule from 59fb750 to 9f014e9 and repoints the prebuilt GhosttyKit release/checksum + docs. 9f014e9 is an ancestor of manaflow-ai/ghostty main once #78 merges. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Re-pin ghostty to df789cd: only open latched link clicks that started on a link Final review round (codex): the latched link-open path opened the link under the release cursor for any in-flight ctrl/super click, so a chord drag that started off a link and released over one opened that link (its press was suppressed). ghostty #79 captures whether the press was over a link (link_press_over_link) and only opens via the latched path when it was, so an off-link-started drag is swallowed rather than opening a link it merely released over. Re-pins the ghostty submodule from 9f014e9 to df789cd and repoints the prebuilt GhosttyKit release/checksum + docs. df789cd is an ancestor of manaflow-ai/ghostty main once #79 merges. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: pin merged GhosttyKit artifact * Pin GhosttyKit checksum for merged ghostty 34cbf18 (#5128 + #5458) Pins the SHA256 of the published prebuilt xcframework-34cbf180d8917b802d61d9929cfb493594f2ab52-crashsubdir-cmux-crash-v1 that merges the surface registry serialization (#5458) into the alt-screen Cmd-click link fix (#5128). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Refresh Swift file-length budget for ContentView/SessionIndexView The origin/main merge (sidebar scroll + macOS 27 crash fixes, PR #5670) grew Sources/ContentView.swift to 19161 and Sources/SessionIndexView.swift to 2877, which exceed the inherited budget. Bump only those two entries to match; this is upstream main debt surfaced by the merge, not a change from the ghostty bump. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Summary
--session-idwhen the user passes--resume,--continue/-c, or their own--session-id— these conflict with the shim's auto-generated UUIDmcp,config,api-key) without hooks/session flags since they don't support them--settings) are still injected so sidebar status and notifications work for resumed sessionsTest plan
claude --resume <session-id>resumes correctly inside cmux terminalclaude --continueresumes last session correctlyclaude(no flags) still generates session ID and hooks as beforeclaude mcp listpasses through without injected flags