Repository navigation
fix(smith): default headless approval; reject instead of halting (ships in v0.13.4) - #59
Merged
Merged
Conversation
…ss run Forge runs Smith with `-p`, so Smith's `ask` approval mode has no surface and ends the run at the first gated tool call with `approval_required`. An agent with no approval setting got exactly that, so every Smith coder execution halted on its first shell command. Forge now always passes a complete answer: `allow-all` when nothing is set (matching the other CLI adapters' unattended defaults), `--yolo` for yolo/auto, and `deny` for supervised/plan or an explicit `ask`, which rejects the gated call back to the model and lets the run continue. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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
Forge runs Smith headless (
-p). With no approval setting on the agent, Forge passed no flag, so Smith used itsaskdefault. A headlessaskhas no surface, so Smith ends the run at the first gated tool call (status: approval_required) and Forge fails the execution withsmith execution halted: {... "requires_authorization": true, "tool": "shell"}. Found live on NK-1 (749064c0): every Smith GLM coder execution died on its first shell command.Change
SmithAdapter::build_commandalways passes a complete approval answer:--approval allow-all(new default)yolo: true,permission_policyyolo / auto--yolopermission_policysupervised / plan, orapproval: "ask"--approval deny(reject back to the model; run continues)approval: "deny"/"allow-all"Breaking (CHANGELOG): unset Smith agents now allow tool calls instead of halting. docs/api.md documents the mapping.
Verification
cargo test -p cli-adapters --lib smith(18 passed, incl. 3 new mapping tests)cargo clippy -p cli-adapters --all-targets -- -D warnings,cargo fmt --all -- --check--approval deny→ shell call rejected ("approval declined: no approval policy configured"), resultstatus: ok;--approval allow-all→ command ran.🤖 Generated with Claude Code