Disable Ghostty auto shell-integration to fix terminal launch crash (#356)#357
Merged
Conversation
…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.
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.
Summary
shell-integration = nonein Supacode's bundled Ghostty overrides sosetupBashis unreachable and can never prepend--posixto the surface command (which zmx attach rejects, causing the surface to fail to launch with "Ghostty failed to launch the requested command").GhosttyRuntime.bundledOverridesStringso the load-bearing directive is testable.133;Cpin alongside the existing133;Dpin inBlockingScriptRunner's runner-script test so the safety claim the override depends on (blocking scripts self-emit OSC 133 markers, soonCommandFinishedkeeps firing) is enforced.Trade-off
Users who deliberately set
shell-integration = bashin their~/.config/ghostty/configfor 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
make build-app).GhosttyRuntimeBundledOverridesTestspass.WorktreeEnvironmentTestspass with the new133;Cassertion.$SHELL=/bin/bash, terminals open without the "Ghostty failed to launch / --posix" error.onCommandFinishedfires from the script's own OSC 133 emission).Close #356