Repository navigation
Add a per-task auto-approve writes option - #245
Open
hongkongkiwi wants to merge 6 commits into
Open
hongkongkiwi wants to merge 6 commits into
hongkongkiwi wants to merge 6 commits into
Conversation
hongkongkiwi
force-pushed
the
auto-approve-writes
branch
3 times, most recently
from
October 31, 2026 11:51
4aacdff to
4a306f0
Compare
hongkongkiwi
added a commit
to hongkongkiwi/pandacode
that referenced
this pull request
Nov 1, 2026
) Frozen failing-first suite from test-author, pinned to schema 37 (upstream main is at 36; 37 belongs to aicodeking#245 if it merges first). The cron.rs seam has todo!() bodies; the suite fails on them until the implementation lands.
hongkongkiwi
force-pushed
the
auto-approve-writes
branch
from
November 1, 2026 04:46
4a306f0 to
fb0d816
Compare
hongkongkiwi
added a commit
to hongkongkiwi/pandacode
that referenced
this pull request
Nov 1, 2026
) Frozen failing-first suite from test-author, pinned to schema 37 (upstream main is at 36; 37 belongs to aicodeking#245 if it merges first). The cron.rs seam has todo!() bodies; the suite fails on them until the implementation lands.
Frozen acceptance suite for the per-task auto_writes flag: gating matrix for the Claude, shared ACP and codex approval paths plus storage schema 35 tests. 7 behavioral tests fail against the seam; 7 guard tests pin today's behavior.
Per-task sessions.auto_writes toggle (schema 35) answered by the approval paths themselves: Claude-family can_use_tool write tools, the ACP generic write kinds (plus DeepSeek's name-matched edits), and codex command/file-change approvals, active in Standard and Accept edits modes only. Reads, questions, escalations and restricted modes keep asking. Warm adoption keys on the flag, mirrors forward it through task.configure, and the Permissions menu gains the toggle for the harnesses whose approvals PandaCode can answer.
A task started on another computer keeps its toggle: remote_start_task sends autoWrites, the mirror stores it on the local row, the host applies it to the session it creates. ACP answers the move kind like the other write kinds, preview forks and worktrees reset the flag like production, the warm key covers the flag in its changed-field test, and the wired test module's header describes it plainly.
hongkongkiwi
force-pushed
the
auto-approve-writes
branch
from
November 1, 2026 05:02
fb0d816 to
e08088a
Compare
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.
What and why
Adds a per-task Auto-approve write requests toggle (issue #200).
The permission modes stop short of their promise: Accept edits only auto-approves file-edit
calls, so commands and other state-changing actions still interrupt, and the approval bar's
Approve all answers only the requests pending at that moment. The only escape was Full access,
which also drops sandbox limits. This adds a graduated option: when the toggle is on and the
task's permission mode is Standard or Accept edits, write-class permission requests are approved
automatically instead of prompting.
Scope, per harness:
can_use_toolrequests for Write, Edit, MultiEdit,NotebookEdit, Bash and TodoWrite are answered without prompting. Reads, questions, MCP tools
and unknown tools keep asking; the allowlist is explicit so sensitive-path reads can never be
waved through.
Antigravity): tool calls of kind edit, delete, execute and move are auto-answered, still
requiring exactly one
allow_onceoption and never answering structured questions. DeepSeek'sedit-by-tool-name fallback is included.
permission escalations and the Approve for me reviewer are untouched.
The toggle never widens a restricted mode: Plan mode still declines writes, Approve for me keeps
reviewing, Full access is unchanged. Harness sandboxes are untouched (this removes prompts, not
guardrails). The flag is stored per task (
sessions.auto_writes, schema 35, default off),follows a task to its host computer (both
task.configureandtask.startcarry it), is partof the warm-process adoption key, and cannot be changed while a run is active, like mode
changes.
Known limitation: cloud-sandbox runs (Run on cloud) do not carry the toggle yet; the cloud task
row and the bridged remote session need their own plumbing. Connect mirrors are covered. Happy
to follow up with that as a separate change.
Also enables the previously unmatched tests/approval-modes.spec.ts in playwright.config.ts
(it targets the exact menu this change extends; its three existing tests pass).
How it was tested
npm run build(typecheck + bundle)npm test(204/205; the one failure is a pre-existing date-format assertion intests/tool-cards.test.mjs, present on main and untouched by this change)
cargo test --locked --manifest-path src-tauri/Cargo.toml --lib(1731 passed, 74 ignored)and
cargo clippy --all-targets -- -D warningscleantests reproduced failing before the fix; approval-modes, provider-settings, grok: 46 passed)
and WebKit (ui: 52 passed, 1 skipped; approval-modes.spec is not in the WebKit config's
testMatch)
The change was developed against a frozen failing-first suite (commit d58a169): the gating
matrix for all three harness paths plus storage schema tests were written and qualified failing
before the implementation, and stayed frozen through review. Three independent review passes
(two model reviewers plus a cross-provider second opinion) produced six findings, all fixed:
the two blockers were the remote task start dropping the flag end to end, and stale menu-count
assertions in tests/ui.spec.ts.
Checklist
<type>: <description>docs/updated if behavior changedsrc/preview.tsfor new IPC commandsFixes #200