-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
feat(exec): configurable shell override (tools.exec.shell) #49931
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Problem
On Windows, the exec tool hardcodes PowerShell as the shell. There's no config option to override this. For agents that need to run complex shell commands with pipes,
jq, nested quoting, regex, etc., PowerShell's quoting rules make this extremely painful - especially when the command involves JSON processing or nested string literals.WSL is widely available on Windows dev machines and provides a proper bash environment, but the only way to use it today is prefixing every command with
wsl bash -c '...', which still goes through PowerShell's quote mangling before reaching bash. Piping works for simple cases (gh api ... | wsl jq ".field"), but anything with nested quotes in jq filters,select(), or string comparisons breaks.Current workarounds:
.shor.pyscript file for every non-trivial commandwsl jq -f filter.jq(write jq filters to files)pty: true) to get an interactive WSL session and write commands viaprocessAll of these work but add significant friction for what should be one-liners in bash.
Proposal
Add a
tools.exec.shellconfig option that lets users override the default shell for exec tool invocations.Design considerations
safeBinstrust paths like/binand/usr/bin- do those apply inside WSL? How does the allowlist model work when the outer shell is different?.exefiles available).C:\Users\...) but WSL sees/mnt/c/Users/.... Theworkdirparameter would need translation when the shell is WSL-based.bashoverzshon macOS, or selecting betweenpwshand legacypowershellon Windows.Environment