GeezerVison is showing github.com — fix(server): shells with a backslash in their name no longer get zsh flags on Linux and macOS by only21mil · Pull Request #42648 · pingdotgg/t3code
Conversation
Problem
On Linux and macOS, a file name can contain a literal backslash (\). In apps/server/src/terminal/Manager.ts, basenameForPlatform normalized \ to / on every platform before splitting, so a configured terminal shell (T3CODE_TERMINAL_SHELL) named team\zsh (here a symlink to /bin/dash) had its basename read as zsh. shellCandidateFromCommand then passed zsh-only flags (-o nopromptsp), which dash rejects (Illegal option -o nopromptsp) and exits with code 2, killing the terminal at start.
Change
In apps/server/src/terminal/Manager.ts, I updated basenameForPlatform to split only on / on POSIX while still splitting on both \ and / on win32, removing the intermediate replaceAll normalization. In apps/server/src/terminal/Manager.test.ts, I added three rows to the existing starts bash as a login shell on macOS and Windows table test: darwin and linux entries for /opt/team\zsh expecting no flags (undefined), and a win32 entry for C:/Program Files/Git/bin/bash.exe keeping ["--login", "-i"] to guard Windows forward-slash paths.
Scope
Bug fix for POSIX shell basename detection misreading shell names that contain a literal backslash as zsh. No issue: small fix for an obvious bug.
Verification
Steps (Linux): Create a symlink $probe/team\zsh -> /bin/dash, set T3CODE_TERMINAL_SHELL="$probe/team\zsh", and open a terminal through real TerminalManager and real node-pty (node repro.mjs) on both commits, then write echo ready; exit 0 and record the spawned args, exit code, and output.
Setup: Linux, Node 26.13.1; server-only (+3/-5 prod, +3 test), no UI change, text evidence only.
| Check |
4e6b1fa |
f5557fb |
node repro.mjs (TerminalManager + node-pty) |
args=["-o","nopromptsp"] exit=2 (Illegal option -o nopromptsp) |
args=[] exit=0 ($ ready) |
Manager.test.ts (focused table test with new rows) |
1 failed | 124 skipped (darwin /opt/team\zsh and linux /opt/team\zsh both got [ '-o', 'nopromptsp' ]) |
1 passed | 124 skipped (3x) |
Manager.test.ts (full file) |
— |
125 passed (125) |
Tests (Node 26.13.1): On 4e6b1fa, the focused table test fails on both new POSIX rows (AssertionError: darwin /opt/team\zsh: expected [ '-o', 'nopromptsp' ] to deeply equal undefined and AssertionError: linux /opt/team\zsh: expected [ '-o', 'nopromptsp' ] to deeply equal undefined, 1 failed | 124 skipped). On f5557fb, the focused table test passes three times (1 passed | 124 skipped), all 125 tests in apps/server/src/terminal/Manager.test.ts pass, and vp run check:changed passes (format, lint, knip, graphql, typecheck, and 2 test files / 127 tests).
Runtime repro and test output
# 4e6b1fa — real TerminalManager + node-pty repro
$ git rev-parse HEAD
4e6b1fa7710515cee652370b534e041a372648ea
$ ls -l "$probe/team\\zsh"
$probe/team\zsh -> /bin/dash
$ "$probe/team\\zsh" -o nopromptsp -c 'echo ready'; echo exit=$?
$probe/team\zsh: 0: Illegal option -o nopromptsp
exit=2
$ "$probe/team\\zsh" -c 'echo ready'; echo exit=$?
ready
exit=0
$ node repro.mjs (real TerminalManager + node-pty)
T3CODE_TERMINAL_SHELL="$probe/team\\zsh" -> "linux"
spawn 1: shell="$probe/team\\zsh" args=["-o","nopromptsp"] exit=2
output: "echo ready; exit 0\r\n$probe/team\\zsh: 0: Illegal option -o nopromptsp"
# f5557fb — real TerminalManager + node-pty repro
T3CODE_TERMINAL_SHELL="$probe/team\\zsh" -> "linux"
spawn 1: shell="$probe/team\\zsh" args=[] exit=0
output: "echo ready; exit 0\r\n$ ready"
# 4e6b1fa — apps/server/src/terminal/Manager.test.ts (focused table test with new rows)
FAIL src/terminal/Manager.test.ts > TerminalManager > starts bash as a login shell on macOS and Windows
AssertionError: darwin /opt/team\zsh: expected [ '-o', 'nopromptsp' ] to deeply equal undefined
- Expected:
undefined
+ Received:
[
"-o",
"nopromptsp",
]
FAIL src/terminal/Manager.test.ts > TerminalManager > starts bash as a login shell on macOS and Windows
AssertionError: linux /opt/team\zsh: expected [ '-o', 'nopromptsp' ] to deeply equal undefined
- Expected:
undefined
+ Received:
[
"-o",
"nopromptsp",
]
Test Files 1 failed (1)
Tests 1 failed | 124 skipped (125)
# f5557fb — apps/server/src/terminal/Manager.test.ts (focused table test, 3x runs)
Test Files 1 passed (1)
Tests 1 passed | 124 skipped (125)
Duration 1.89s (import 57%, transform 37%, setup 4%, tests 2%)
Test Files 1 passed (1)
Tests 1 passed | 124 skipped (125)
Duration 1.59s (import 61%, transform 33%, setup 3%, tests 2%)
Test Files 1 passed (1)
Tests 1 passed | 124 skipped (125)
Duration 1.50s (import 60%, transform 33%, setup 4%, tests 3%)
# f5557fb — apps/server/src/terminal/Manager.test.ts (full file)
Test Files 1 passed (1)
Tests 125 passed (125)
Duration 8.32s (tests 83%, import 10%, transform 6%, setup 1%)
# f5557fb — vp run check:changed
check:changed summary
pass format 0.3s
pass lint 0.7s
pass knip 1/2 8.3s
pass knip 2/2 15.8s
pass graphql (apps/server) 0.6s
pass typecheck (3 packages) 11.1s
pass test (2 files) 26.0s
CI also runs: full test suites, build
unused patch check skipped: no dependency files changed
pass not cached: files changed during the run
Not checked: Windows and macOS hosts (Windows and macOS behavior is covered by the unit table only) and a full app session through the UI.
Who tested: An AI agent ran every check.
Generated with Gemini 4 Neon in T3 Code Nightly
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…flags on Linux and macOS
coderabbitai
Bot
commented
Nov 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
The basename parser now uses platform-specific path separators. Shell argument tests cover Windows and POSIX path formats.
Changes: Shell path parsing
| Layer / File(s) |
Summary |
Platform-aware basename parsing and tests apps/server/src/terminal/Manager.ts, apps/server/src/terminal/Manager.test.ts |
basenameForPlatform splits Windows commands on either slash type and POSIX commands on /. It returns the original command if no nonempty path components exist. Tests cover a Windows Bash path with forward slashes and a Linux path containing a backslash. |
Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge, stienswout
Merge Risk: Minimal · up to 4eb64
-
This change stops shell paths with a literal backslash from receiving zsh-specific flags on Linux and macOS. It is small and covered by unit tests, so merge risk is minimal.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: basename detection for shell paths with a literal backslash no longer selects zsh flags on Linux and macOS. It follows the conventional commit style and matches the di… |
| Description check |
 |
The description follows the template sections (Problem, Change, Scope, Verification) and fills each one with specific content. It gives the reproduction steps, the code change, a reason no issue is li… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title names the main change: basename detection for shell paths with a literal backslash no longer selects zsh flags on Linux and macOS. It follows the conventional commit style and matches the diff in basenameForPlatform and the added table-test rows.
Full details: Description check
-
Explanation
The description follows the template sections (Problem, Change, Scope, Verification) and fills each one with specific content. It gives the reproduction steps, the code change, a reason no issue is linked, and detailed verification output with the tests run. It also states what was not checked (Windows and macOS hosts, full UI session) and names the model used. The Scope section does not link an issue, but it explains why none is needed for a small obvious bug, which the template allows. The Verification section contains reproduction results and test outputs. The template's Verification note mentions 'Tests pass' alone is insufficient, and this description goes well beyond that.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between f5557fb and 4eb64f2.
Files selected for processing: 1
-
apps/server/src/terminal/Manager.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Evidence
Linux Chromium, 1280×800, dark theme, fresh synthetic state on both commits. Set T3CODE_TERMINAL_SHELL to a team\zsh symlink targeting /usr/bin/dash, open a seeded thread, toggle the terminal drawer, and attempt printf 'SHELL_READY\n' | tee shell-ready.
The scenario failed on base because the terminal closed and no command executed. It passed on head: SHELL_READY appeared, the output file was created, and the terminal stayed open.
Reproduction scenario
Not shown:
- Native macOS was not run; this comparison proves the Linux reproduction only.
- Windows bash login flags with forward-slash and backslash paths were not exercised.
- The base recording shows the terminal briefly opening and closing, but the transient illegal-option message did not render legibly.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
github-actions Bot
added a commit
to omarcresp/t3code-flake
that referenced
this pull request
Nov 25, 2026
**v0.1.12-nightly.20261125.5230** · 41 changes from 11 contributors
- **Richer workflow questions.** Workflow questions can include described choices, required reasons, links, and records of who answered and when.
- **Thread actions in command palette.** Pin, snooze, settle, archive, and manage the current thread from the command palette.
- **Withdraw workflow questions.** Workflows can withdraw waiting questions without cancelling the run.
- **Antigravity swarm workers.** See Antigravity swarm workers as subagents, including who is working and what they found.
- **Faster thread switching.** Thread timelines now appear in the first frame instead of after a noticeable delay.
- **Browser select menus.** Native dropdown menus now open in streamed browser tabs so you can choose an option.
- **Permanent thread deletion.** Deleting a thread now removes its conversation history instead of only hiding it.
### Plus 32 more bug fixes.
<details>
<summary>Full changelog</summary>
## What's Changed
* fix(cli): exclude spans before the trace summary window by @jadelike-wine in pingdotgg/t3code#42571
* fix(grok): expose context usage by @gujunxiang in pingdotgg/t3code#42568
* fix(web): timeline minimap previews no longer cut an emoji in half by @only21mil in pingdotgg/t3code#42575
* fix(web): Option and Cmd arrows reach full-screen terminal apps by @Mnigos in pingdotgg/t3code#42574
* fix(web): element context preview no longer ends in a split surrogate by @only21mil in pingdotgg/t3code#42585
* fix(server): Antigravity sends undecodable text attachments as a path instead of failing the turn by @juliusmarminge in pingdotgg/t3code#42594
* fix(resource-monitor): Windows stops reading memory and command lines of untracked processes by @juliusmarminge in pingdotgg/t3code#42577
* fix(server): ODT attachments no longer start with text from number styles by @only21mil in pingdotgg/t3code#42592
* feat(server): workflow questions take described choices, required reasons, links, and keep who answered by @juliusmarminge in pingdotgg/t3code#42515
* fix(web): citation comment box stays open when its cited row scrolls out by @juliusmarminge in pingdotgg/t3code#42603
* fix(web,mobile): author avatars keep emoji initials whole by @only21mil in pingdotgg/t3code#42598
* fix(gitlab): incident links are read as issue links by @Michel-Liao in pingdotgg/t3code#42605
* fix(server): workflow schedules given as bigint nanoseconds no longer crash by @only21mil in pingdotgg/t3code#42607
* fix(pi): reject generated text from failed responses by @StiensWout in pingdotgg/t3code#42602
* fix(preview): streamed browser tabs show native select menus by @juliusmarminge in pingdotgg/t3code#31561
* fix(web): long Workflows links no longer end in a broken character by @only21mil in pingdotgg/t3code#42617
* fix(server): filter open device sessions by the selected host by @AppsAtMe in pingdotgg/t3code#42600
* fix(antigravity): link directly to Google account verification on failed turns by @t3dotgg in pingdotgg/t3code#41210
* fix(server): Needs you lists paused runs older than the newest 500 by @KyrosHendrix in pingdotgg/t3code#42618
* feat(server): CI runners don't need telemetry by @t3dotgg in pingdotgg/t3code#42630
* fix: screenshots after a caption render full size instead of as chips by @juliusmarminge in pingdotgg/t3code#42627
* fix(pi): rewind turns after an extension switches sessions by @StiensWout in pingdotgg/t3code#42616
* fix(mobile): Compose without a project opens the picker in one push by @juliusmarminge in pingdotgg/t3code#42593
* fix(web): project name field restores the saved name when cleared by @only21mil in pingdotgg/t3code#42622
* fix(mobile): a share sent while a new-task draft is open joins that draft by @juliusmarminge in pingdotgg/t3code#42597
* fix(telemetry): honor DO_NOT_TRACK by @t3dotgg in pingdotgg/t3code#42629
* fix(server): device host errors no longer cut an emoji in half by @only21mil in pingdotgg/t3code#42628
* fix(pi): let background subagents finish after coordinator errors by @StiensWout in pingdotgg/t3code#42624
* fix(server): deleting a thread actually removes its history by @t3dotgg in pingdotgg/t3code#42119
* fix(server): unreadable sessions no longer block older history by @StiensWout in pingdotgg/t3code#42613
* fix(server): skip incomplete Pi records during project discovery by @StiensWout in pingdotgg/t3code#42636
* fix(server): restore the default provider name when clearing a label by @StiensWout in pingdotgg/t3code#42632
* test(provider-testing): replay workspaces start no background git maintenance by @juliusmarminge in pingdotgg/t3code#42651
* fix(antigravity): /swarm workers show as subagents by @t3dotgg in pingdotgg/t3code#42649
* feat(web): settle, pin, snooze and more for the current thread from cmd+k by @t3dotgg in pingdotgg/t3code#40742
* feat(server): withdraw a waiting workflow question without cancelling its run by @juliusmarminge in pingdotgg/t3code#42506
* fix(web): fade project picker tooltips in place on scroll by @Yash-Singh1 in pingdotgg/t3code#42657
* fix(server): shells with a backslash in their name no longer get zsh flags on Linux and macOS by @only21mil in pingdotgg/t3code#42648
* perf(web): thread switches paint the timeline in their first frame by @juliusmarminge in pingdotgg/t3code#42582
* fix(server): t3_background_wait error says Workflow runs already keep the thread working by @juliusmarminge in pingdotgg/t3code#42661
* fix(server): preserve spaces and tabs in checkpoint LFS storage by @jadelike-wine in pingdotgg/t3code#42634
## New Contributors
* @gujunxiang made their first contribution in pingdotgg/t3code#42568
* @AppsAtMe made their first contribution in pingdotgg/t3code#42600
**Full Changelog**: pingdotgg/t3code@v0.1.12-nightly.20261125.5222...v0.1.12-nightly.20261125.5230
</details>
Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.12-nightly.20261125.5230
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|