Skip to content

fix(smith): default headless approval; reject instead of halting (ships in v0.13.4) - #59

Merged
mai1015 merged 2 commits into
mainfrom
fix/smith-headless-approval
Sep 25, 2026
Merged

mai1015 merged 2 commits into
mainfrom
fix/smith-headless-approval

Conversation

@mai1015

@mai1015 mai1015 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Problem

Forge runs Smith headless (-p). With no approval setting on the agent, Forge passed no flag, so Smith used its ask default. A headless ask has no surface, so Smith ends the run at the first gated tool call (status: approval_required) and Forge fails the execution with smith 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_command always passes a complete approval answer:

Agent setting Flag
nothing --approval allow-all (new default)
yolo: true, permission_policy yolo / auto --yolo
permission_policy supervised / plan, or approval: "ask" --approval deny (reject back to the model; run continues)
approval: "deny" / "allow-all" passed through

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
  • Live on the Forge host with Smith v0.2.12 + zai/glm-5.3: --approval deny → shell call rejected ("approval declined: no approval policy configured"), result status: ok; --approval allow-all → command ran.

🤖 Generated with Claude Code

mai1015 and others added 2 commits September 25, 2026 19:26
…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]>
@mai1015 mai1015 changed the title fix(smith): default headless approval; reject instead of halting fix(smith): default headless approval; reject instead of halting (ships in v0.13.4) Sep 25, 2026
@mai1015
mai1015 merged commit 961a470 into main Sep 25, 2026
9 checks passed
@mai1015
mai1015 deleted the fix/smith-headless-approval branch September 25, 2026 23:32
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.

1 participant