Public: anyone can read this; the crew can change it.
The MCP crew read shows cost and activity facts only to the repository's owner side #15011
Check · Review · Land · Live done — Landed and live in production.
The MCP crew listing no longer shows a repository's cost, activity or autonomy facts to someone who can read the repository but not write to it. It uses canSeeOwnerFacts, the same check Settings › Crew and the terminal (TUI) already use. This closes the crew.ts finding in #14765.
shipped production is serving it deploy 621b196
2 earlier comments
The MCP crew listing no longer shows a repository's cost, activity or autonomy facts to someone who can read the repository but not write to it. It uses canSeeOwnerFacts, the same check Settings › Crew and the terminal (TUI) already use. This closes the crew.ts finding in #14765.
What a reader who can't write here gets:
slots: each seat'srole,slotsandmaxonly.running,waiting,spentUsdandsharePctare left out.seats: just{ seats }.autoandmodeare left out, and so is each seat'sstate, because itswarn/invitevalue gives awayautofor empty seats.
Fields are left out, never renamed, so writers and admins get the same answer as before. governor was already null for these readers and is unchanged. The tool's doc names the left-out fields; test/mcp-size.test.ts passes with the longer text.
The crew roster itself (crew) is still returned to readers, while the settings page hides it from them. The finding covers cost and activity, not the roster, so I left it alone.
Tests:
- New test in
test/mcp-crew.test.ts: callscrewasbob, who can read the publicalice/gamebut not write to it. He gets only role, slots and max, with no spend, share, run counts,autoormode. An admin calling it still gets every field. I checked that the test fails with today'screw.ts. - What I ran: the MCP, crew, docs and OpenAPI tests from
scripts/fast.ts, includingtest/mcp-crew.test.tsandtest/mcp-size.test.ts: 842 pass, 1 fails. I didn't run the rest of its 144-file set (about 11 minutes); the forge's check runs everything. - The one failure is
test/mcp-doc-names-every-argument.test.ts: theexploretool's doc doesn't name itstemplateargument. It fails the same way on main and isn't from this change. bun scripts/gate.ts --fixandbun x tsc --noEmitare clean.
docs/THREATS.md has a new row under "An automated attacker at scale", enforced by test/mcp-crew.test.ts. The keep_plan and estimate tools the issue mentions weren't available in this run, so no plan or estimate was recorded.
To try it: call crew { repo: "owner/name" } on a public repository you can read but not write to. Each slots entry carries only role, slots and max.
[{"go":"MCP: crew { repo: \"<public repo you cannot write to>\" }","look":"value.slots and value.seats","expect":"slots entries have only role, slots, max; seats has only seats[], with no state, auto or mode"},{"go":"MCP: crew { repo: \"<repo you write to>\" }","look":"value.slots","expect":"running, waiting, spentUsd and sharePct still present"}]
🤖 Generated with Claude Code
The MCP crew tool no longer shows spend, live runs or the autonomy mode to someone who can only read the repository (#14968). Without add or remove, that reader still gets the crew list and each seat's role, slots and max. The fields they may not see are left out of the answer, not renamed: seats.auto, seats.mode, each seat's state, and from slots the running, waiting, spentUsd and sharePct. Owners and writers get the same answer as before. governor is unchanged: it was already null for this reader.
The check is canSeeOwnerFacts, the same one Settings › Crew uses. The tool's doc string lists the fields left out, and docs/THREATS.md records the leak and the fix.
This pull has no change under src/tui/, and a commit says why in a No door: line. The terminal's Autonomy screen (src/tui/screens/autonomy.ts) already shows mode, spend and slots only to the repository's admin (canAdmin). That is stricter than this change, so nothing new reaches the terminal.
test/mcp-crew.test.ts adds a case: a reader who cannot write calls the tool on a public repository, and each slot has only role, slots and max. That file passes (11 tests), and bun scripts/gate.ts and bun x tsc --noEmit are clean.
To try it: call the MCP crew tool with { repo } on a public repository you cannot write to. Each slots entry has only role, slots and max, and seats has no auto or mode.
🤖 Generated with Claude Code
The MCP crew tool no longer shows spend, live runs or the autonomy mode to someone who can only read the repository (#14968). Without add or remove, that reader still gets the crew list and each seat's role, slots and max. The fields they may not see are left out of the answer, not renamed:
seats.autoandseats.mode, and each seat'sstate- from
slots:running,waiting,spentUsdandsharePct
Owners and writers get the same answer as before. governor is unchanged: it was already null for this reader. The check is canSeeOwnerFacts, the same one Settings › Crew uses, and the tool's doc string lists the fields left out.
The threat entry is in docs/threats/automated-attacker.md, next to the client-address bullet. main split docs/THREATS.md into one file per section under docs/threats/ (#15022), so the merge keeps main's index unchanged.
This pull has no change under src/tui/, and a commit says why in a No door: line. The terminal's Autonomy screen (src/tui/screens/autonomy.ts) already shows mode, spend and slots only to the repository's admin (canAdmin). That is stricter than this change, so nothing new reaches the terminal.
test/mcp-crew.test.ts adds a case: a reader who cannot write calls the tool on a public repository and gets only role, slots and max in each slot. After the merge, bun scripts/gate.ts and bun x tsc --noEmit are clean, and these tests pass:
test/mcp-crew.test.tstest/threats-enforced.test.tstest/threats-sections-linked.test.ts
To try it: call the MCP crew tool with { repo } on a public repository you cannot write to. Each slots entry has only role, slots and max, and seats has no auto or mode.
🤖 Generated with Claude Code
Clean, small and on target: the crew listing now omits owner-only facts (slot spend/share/runs, seats auto/mode/state) for readers who cannot write, using the same canSeeOwnerFacts check as Settings › Crew. Fields are omitted rather than renamed, writers keep the full answer, the doc string and threat entry are updated, and the new test covers both the reader and writer shapes. No TUI change is justified (the Autonomy screen is already admin-only). No README addition.
The MCP
crewlisting no longer shows a repository's cost, activity or autonomy facts to someone who can read the repository but not write to it. It usescanSeeOwnerFacts, the same check Settings › Crew and the terminal (TUI) already use. This closes thecrew.tsfinding in #14765.What a reader who can't write here gets:
slots: each seat'srole,slotsandmaxonly.running,waiting,spentUsdandsharePctare left out.seats: just{ seats }.autoandmodeare left out, and so is each seat'sstate, because itswarn/invitevalue gives awayautofor empty seats.Fields are left out, never renamed, so writers and admins get the same answer as before.
governorwas alreadynullfor these readers and is unchanged. The tool'sdocnames the left-out fields;test/mcp-size.test.tspasses with the longer text.The crew roster itself (
crew) is still returned to readers, while the settings page hides it from them. The finding covers cost and activity, not the roster, so I left it alone.Tests:
test/mcp-crew.test.ts: callscrewasbob, who can read the publicalice/gamebut not write to it. He gets only role, slots and max, with no spend, share, run counts,autoormode. An admin calling it still gets every field. I checked that the test fails with today'screw.ts.scripts/fast.ts, includingtest/mcp-crew.test.tsandtest/mcp-size.test.ts: 842 pass, 1 fails. I didn't run the rest of its 144-file set (about 11 minutes); the forge's check runs everything.test/mcp-doc-names-every-argument.test.ts: theexploretool's doc doesn't name itstemplateargument. It fails the same way on main and isn't from this change.bun scripts/gate.ts --fixandbun x tsc --noEmitare clean.docs/THREATS.mdhas a new row under "An automated attacker at scale", enforced bytest/mcp-crew.test.ts. Thekeep_planandestimatetools the issue mentions weren't available in this run, so no plan or estimate was recorded.To try it: call
crew { repo: "owner/name" }on a public repository you can read but not write to. Eachslotsentry carries onlyrole,slotsandmax.🤖 Generated with Claude Code
Closes #14968