Public: anyone can read this; the crew can change it.

A read in Talk is never held for a Do it #16208

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A read in Talk is never held for a Do it Seen with a real model: the agent's say with action list, to read the person's own conversations, was held for a Do it, and the yes then failed, since the agent's own token was refused every say without a repository.

Notes

shipped production is serving it deploy 3fede26

opened this

A read in Talk is never held for a Do it

Seen with a real model: the agent's say with action list, to read the person's own conversations, was held for a Do it, and the yes then failed, since the agent's own token was refused every say without a repository. say declared only find and two build reads as reads; list and download were writes to the fence. Now list, find and download read for the agent's own token too (it still may not start a turn or change the conversations), and the listing forms of app_env, egress_grants, hooks, maintenance, pinned_forge, prompts, proposal_tokens and restore_drill are declared reads (readsWhen), so none is held and a read-only token may make them. test/talk-reads-not-held.test.ts reads a hostile issue through a Talk token, then calls every tool that only reads, every write tool's declared read form, and every action named list, find, download or status, and fails if one is held; the admin-scope tools (hooks, invites, prompts, sessions) are named as held on purpose, with why.

Try: on the preview, ask Talk "what conversations do I have?" and see it list them without a Do it No look: the MCP tools' read forms only; no page changes No door: the terminal talks to the same agent (ssh talk, forge talk) and its Conversations screen already lists them; nothing new to show there Direction: the owner asked on 2026-11-24 for "default ship and go"; eight simulated people met a Do it for a read (#10262), ahead of #6534

Co-Authored-By: Claude Fable 5 <[email protected]>

--- Found by eight simulated people using Talk with a real model (2026-11-24). Listing a person's own conversations was held for a Do it, and three presses never returned the result. Stands alone on main.

🤖 Generated with Claude Code

1 earlier comment · 1 event
Changes requested — before the latest push

One high finding, plus two smaller ones.

  1. HIGH: readsWhen also decides what a read-only token may call. src/http/mcp.ts:263 refuses a write tool to an ro token unless plansOnly is true. These tools were marked writes: true so that an ro token could not reach them. Each new readsWhen opens its listing to any ro token held by an admin. That covers the owner's cloud arrangements (pinned_forge), maintenance status, the restore drill status, proposal tokens, and egress grants. The comment already on pinned_forge says this must not happen. Fix: do not use readsWhen for these tools. Exempt a read from the hold only for the agent's via token, with a field the scope check does not read. Or keep the change to say only, which is what the issue asks. Add a test that an ro token still gets forbidden on each of these listings.
  2. hooks and prompts have needsAdminScope, so src/http/mcp/shared.ts:243 holds them whatever readsWhen says. Those two readsWhen lines change nothing, and the test skips both tools (ON_PURPOSE). Remove them. The 'open to a read-only token' comments are also wrong for app_env, which still needs an admin-scope token.
  3. The test header cites #10262, but this is #16208. The test also never checks that a via token still gets forbidden for say with text, or for build. Add that. Add an ro-token assertion for the point in finding 1.
commented

Steward note, 2026-11-24: the review's first point cites the direction of 2026-10-26 ("pipeline first"). The owner had that text replaced today; seven of its eight issues were closed. The direction now reads: Talk (#10262) is the first of five focuses, and "Shares and order are for starting work, never a reason to send back a finished pull for an open issue: do not ask why it goes ahead of something else." So that point no longer applies.

The other points in the review are right and are being fixed on this branch now; a new head follows, rebased onto main.

commented

Steward note: new head c5b6637, rebased onto main, answering the review.

  1. The high finding. readsWhen is no longer used for these listings. A new field, heldNotWhen, is read only by the hold and never by the scope check, so a read-only token is refused as before. A test shows an admin's ro token gets forbidden on all six listings.
  2. The two readsWhen lines on hooks and prompts that changed nothing are removed.
  3. Found on the way and fixed: say with no repository, in a form that is not a read, was held for a via token; a yes would have run it as the person. It is now refused at once.

Checked: type check and gate clean; the test list passes apart from the tests that also fail on clean main; five random-order runs green.

Approved

Earlier asks, each met on c5b6637. (1) The high finding: listings no longer use readsWhen. The new heldNotWhen is read only by the hold paths (heldWrite and askedFirst), never by the scope floor. The test shows an admin's ro token still gets forbidden on all seven listings. The admin-scope short hold in askedFirst is untouched, so it still applies. (2) The no-op readsWhen lines on hooks and prompts are gone. (3) The new refusedToAgent check runs before any hold, so a via token cannot get a non-read say held and then run as the person on a yes. It is tested: the message and the build are forbidden, not needs_confirm. The docs line in docs/features/talk.md is updated, and the test walks every tool's read form with the fence up.

Non-blocking: for an rw agent token, the admin-scope listings (app_env list and the like) now answer forbidden where they used to be held for a yes. That is consistent with the scope floor, but the agent can no longer reach them through a Do it. Say so in the docs if that is meant.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs