Repository navigation
Conversation
rowrow steers many agents from a phone and wants risky actions to wait
for a person, and the agent's questions to reach them, possibly minutes
later. Every session ran YOLO: adapters disabled the runtime's gate and
nothing let a host take a decision.
SessionOptions.approvals ("never" by default, so no host changes) opts a
session into the runtime's own permission gate, routed to the host.
Each approval or question is a toApp request that holds its turn until
Session.answer(requestId, decision) settles it. oar owns no approval
policy: what asks is the runtime's rules. The gate is forced on, never
assumed, and a runtime where oar cannot guarantee it declares so
(SessionCapabilities.approvals: supported, or unsupported with a code).
- An answer is recorded like every control: an `answer` request with the
host's decision, then the toApp request's `answered` response with the
reply exactly as sent, then `accepted`. Refusals carry one code:
unknown_request, already_answered (the first answer stands, so two
devices racing get one accept), withdrawn, runtime_exited, disposed,
unsupported. The kernel keeps the bookkeeping, read off the stream, for
every adapter; an adapter only turns a decision into its native reply.
- What is asked (AppAsk: a tool approval with tool, callId, command,
paths, diff, reason; or questions with options) rides on the toApp
request body beside `native`, as a frame carries `events`, and on the
`app_request` event. `ask.choices` lists the typed decisions (allow,
allow for the session, deny, answer) the runtime is shown to honor; a
`native` decision sends the runtime's own payload for everything else.
- A request never looks pending forever: the runtime withdrawing it is a
new `app_request_withdrawn` event (claude control_cancel_request, codex
serverRequest/resolved for one oar did not answer); ACP's required
`cancelled` answer after session/cancel is recorded like any automatic
one; the exit voids the rest. status() says whom the turn is
`awaiting` beside the phase, stallOf reports no stall meanwhile, and
SessionView's pendingRequests carry the ask and settle on all three.
Per runtime, probed 2026-09-29 (experiments/approval-channels.ts
token-free on aimock; approval-channels-acp.ts on the real login):
- claude 2.1.284: `--permission-mode default --permission-prompt-tool
stdio` instead of --dangerously-skip-permissions. can_use_tool control
requests (AskUserQuestion included) wait: an allow 300 s later ran the
tool. deny's message reaches the model; a deny without one reads as an
invalid result, so oar sends a default. Allow for the session sends
claude's own addRules and addDirectories suggestions at destination
session (the rule alone still asked for a path outside the working
directory), never its setMode. A control_request is now one record,
the toApp request, no longer also a frame.
- codex 0.155.1: approvalPolicy untrusted with approvalsReviewer user on
thread/start and thread/resume, the reply checked (on-request under
oar's danger-full-access sandbox asked for nothing). Command approvals
take accept / acceptForSession / decline though availableDecisions
lists fewer; the answer carries codex's numeric JSON-RPC id back.
requestUserInput and file-change approvals follow the schema
(questions are refused in Default mode).
- kimi 2.0.0: mode `default`; session/request_permission waits, reject
holds; "Approve for this session" is allow for the session.
- grok 1.0.44: not_enforceable. Under a user config permission_mode =
"always-approve", the top-level --permission-mode default, yoloMode
false and GROK_DEFAULT_PERMISSION_MODE all left a command running
unasked, and grok reports no mode in effect.
- pi: no_gate.
scriptedRuntime scripts can approve() and ask(), so hosts test their
approval handling without a binary; the mock runtime asks on the probe
prompt. contracts/records.ts moves the graph and cursor types to
graph.ts (re-exported) to stay under the file-size limit.
Docs: design/approvals.md (the position, decision gates, refusals),
decisions.md, spec/approvals.md (shapes, per-runtime mapping, the
pending lifecycle), record-stream.md, chat-ui.md open question 2
settled, every runtime page with its evidence.
Tests: kernel, fold and view units (tests/approvals.test.ts); adapter
tests against scripted claude, codex and ACP processes; sea-trial
cases/session-approvals.ts (declared-or-refused, typed answer
rejections, a held turn, withdrawal on abort, void on dispose) green on
mock, scripted, claude-aimock, codex-aimock and pi-aimock;
approvals.vendor.test.ts on claude-aimock and codex-aimock.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The vendor approvals test checked the filesystem after `touch <absolute path>`, which Windows breaks two ways: Git Bash mangles the backslashes, and codex's PowerShell has no `touch`. It now runs in a scratch cwd with relative paths and asserts on what the runtime itself reports: claude's tool results (the deny's message is the denied call's output), codex's commandExecution item status (declined, or not). The sea-trial subject takes a `cwd` override for it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A refused answer leaves the turn held, so the vendor test waited out its timeout instead of saying why (Windows, claude). It now aborts the turn and reports the rejection code, opens the vendor trace like the other vendor tests so a red run ships its trajectory, and retries the scratch-dir cleanup Windows briefly holds after the process exits. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uiet CI on windows-latest showed why the session grant was refused there: the runner's temp dir is an 8.3 short path (RUNNER~1), and claude's safety check flags a write through it as "a suspicious Windows path pattern" with suppress_always_allow_rule, so oar rightly offered no allow_session and the grant came back `unsupported`. The scratch dir is now resolved to its long name, the session probe writes outside the cwd again (`touch ../session`) so the addDirectories half of the grant stays pinned, and every session the test opens is disposed before the mock stops, by a watchdog too, so a failed expectation reports itself instead of timing out. The claude runtime page records the safety-check shape. Co-Authored-By: Claude Opus 5.5 <[email protected]>
xxchan
marked this pull request as draft
September 29, 2026 08:11
xxchan
added a commit
to xxchan/rowrow
that referenced
this pull request
Sep 29, 2026
- README: `npx rowrow serve` to try it, `npm install -g rowrow` and the service to keep it. `rowrow service install` refuses to run from npx's cache (npm clears it, and the service would stop working) and says to install it first. - D-022: agents run without permission prompts, in oar and rowrow alike; approvals (botiverse/oar#26) are parked. D-011 points to it; the roadmap and the roamgate comparison say so; rowrow 0.1.0 on npm moves to done. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Holding this for now. oar keeps its default of running agents without permission prompts, and rowrow won't expose approvals either (rowrow D-022), so State when parked:
Before merging:
|
This was referenced Oct 6, 2026
Member
Author
|
Closing per xxchan (2026-10-13): approvals stay parked and OAR keeps running agents without permission prompts. The branch stays; when approvals come back they get a fresh design on current code. |
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.
Why
rowrow steers many agents from a phone and wants risky actions to wait for a person (and the agent's questions to reach them), possibly minutes later. Every oar session ran YOLO: adapters disabled the runtime's gate and nothing let a host take a decision. This settles chat-ui.md open question 2.
What
SessionOptions.approvals?: "never" | "ask":"never"(default) is today's YOLO, unchanged."ask"turns the runtime's own permission gate on and routes it to the host; oar owns no approval policy. The gate is forced on, never assumed; where oar cannot guarantee it the runtime declares so.SessionCapabilities.approvals:{ kind: "supported" } | { kind: "unsupported"; code: "no_gate" | "not_enforceable"; reason }. An"ask"open on an unsupported runtime rejects with the reason.Session.answer(requestId, decision): Promise<ControlOutcome>withAppDecision = allow (once | session) | deny (message?) | answer (questions) | native. Recorded like every control: ananswerrequest, the toApp request'sansweredresponse (reply as sent, verbatim), thenaccepted. Typed rejections:unknown_request,already_answered(first answer stands: two devices racing get one accept),withdrawn,runtime_exited,disposed,unsupported,error.AppAsk(what is asked, read from the native body):tool_approval(tool, callId, title, reason, input, command, cwd, paths, diff,choices,denyMessage) orquestion(questions with options). It rides on the toApp request body and theapp_requestevent;nativestays verbatim beside it.app_request_withdrawnevent (claudecontrol_cancel_request, codexserverRequest/resolvedfor an unanswered request); ACP's protocol-requiredcancelledanswer on abort is recorded; the exit voids the rest.status()gainsawaiting(andstallOfstays quiet while a person owes an answer);SessionView.pendingRequestscarryaskand settle on all three.scriptedRuntimescripts canapprove()/ask(), so hosts can test approval UIs without binaries.Per runtime (evidence in
docs/runtimes/*,experiments/approval-channels*.ts)"ask"--permission-mode default --permission-prompt-tool stdiocan_use_toolwaits (allow 300 s later ran the tool), deny message reaches the model, session grant = claude's addRules+addDirectories atsessiondestination, AskUserQuestion answers, interrupt →control_cancel_request; CI (windows-latest): a safety-check write (8.3 temp path) carriessuppress_always_allow_rule, so noallow_sessionis offered and a session grant is refusedunsupportedapprovalPolicy: "untrusted",approvalsReviewer: "user"(reply checked)serverRequest/resolved, resume keeps the policy;on-requestasked nothing under danger-full-accessdefaultsession/request_permissionwaited, reject held; "Approve for this session" = allow for the sessionnot_enforceablepermission_mode = "always-approve"config,--permission-mode default,yoloMode: falseandGROK_DEFAULT_PERMISSION_MODEall ran the command unasked; no mode read-backno_gateUsage
Tests
pnpm run check: green (typecheck, lint, 397 unit tests, mock sea-trial 22/22).pnpm tsx sea-trial/all.ts: mock, claude-aimock, codex-aimock, pi-aimock all 22/22;OAR_TEST=scripted pnpm sea-trial22/22. New cases:sea-trial/cases/session-approvals.ts.OAR_TEST=claude-aimock|codex-aimock pnpm vitest run sea-trial/vendor/approvals.vendor.test.ts: green locally and in CI on ubuntu, macos and windows (it asserts on the runtimes' own reports in a scratch cwd, so it holds across shells). (Two pre-existing claude vendor tests fail on this host only: account usage under a subscription login, and the system-prompt capture picking up the Claude Desktop entrypoint.)Notes for review
AdapterSession.answerandSessionCapabilities.approvalsare required (kernel.answermakes the former a one-liner). Needs a minor bump at release.control_requestis now one record (the toApp request), no longer also a frame.can_use_tool(carriesagent_id, recorded at the root); codex file-change approvals andrequestUserInputare schema-backed only (not reachable in this aimock setup / Default mode); kimi's session grant not exercised live; grok could become supported given a switch that outranks the config or a mode read-back.🤖 Generated with Claude Code