Skip to content

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

Merged
AnthonyRonning merged 2 commits into
masterfrom
codex-permremote-maple
Nov 8, 2026
Merged

AnthonyRonning merged 2 commits into
masterfrom
codex-permremote-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #1500. Permission modes (#1490) shipped without remote parity. A paired computer could answer a remote task's permission requests but couldn't change its mode. Worse, the controller applies the mode picked for a new chat after creating the task. When that mode differed from the remote host's default, the call was refused and the first message never sent.

  • set_session_permission_mode is on the remote wire allowlist, behind a new permission_modes_v1 capability. Like folder browsing, the controller's bridge reads the host's capabilities once per connection and rechecks account and grant before sending.
  • An older host never receives the call, since it would drop an unknown method. The controller refuses it with a coded message the interface translates: "Could not change the mode: Update Maple on the remote computer first." That host's tasks keep their mode, and everything else, including answering permission requests, keeps working.
  • No wire version bump, so a new and an old computer still pair.
  • Mode and web access changes now broadcast SessionUpdated. Every window showing the task follows them, here and on paired computers; before, another window only caught up when something else touched the task.
  • Remote-first is now written down where agents read it. The rule lives in Adding task features in docs/remote-access.md: chat and agent features must work from a paired computer in the same change, and every new remote method needs a capability, a translated refusal for older hosts, and tests of both sides. It names what stays local on purpose: desktop preferences; browser, sign-in, credential and OS-permission flows; and account and host administration. apps/maple-agent/AGENTS.md and the develop-maple-agent skill point to it. permissions.md, remote-security.md and the scenario checklist (new P7) cover modes on a paired computer.

A check of every backend operation against the allowlist found no other task operation missing. The rest are desktop-only by design: settings, sidebar, account, billing, sign-in, speech, the model catalog, and integration setup that opens macOS permission prompts.

Compatibility

Execution computer Change a remote task's mode Answer its permission requests
This version Works Works
0.0.19 (modes, no capability) Refused on the controller, asks for an update Works
0.0.18 and earlier (no modes) Refused on the controller, asks for an update Nothing to answer

A new task started on an older host opens in that host's mode, with the message kept in the composer and a note to update. It does not send in a mode the user didn't see; sending again runs it in the mode the chip now shows. A 0.0.19 controller against a new host behaves as it does today: it refuses the change locally.

Testing

  • just ci-lint and just ci-test pass on macOS, and the pre-commit hook reran both on the branch rebased onto fix(agent): show why Maple could not start on macOS #1501.
  • New tests:
    • The bridge against a 0.0.19 host never sends the change, refuses it with the coded failure, and keeps sending other task calls and answers.
    • Support the bridge has already cached never replaces the current account and grant: a revoked grant after a successful probe sends nothing.
    • In the chat, the chip goes back on a refusal, and a new task on an older host opens with its message kept. Both say why in English and Spanish.
    • Against a current host, each change goes through after one capability probe, and account and grant are rechecked every time.
    • A failed probe refuses the change as unconfirmed and asks again next time.
    • The host's remote dispatch decodes each mode from the real wire command and reaches the task setter; an unknown mode doesn't.
    • The capability is checked against 0.0.19's exact capability list.
    • Mode and web access changes broadcast SessionUpdated.
    • Both refusals read correctly in English and Spanish.
  • Live, on this Mac: two isolated profiles (separate data roots, device identities and debug bundles) on the Local lane, paired over loopback only, with no public relay, signed in as the Pro test account.
    • A new remote task created from the controller with Read only picked ran pwd and opened in Read only on the execution computer.
    • Changing the mode on either side updated the other window without reopening the task.
    • In Read only, a file write showed the permission card on the controller. Deny from the controller failed the call and no file was written.
    • With master (0.0.19's protocol) as the execution computer, the same paired controller refused the change with the update message. The chip stayed on Read only, and the task stayed connected.
  • An independent review against the remote, daemon and ACP conventions confirmed the wire, capability, host dispatch, event, localization and compatibility handling. Its findings are in the second commit: the remote-first rule's exceptions, a web access broadcast, and the authority and UI tests above.
  • Not run: two physical machines or a relay path, Windows or Linux, or a 0.0.18 host.

🤖 Generated with Claude Code

AnthonyRonning and others added 2 commits November 7, 2026 16:40
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>
…anges

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>
@AnthonyRonning
AnthonyRonning merged commit f353dd0 into master Nov 8, 2026
23 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-permremote-maple branch November 8, 2026 01:11
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.

Agent: allow permission mode changes on remote computers

1 participant