Skip to content

feat(agents): the owner's phone sends count as the person, and the owner's unattended runs get the browser - #2366

Merged
TheAnimatrix merged 6 commits into
masterfrom
owner-runs-person-browser
Nov 30, 2026
Merged

TheAnimatrix merged 6 commits into
masterfrom
owner-runs-person-browser

Conversation

@TheAnimatrix

Copy link
Copy Markdown
Collaborator

Problem

The owner's own phone and unattended runs were treated like strangers:

  • A message the owner sends from their linked phone did not count as the person. "Always for this thread" rules never answered for it, and it counted as unattended.
  • Schedules, the owner's phone and messages between the owner's own agents got no browser at all, and every turn's browser stopped after 100 calls or 30 minutes.
  • Browser grants were lost on a restart, so a subagent that started after one had no browser.
  • A group chat's agents had to ask Allow before using the chat's browser, although chats only hold the owner's agents.

Change

  • Phone sends are the person. The remote bridge already admits a phone only after verifying it as the same user in the owner's signed roster. That fact is now carried into the run (RunOutcome.sentByOwner), and startedByPerson counts a remote run as the person only when it is set. The source string alone never does. An engine pairing can't reach this send path, and if it did it would not count. Remote turns are no longer unattended (isUnattendedSource, ExecutionPolicyService). Marked agent calls from another computer stay agent calls.
  • Browser for the owner's unattended runs. A browser grant is now rooted by a scheduled run (not a webhook delivery), a verified phone send, and a message one of the owner's agents sent. Webhooks also arrive as schedule runs, so they are told apart by the occurrence in the run's receipt (webhook:<id>, scheduledReceiptIsWebhook). A schedule run whose occurrence can't be read counts as a webhook's.
  • A webhook's restriction carries through its tree. Its subagents, wakes and continuations join nothing. A message its agents send roots nothing either, because that message's chain starts at the webhook's run. A message whose chain this computer can't follow to its start (one from another computer's agent) roots nothing.
  • Grants survive a restart. A run that finds no live grant follows the stored run chain (delegations, wakes, continuations) to its top, and roots the grant again there when that run would root one. A tree whose grant already ended in the same process is not re-rooted.
  • Backend rule unchanged. A tree rooted at the window uses the in-app tabs. Every other root uses the managed browser.
  • No per-turn browser cap. The 100-call and 30-minute budget is gone. Each call still has its own deadline, so a page that never answers does not hold the turn.
  • No browser consent in group chats. The Allow / session grant, its panel and the browser.access.* methods are removed, following feat(browser): thread agents use the sidebar browser without asking, one step at a time, across their own tabs #1858. The Browser panel still opens the tab a thread agent waits for, now through browser.tabRequests.
  • Docs: docs/plans/tool-api.md §1.3 and §2.6, docs/agents-workflows-profiles-browser-architecture.md §10.8, and the glossary's "Browser grant".

How to review

  1. src/mms/platform/browserTreeGrants.ts: who roots a grant (rootOf, chainStartsHere) and the re-rooting after a restart. This is where the risk is.
  2. src/mms/run/approvalRights.ts, RemoteApi.ts, MmsBackend.ts, OrchestratorService.runRemoteTurn, RunEngine (sentByOwner).
  3. BrowserSessionManager.authorize and signal: the cap removal.
  4. The consent removal: MmsBrowserService, registerBrowserMethods.ts, createChatBrowserRuntime.ts, orchestrator/browser/dispatch.ts, BrowserPanel.tsx, ChatWorkspace.tsx.

Kept on purpose

Verification

Tier 5 (auth and permissions, networking). Run on b0aaa5f (master merged in):

What observes each part of the claim:

  • A verified phone send holds person: tests/net/bridge/remote/remote.test.ts (a real v1 phone send records outcome.sentByOwner), composer.test.ts (an engine caller is not passed on as the owner), orchestratorEngineSafety.test.ts (a remote turn without the fact holds nothing), and the startedByPerson / holdsPerson table in approvalRights.test.ts.
  • Remote turns are attended: agentDefinitions/shellApproval.test.ts.
  • Schedule vs webhook, the phone, agent messages, and the sources that root nothing: the row table in run/browserTreeGrants.test.ts.
  • A webhook's restriction through its subagent and that subagent's message: browserTreeGrants.test.ts.
  • A grant after a restart, and a webhook tree that is not re-rooted: browserTreeGrants.test.ts.
  • No per-turn browser cap: platformBrowserAutomation.test.ts (real Chrome).
  • Group chat agents use the browser without consent: chatResourcesBrowser.test.ts (real Chrome), and the Browser panel still opens a waiting agent's tab through browser.tabRequests: renderer/browserTabActivity.test.ts, renderer/agentBrowserTab.test.ts, platformBrowserDaemonComposition.test.ts.
  • Not checked by hand in the app. Not tested: a real phone send's standing-rule answer end to end (the rule reads the same startedByPerson the table covers).

Notes

Refs #2202

…ner's unattended runs get the browser

A send from the owner's phone holds person once the remote bridge verified the sender in the signed roster (RunOutcome.sentByOwner), and remote turns are no longer unattended. Browser grants are now rooted by scheduled runs (not webhook deliveries), verified phone sends and agent messages, survive a restart by re-rooting from the stored run chain, and a webhook's restriction carries through its tree. The per-turn browser call and time caps and the group chat browser consent are removed.
…rowser

# Conflicts:
#	tests/known-failures.json
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