Skip to content

fix(coding-agent): add opt-in non-interactive denial recovery - #188

Open
MelodyVAR wants to merge 1 commit into
mainfrom
fix/non-interactive-denial-recovery
Open

MelodyVAR wants to merge 1 commit into
mainfrom
fix/non-interactive-denial-recovery

Conversation

@MelodyVAR

@MelodyVAR MelodyVAR commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Without a UI (headless / -p runs), an unapprovable confirmation — a hazardous command such as a recursive force remove, destructive SQL, incomplete shell analysis, or a refused/unconfigured policy — made StepPermissionController.handleToolCall return block+terminate, ending the whole run. In unattended benchmark runs every mandatory-confirmation command became a fatal error for the trial.

Change

Add nonInteractiveDenial: "terminate" | "continue":

  • CLI flag --non-interactive-denial <mode>, env STEP_NON_INTERACTIVE_DENIAL
  • Default terminate keeps current behavior
  • Under continue, the call stays blocked and is reported back to the agent as a failed tool result with recovery guidance, so the agent can take a safer route instead of dying
  • Explicit deny decisions (read-only mode, per-tool deny overrides) still terminate; nothing new is approved

Verification

  • packages/coding-agent: args.test.ts, step-permissions.test.ts, suite/step-command-approval.test.ts — 192 tests pass
  • Full workspace build chain compiles; pre-commit gate (biome + repo checks + tsgo --noEmit) passes
  • Built CLI shows the new flag in --help

Without a UI, an unapprovable confirmation (hazardous command, incomplete
shell analysis, refused or unconfigured policy) returned block+terminate
from StepPermissionController.handleToolCall, ending the whole run. In
unattended benchmark runs this turned every mandatory-confirmation command
(recursive force remove, destructive SQL, unparseable shell) into a fatal
error for the trial.

Add nonInteractiveDenial: "terminate" | "continue" (CLI
--non-interactive-denial, env STEP_NON_INTERACTIVE_DENIAL; default
terminate keeps current behavior). Under continue the call stays blocked
and is reported as a failed tool result with recovery guidance, so the
agent can take a safer route. Explicit deny decisions (read-only mode,
per-tool deny overrides) still terminate; nothing new is approved.
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