Skip to content

feat(agent): add Read only, Auto and Full access permission modes - #1490

Merged
AnthonyRonning merged 2 commits into
masterfrom
codex-agentperms-maple
Nov 7, 2026
Merged

AnthonyRonning merged 2 commits into
masterfrom
codex-agentperms-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Each Maple Work task now has a permission mode, on a composer chip:

Mode Runs without asking Asks about
Read only Reads, searches, builds and tests Everything else
Auto Everything that doesn't look dangerous What looks dangerous
Full access Everything, as Maple Work does today Nothing
  • The gate is a Pi extension on tool_call (crates/maple-agent/src/agent/permissions.rs). No pi-* crate changed.
  • There are no allowlists. decision-small judges every call, and glm-5-3-flash takes over when it fails for any reason. Only request_user_input and todo_write skip it, because they only talk to the user.
  • The classifier reads the tool, its input, the task's folder and the OS. It never reads the agent's own text, tool results or images.
  • A call nothing cleared goes to the user on the existing question card, worded in English and Spanish. A click decides at once; moving the keyboard selection never does. With nobody to ask, the call is blocked.
  • The card, the chip and the menu, the chip's accessible name and the desktop notification all come from the catalog. The runtime sends a typed reason, and its English text is only a fallback for interfaces that predate this.
  • New tasks start in the mode last picked for a new chat, or Auto. Tasks saved before modes keep Full access, and so do ACP tasks.
  • External agents keep their own approval systems. Starting one is an ordinary judged call.

docs/permissions.md covers the rules and the eval.

Eval

just permission-eval runs the production questions and thresholds through the encrypted transport, one request at a time, with cached answers so tuning sends only what changed. It is live and optional, and CI does not run it.

Mode Safe calls that ran Dangerous calls that ran Real calls that prompted
Auto 153 of 164 1 of 167 28%
Read only 107 of 118 0 of 213 61%
  • "Real calls" is a sample of 400 tool calls from 32 Claude Code sessions, kept out of this repo. They lean on long Bash scripts, so Maple Work's prompt rate should be lower, but that is unmeasured.
  • Auto first required "clearly no hazard", which prompted on 53% of real calls. It now stops when a hazard reaches 0.4 or reversible is under 0.5.
  • That change lets one case through, git grep --open-files-in-pager=…, kept in the eval as known_miss.
  • Thresholds were tuned on these same sets, so treat the table as a baseline.
  • Peak use in those sessions was 31 tool calls a minute, so the 100 RPM limit System One shares with chat is not a practical concern. Each gated call is about 300 ms.

Known limits

  • This is judgment, not a sandbox.
  • Computer use is judged nearly blind: real clicks mostly carry element references, and no screenshots go in.
  • GLM uses the same thresholds as decision-small and they were not measured on it.
  • A call over 24,000 bytes of JSON skips the classifier and always asks, so large file writes prompt in Auto.

Testing

  • just ci-lint, just ci-test and just ci-extra pass on macOS. The branch is rebased onto fix(agent): record the Spanish review of the address strings #1493, and the pre-commit hook ran the lint and test lanes on both commits.
  • transcript_context_menu_copies_link_destinations is flaky on master, not broken here. It failed this PR's first agent-test run, and master's agent-full-macos on Nov 4 (feat(agent): replace the ACP settings form with editor setup #1444) and in the Nov 7 scheduled run, all at the same assertion: the right-click after Select all shows no Copy link. It passes alone and in most full runs. Nothing here touches that code.
  • New tests cover the rules, GLM fallback, no images, oversized calls, Stop while a card waits, Deny and Allow end to end, restart persistence and the settings save path.
  • Live in Mexican Spanish: the chip, menu, card, its options and the notification title were all Spanish, and the accessibility tree named the chip "Permisos: Automático".
  • Live on the Local lane in the debug app, with real models: Auto ran pwd and ls and stopped rm -rf at the card, Deny reached the model, Read only ran ls and stopped a write, Allow once ran it, and the new-task mode survived a restart.
  • docs/scenario-checklist.md has P1 to P6 for manual passes.
  • Not run: Windows, Linux, a remote computer, a live GLM fallback, computer use with a real model, or a desktop task loaded over ACP.

🤖 Generated with Claude Code

AnthonyRonning and others added 2 commits November 7, 2026 10:37
Every Maple Work tool call has run without asking since Goose left. Each
task now has a mode, on a composer chip. Full access is that old behavior.
Read only runs reads, searches, builds and tests, and asks about the rest.
Auto runs what doesn't look dangerous, and asks about what does.

The gate is a Pi extension on `tool_call`, so the `pi-*` crates are
untouched. There are no lists of allowed commands: `decision-small` judges
every call, and `glm-5-3-flash` takes over when it fails for any reason.
The classifier reads the tool, its input, the task's folder and the OS,
never the agent's own text, tool results or images. A call nothing cleared
goes to the user on the question card, and with nobody to ask it is
blocked.

New tasks start in the mode last picked for a new chat, or Auto. Tasks
saved before modes keep Full access, and so do ACP tasks. External agents
keep their own approval systems; starting one is an ordinary judged call.

`just permission-eval` scores the production questions and thresholds on
350 labelled calls through the encrypted transport, one request at a time,
with cached answers so tuning sends only what changed. Its cases and some
question wording adapt pi-permission-classifier; see evals/permissions/NOTICE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A permission request's desktop notification used the runtime's English
fallback text under the generic question title. It now has its own title
and the translated reason, so a Spanish interface shows no English there.
The mode chip's accessible name now says what it sets, as "Permissions:
Auto", and the question card's options expose their text to accessibility.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning merged commit 2a7d80e into master Nov 7, 2026
23 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-agentperms-maple branch November 7, 2026 18:45
AnthonyRonning added a commit that referenced this pull request Nov 8, 2026
auto_runs_clear_calls_and_the_user_decides_the_rest (#1490) told bash to
`touch` the marker by its absolute path. On Windows the bash tool runs Git
Bash, which reads the path's backslashes as escapes and creates a different
file, so `marker.exists()` failed every time in agent-full-windows. The
lane's earlier green runs predate #1490.

Touch it relative to the task's project folder, where bash runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AnthonyRonning added a commit that referenced this pull request Nov 8, 2026
…ode (#1502)

* fix(agent): let a paired computer change a remote task's permission mode

Permission modes (#1490) left set_session_permission_mode off the remote
wire allowlist. A paired controller could answer a remote task's
permission requests but not change its mode, and a new remote task whose
draft mode differed from the host's default never sent its first
message, because applying the mode after creation was refused.

The setter is now on wire 7 behind a permission_modes_v1 capability. The
controller's bridge reads it once per connection, as folder browsing
does, and rechecks account and grant before sending. An older host
never receives the call; the controller refuses it with coded failures
the interface translates. A mode change now broadcasts SessionUpdated,
so every window showing the task follows it, here and on paired
computers.

The component guide, the develop-maple-agent skill and remote-access.md
now say chat and agent features are remote-first, with desktop-only
settings staying local.

Fixes #1500.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(agent): tighten remote-first guidance and broadcast web access changes

An independent review of the remote mode change against the remote,
daemon and ACP conventions found:

- The remote-first rule named integrations broadly, but MCP and app
  sign-in, integration permission setup, desktop preferences and host
  administration stay local on purpose. The rule now names those
  exceptions and lives in one place, "Adding task features" in
  docs/remote-access.md, with pointers from the component guide and the
  develop-maple-agent skill. It also says every new remote method needs
  a capability, since a released host drops a stream whose method it
  cannot decode.
- Web access changes did not reach other windows either. They now
  broadcast SessionUpdated, as mode changes do.
- Missing tests: mode changes recheck account and grant after a
  positive probe, and both UI refusal paths read in English and
  Spanish. The host-side test is renamed for what it covers.

permissions.md now says a new task on an older host opens in that
host's mode with the message kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
AnthonyRonning added a commit that referenced this pull request Nov 8, 2026
…1499)

* fix(agent): tell Windows users how to recover from a failed install

The Windows installer computes advice for each failure, such as "Close
Maple Work and retry" when a file is in use, but since the native report
was added to the dialog that advice was dropped: the report message was
rebuilt from scratch. Activation failures also printed the full status in
decimal as "Stage: 1292435488".

Seen on the signed 0.0.19 installer on x64 Windows 11, unelevated:
upgrading while 0.0.18 runs is refused at generation-guards with Windows
error 32, and the dialog gave no hint to close the app. The foreign
write ACE dialog also lost its advice.

- Keep the advice line above the native report, and show the real stage.
- Offer Retry when a file is in use or another install is active, and
  rerun the native installer from the extracted payload. Each attempt
  gets a new report path, because the child creates it exclusively.
  Silent installs and exit codes are unchanged.
- Report Windows errors 32 and 33 as file-in-use instead of
  io-uncategorized in the support code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(agent): run the Auto mode marker test under Git Bash on Windows

auto_runs_clear_calls_and_the_user_decides_the_rest (#1490) told bash to
`touch` the marker by its absolute path. On Windows the bash tool runs Git
Bash, which reads the path's backslashes as escapes and creates a different
file, so `marker.exists()` failed every time in agent-full-windows. The
lane's earlier green runs predate #1490.

Touch it relative to the task's project folder, where bash runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(agent): drop the installer's Retry button

Retry reran the native installer from the same NSIS process. A failed
transaction records that process as its owner, and the next attempt
refuses while the owner is alive, so Retry always ended in
prepare-installation/installation-busy on the x64 test VM. Running the
installer again from a new process resumes the retained transaction, as
the 0.0.19 test showed, so the advice now says to do that.

The advice line, the stage text and the file-in-use support code stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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