fix(developer): run shell tool under bash/sh regardless of login shell#8659
Merged
Conversation
Before, the developer extension's shell tool ran commands under the user's $SHELL when /bin/bash wasn't present. Users with a non-POSIX login shell (fish, csh, tcsh, nu, ...) would then see failures whenever the model emitted common shell idioms like heredoc redirection (`cat <<EOF > file`), since those shells don't support that syntax. Now we always run commands under bash (when it's on PATH) or fall back to sh. GOOSE_SHELL still overrides. The tool description also tells the model which shell it's writing for, so it can tailor syntax (and so GOOSE_SHELL users get the dialect they asked for). Along the way, simplify the shell-selection logic: use `which` to probe for bash instead of hard-coded paths, drop the redundant Flatpak short-circuit (the `flatpak-spawn --host` wrapping is still there), always store shells as basenames so PATH resolution does the work, and factor the Windows/Unix basename handling behind a shared helper. Fixes #7348 Signed-off-by: jh-block <jhugo@block.xyz>
jamadeo
approved these changes
Apr 20, 2026
lifeizhou-ap
added a commit
that referenced
this pull request
Apr 21, 2026
* main: feat(hooks): add Husky git hooks for ui/goose2 (#8577) fix: links in chat could not be opened (#8544) fix: run setup before dev and dev-debug in goose2 justfile (#8718) Manage skills as sources over ACP (#8675) handle full node paths in goose2 kill recipe (#8709) overhaul provider inventory and agent/model selection (#8652) Remove unused import (#8676) delete the goose2 migration plan prompt (#8678) Add health score badge to README (#8677) feat(goose2): voice dictation via direct-ACP pattern (#8609) consistently use actions-rust-lang/setup-rust-toolchain (#8671) fix(developer): run shell tool under bash/sh regardless of login shell (#8659) refactor(providers): extract shared OAuth device-flow helper (#8619) Add a goose2 release workflow (#8629) chore(deps): bump ncipollo/release-action from 1.20.0 to 1.21.0 (#8664) docs: add blog post about Mesh LLM provider option (#8655) fix: append /chat/completions for prefixed v1 base URLs (#8521) Reset ChatGPT Codex auth during OAuth setup (#8569) chore(deps): bump EmbarkStudios/cargo-deny-action from 2.0.15 to 2.0.17 (#8665) Add dependabot config for pnpm workspace, cargo, and actions (#8660)
spikewang
pushed a commit
to spikewang/goose
that referenced
this pull request
Apr 22, 2026
aaif-goose#8659) Signed-off-by: jh-block <jhugo@block.xyz>
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.
Problem
The developer extension's
shelltool previously fell back to the user's$SHELLwhen/bin/bashwasn't present. Users with a non-POSIX login shell (fish, csh, tcsh, nu, ...) would then see failures whenever the model emitted common idioms like heredoc redirection (cat <<EOF > file), which those shells don't support.Fixes #7348.
Fix
bash(when on PATH) orsh;GOOSE_SHELLstill overrides.shelltool description so the model tailors syntax accordingly (andGOOSE_SHELLusers get the dialect they asked for).whichto probe for bash instead of hard-coded paths, drop a redundant Flatpak short-circuit (theflatpak-spawn --hostwrapping is unchanged), store shells as basenames so PATH resolution does the work, and factor Windows/Unix basename handling behind a shared helper.