Skip to content

Disable Ghostty auto shell-integration to fix terminal launch crash (#356)#357

Merged
sbertix merged 1 commit into
mainfrom
sbertix/356-bash-integration-fix
May 25, 2026
Merged

Disable Ghostty auto shell-integration to fix terminal launch crash (#356)#357
sbertix merged 1 commit into
mainfrom
sbertix/356-bash-integration-fix

Conversation

@sbertix
Copy link
Copy Markdown
Collaborator

@sbertix sbertix commented May 25, 2026

Summary

  • Pin shell-integration = none in Supacode's bundled Ghostty overrides so setupBash is unreachable and can never prepend --posix to the surface command (which zmx attach rejects, causing the surface to fail to launch with "Ghostty failed to launch the requested command").
  • Hoist the bundled-overrides heredoc to GhosttyRuntime.bundledOverridesString so the load-bearing directive is testable.
  • Add a 133;C pin alongside the existing 133;D pin in BlockingScriptRunner's runner-script test so the safety claim the override depends on (blocking scripts self-emit OSC 133 markers, so onCommandFinished keeps firing) is enforced.

Trade-off

Users who deliberately set shell-integration = bash in their ~/.config/ghostty/config for OSC 133 markers / cursor-shape hand-off / PATH injection lose those features silently. Acceptable for now since the alternative is a hard crash on terminal launch.

Test plan

  • Build green (make build-app).
  • GhosttyRuntimeBundledOverridesTests pass.
  • WorktreeEnvironmentTests pass with the new 133;C assertion.
  • On a machine with $SHELL=/bin/bash, terminals open without the "Ghostty failed to launch / --posix" error.
  • Blocking scripts (Run / Setup / Test) still mark themselves complete in the tab bar (onCommandFinished fires from the script's own OSC 133 emission).

Close #356

…356)

Ghostty's `setupBash` prepends `--posix` to the surface command when
it decides to inject shell-integration for a bash session. zmx attach
rejects `--posix` as an unknown arg and the surface fails to launch
with "Ghostty failed to launch the requested command". Pinning
`shell-integration = none` in the bundled overrides short-circuits
that code path before it runs, so the wrap reaches zmx unmodified.

Hoist the bundled-overrides heredoc to `GhosttyRuntime.bundledOverridesString`
so the load-bearing directive is pinned by a regression test. Add a
`133;C` assertion alongside the existing `133;D` pin in
`BlockingScriptRunner`'s runner-script test so the safety claim the
override depends on (blocking scripts self-emit OSC 133 markers) is
enforced.

Trade-off: users who deliberately set `shell-integration = bash` for
OSC 133 markers, cursor-shape hand-off, or PATH injection lose those
silently. Acceptable for now since the alternative is a hard crash on
terminal launch.
@sbertix sbertix enabled auto-merge (squash) May 25, 2026 12:02
@tuist
Copy link
Copy Markdown

tuist Bot commented May 25, 2026

🛠️ Tuist Run Report 🛠️

Builds 🔨

Scheme Status Duration Commit
supacode 2m 18s 9f4130692

@sbertix sbertix merged commit f645bbf into main May 25, 2026
2 checks passed
@sbertix sbertix deleted the sbertix/356-bash-integration-fix branch May 25, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminals fail to start on MacOS after 0.10 update

1 participant