Skip to content

An agent the person asks turns any capability on or off, on any linked computer - #3991

Merged
backnotprop merged 32 commits into
mainfrom
feat/agent-capability-switch
Nov 24, 2026
Merged

backnotprop merged 32 commits into
mainfrom
feat/agent-capability-switch

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #3988, with main merged in (588e2b8, Ship). Its base is main so CI runs. Merge #3988 first. The owner's answers: "Yes, an agent I ask can turn any capability on or off", and then "don't bloat or change the tool as it was for this customer configuration stuff. Don't add any instructions for it. Just add it to the cli help".

What a person sees

When they ask an agent to turn a capability on or off, the agent does it with a command. This works on this computer or on a linked computer. One line from the agent then appears in the thread it works in:

  • "Turned on Routines."
  • "Turned off Board on Studio."
  • For a computer that is away: "Turned off Board on Studio. It applies when Studio is back."

With no thread, the line starts a new thread in the agent's project. It is an Inbox note with no sound. The linked computer also posts its own line, "Claude Code on MacBook turned on Routines." No new UI, gates or confirmations.

For agents

  • The agent tool does not change. plannotator_inbox, the MCP server, their refusals (board_off, steps_off, routines_off), the wakes and the /create-routine skill are as on main. There is no capability action.
  • One difference in the tool, approved by the owner: the routine action has no line in the tool's top description (INBOX_AGENT_ACTIONS_NO_LINE). With the Board, the Checklist and Routines on, that line made the description 2,200 characters, past Claude Code's 2,048, and cut off the --help line. Now 2,039. The action, its fields and its own description are unchanged.
  • The command: plannotator inbox capability [<capability> on|off] [--computer <name>] [--thread <id>]. Capabilities: board, checklist, routines, code_review, chapter_diagrams, bro_mode, float_drafts (System stays hidden, as in Settings). Without on or off, it lists them. Who is calling is what inbox call takes it to be.
  • Where it is documented: only in plannotator inbox --help: a section "When the person asks you to turn a capability on or off", a line in the Commands block, and the Board, Checklist and Routines blocks say they are turned on in Settings → Capabilities or with the command when the person asks.

Routes added

  • GET /api/inbox/capability (?computer=<name>) lists, and POST /api/inbox/capability turns one (packages/server/inbox-capability-agent.ts). The command calls it on this computer's listener. A paired cloud agent's goes through the agent door's route, which names the agent and its project. It is not reachable through a device door.
  • A linked computer's turn uses Routines and capability switches across linked computers #3988's POST capabilities door route through the forward. It is held in the outbox while that computer is away. An older computer is refused with "Update Plannotator on …".

Tool cost

INBOX_TOOL_COST is main's. The routine action is listed only while Routines are on, so the default entry is unchanged: re-measured at 16,141 bytes, the same as main.

Tests

  • Local: inbox-capability-agent.test.ts (list, turn, the line posted once, nothing for a turn that changed nothing, no thread and no project, linked, away, held and refused, older computer, unknown name, hidden System, the route's refusals, a paired agent's turn named by the door), inbox-capability-command.test.ts (parse, unknown name, POST and GET, the answer on stdout, a refusal on stderr, help) and inbox-tool-budget.test.ts (no capability action anywhere in the tool; under 2,048 with every capability on, ending with the help line).
  • CI only: inbox-scheduled-server.test.ts (Routines turned on with the route, one line in the thread, the routine tool listed after), inbox-scheduled-linked.test.ts (an agent on A turns B's Routines off by name, with one line on A), inbox-code-review.test.ts, inbox-help.test.ts, the mod's tests, and the Pi and OpenCode cost jobs.

…y switches

The Routines page lists linked computers' routines with this computer's,
each far row named after its computer, and every action (run, stop, on/off,
edit, delete, restore, preview) goes to the routine's computer through new
machine-only door routes, held in the outbox while it is away. The editor
picks the computer of a new routine and offers that computer's agents and
folders. Settings > Capabilities shows each linked computer's switches.
…computers

# Conflicts:
#	apps/mobile/contract/generated/swift/Wire.swift
#	apps/mobile/contract/parity/ledger.json
#	packages/core/inbox-types.ts
…n a linked computer

The capability tool (and plannotator inbox capability) is listed whatever is
on. It turns a Settings > Capabilities switch through the settings route here,
or through the forward on a linked computer (held while it is away), and posts
one line for the person as the agent. An action a switch serves that the Inbox
does not list now says the switch is off, not to update Plannotator, when the
Inbox has the capability action. The texts that said only the person turns a
capability on now say an agent does when the person asks.
@backnotprop backnotprop added the ci:e2e Run the full browser suite (Inbox window e2e) on this PR label Nov 24, 2026
@backnotprop
backnotprop changed the base branch from feat/routines-across-computers to main November 24, 2026 04:58
…subpath

A new core subpath needs a core release before the UI package publishes, so
the UI package smoke test refused it.
…or not at all, away computers and held writes shown as they are

A held Stop ends only the run it was pressed for. Run once now on a linked
computer is sent at the press or not at all, and says so plainly when that
computer is away. The merged read and the far Capabilities read lay the
person's held writes on that computer's last-known rows and switches, from
the outbox, so a reload keeps them; an away computer's routines claim no run
going and no next run, and say since when it has been away.
…into feat/agent-capability-switch

# Conflicts:
#	docs/agent-guides/inbox-machines.md
#	packages/server/inbox-machines.ts
…s for stale tool lists and away computers

- capability and routine have no line in plannotator_inbox's description, so it stays under Claude Code's
  2,048 with the Board, the Checklist and Routines on (2,039 at most; it was 2,292)
- agents get exactly the switches Settings shows: System is out while its row is hidden, from one constant
  the Settings page uses too
- a turn on, or already on, of a switch that serves an action says the action comes next session and the
  shell form that works now; an action missing from the session's list no longer says the switch is off now
- where Routines are not offered (Windows), a routine call says so instead of naming a switch
- an away computer's last-said switches are said to be so and never answer already on or not offered; a
  held turn it later does not take adds one line; the line lands in the project of the agent's own door
useScheduledOn skipped its store hook once Routines were on here (value || useScheduled()), so turning them on changed the Inbox's hook order and broke the window. It now calls one hook every render: with Routines on here it only watches the store (no read the window did not make before), off it reads so a linked computer's routines can offer the page.
…its own line

The turn's POST capabilities carries capability_note (the agent's name and host) to a computer whose list takes
the mark capability-note. That computer's door takes it besides the switch keys, hands the settings route the
write alone, and once the write applied posts its own Inbox note, no sound, as that agent: "Claude Code on
MacBook turned on Routines.", made from the switch, its way, a cleaned name and its own name for the sender, in
that agent's thread in its home folder project. An older computer gets the write alone.
…es CI checks

Merged main's routine re-reads (#3979: a run under way, a reconnect, the window shown again) into the store with this
branch's linked-computer reads. Resolved by hand: packages/inbox/scheduled/store.ts, packages/core/inbox-types.ts,
packages/server/inbox-machines.ts, packages/server/inbox.ts, tests/e2e/slice-rules.ts, tests/e2e/shard-times.json and
apps/mobile/contract/parity/surface.json; the ledger and Wire.swift taken from main, then the mobile contract regenerated.

- The routines-machines e2e gives each computer the fake claude on its launch PATH and the plugin in its agent home,
  as a sandboxed Inbox needs (as inbox-routine-row-run-ends.spec.ts): without them a Run there never started. The
  fake's turn holds, so the run stays Running.
- The door table test fills a routine's id (sch_1), so the scheduled/:id routes are checked against their own entries.
- The linked test expects the far switches read's own words (held, away, read_at).
- rowRunEnds' stand-in answers the window's read with ?machines=1, as a server does.
- A forward test: Run once now with that computer online goes there at the press, keyed, with the window's mark.
…ith the capability action

The capability action adds 476 bytes to plannotator_inbox; measured on the real Pi and OpenCode 2
requests in CI at 16,178 bytes (18,107 with the Board on). The mod's bundled list now names
capability, so the register test expects it in action's enum.
…cked at B's door

Both Inboxes run in one test process and read one config.json (each is its own process on a real computer), so B's
switch turned on read as A's too. A's switch is held off (options.scheduled), and that the turn went to B, not A's own
settings, is checked in B's door command log. The merged read's computers carry read_at.
…ate; pin it lands once

The run that Run now started on B is still going (the fake agent never ends), so B's row says running whether the routine is on or off. The turn off did land; the test waited for the row's state. It now waits for enabled false. The forward test pins that a held turn off is shown off and running while away, and is taken there once, with the window's mark, across a later reconnect.
…rds in the routines server test

The turn on, and the already on, of Routines on this computer end with the sentence on the routine action in the next session and the shell form now (AGENT-WORDS item D). The linked test waits for the held turn off by the routine's switch, as on the base branch.
…computers

# Conflicts:
#	apps/mobile/contract/generated/swift/Wire.swift
#	apps/mobile/contract/parity/ledger.json
…computers

# Conflicts:
#	apps/mobile/contract/parity/ledger.json
#	docs/agent-guides/server-and-storage.md
#	packages/server/inbox-machines.ts
…into feat/agent-capability-switch

# Conflicts:
#	packages/server/inbox-machines.ts
… the agent tool as on main, the routine action with no line
…nt-capability-switch

# Conflicts:
#	apps/mobile/contract/generated/swift/Wire.swift
#	apps/mobile/contract/parity/ledger.json
#	apps/mobile/contract/parity/surface.json
#	packages/core/inbox-types.ts
#	packages/inbox/inboxUrl.ts
…itch, the route's guards in it

- An Inbox from before the route is answered inbox_needs_update: its unknown-route
  404 not_found here, and through the agent door its route refusing a request it
  does not carry.
- The answer names every switch (capabilities, waiting) as the command takes it
  (routines, checklist, bro_mode), never by its settings key.
- The route refuses another site's page and is not found through a device door
  itself, so both are tested without an Inbox.
- The help says what the result says: an action a capability serves reaches agents
  in their next session, and works from a shell now. plannotator routine --help
  names the command and says to ask the person while Routines are off.
- The Routines store reads again on the next merged list after a failed first read
  of a linked computer's routines, as that list changes nothing.
…rst read of a linked computer's routines read again on the next list

main's onLinkedMachines tells a change only, so the Routines store also hears
each merged list (onLinkedMachinesListed) and reads again while nothing was read.
…o feat/agent-capability-switch

The tool's cost is main's (15,890 / 4,275; Board on 17,819 / 4,864): the routine
line leaves the default entry unchanged.
@backnotprop
backnotprop marked this pull request as ready for review November 24, 2026 15:24
@backnotprop
backnotprop merged commit dc20aff into main Nov 24, 2026
78 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run the full browser suite (Inbox window e2e) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant