Skip to content

Modes: manual — execute, but ask before every change - #392

Merged
rromenskyi merged 3 commits into
mainfrom
manual-mode
Oct 20, 2026
Merged

rromenskyi merged 3 commits into
mainfrom
manual-mode

Conversation

@rromenskyi

Copy link
Copy Markdown
Contributor

A third mode next to auto and plan, modelled on Claude Code. Requested by a user.

manual: the agent executes, but every change stops for a yes. That covers any shell command, every file write, append, edit and mkdir, mutating git, sub-agent spawns, and MCP. It asks even where /permissions or an allow rule would let the call through. Reads and searches stay free. An a at a prompt still covers its kind for the session. The deny floor holds in every mode.

How it works:

  • app.manual (an atomic.Bool) plus a small mode type: auto, plan, manual.
  • manualStops hooks into the call gate the risk check already uses (riskGate). Calls the policy would allow without asking (run, and the file write/append/edit/mkdir actions) are asked about. Sub-agents and jobs get the same gate, so they follow manual too.
  • Spawns ask in manual even with spawn.default=allow. Git mutations, MCP and external agents already always asked.
  • A refusal in manual alone reads "denied by user" with no risk-check wording, and a timeout reads "nobody answered".
  • UI: shift+tab cycles auto → plan → manual, so a single press still means plan. /manual sets the mode directly. The /config mode row steps through all three, the indicator shows "✋ manual mode on", and the help text and README are updated.

Tests: cmd/agent/manual_mode_test.go, plus the shift+tab deferral test updated for three modes. A sabotage pass made 12 mutations: manual never stops, run not stopped, mkdir not stopped, reads stopped, risk wording on a manual refusal, spawn ignoring manual, setMode dropping manual, cycle skipping manual, indicator, config row, preview, and shift+tab target. Every one failed a test.

🤖 Generated with Claude Code

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

rromenskyi and others added 3 commits October 19, 2026 19:06
A third mode next to auto and plan, as in Claude Code: the agent works,
but every change stops for a yes — any shell command, every file write,
append, edit and mkdir, mutating git, sub-agent spawns and MCP — even
where /permissions or an allow rule would have let it through. Reads stay
free, an 'a' at a prompt still covers its kind for the session, and the
deny floor holds in every mode.

It rides on the call gate the risk check already uses, so sub-agents and
background jobs follow it too. shift+tab cycles auto → plan → manual (a
single press still means plan), /manual sets it, and the /config mode row
steps through all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A call whose value landed in the action field ("touch x" as run's
  action) was scored, plan-checked and gated as nothing, then recovered
  inside Dispatch and run — manual mode, the risk check and plan mode all
  missed it. Registry.Normalize applies Dispatch's recovery up front, and
  execOne judges the call as it will run.
- The gate reads params as the tools do: a numeric path is a path.
- Accepting a plan ran it in auto even after shift+tab had chosen manual;
  it now keeps manual, and m at PLAN READY runs a plan in manual from auto.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rromenskyi
rromenskyi merged commit 7fbcc4e into main Oct 20, 2026
2 checks passed
@rromenskyi
rromenskyi deleted the manual-mode branch October 20, 2026 01:08
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