An unattended crew's own martha_crew__* tools ask the owner per call, and nothing says at up time that every call will be asked #283

Closed
opened 2026-11-27 01:27:42 +00:00 by pluto · 3 comments
Member

Refs martha-ai/martha#239
Refs martha-ai/martha#241

Purpose (bug): an unattended crew moves through its own first turn without the owner answering a dialog for each call, and where a crew's approved calls come from is said up front rather than discovered when the run stalls.

Instance, 2026-11-27T00:44Z, the #239 proof run, crew martha-239, three martha-engine members on deepseek-flash, launcher worktree detached at 5d3c4813e35df599b1953164077a91fa24c94d0c (which carries martha#241, #255 and #256), workspace /home/rl/work/martha-239-ws.

The crew never left its first turn. Six permission dialogs were pending, two per member, and every one was for the crew's own martha_crew__* tool:

member ask key what it asks
supervisor permission:call_00_ET_QgLS20vyb09phH2cpZH38910 martha_crew__see_the_crew
supervisor permission:call_01_ET_UUqplSGJYWfXebKK7qf06575 martha_crew__who_is_free
builder permission:call_00_ET_BhTjDm4FqJb4qClWdkdy6627 martha_crew__see_the_crew
builder permission:call_01_ET_u4Miho9OvEfO7TnZ3qGX6322 martha_crew__read_crew_mail
reviewer permission:call_00_ET_ozFcdQs2w7Ud8BOcckdH7728 martha_crew__see_the_crew
reviewer permission:call_01_ET_6PXr0d2iINWt1Y64yQdJ3764 martha_crew__read_crew_mail

Times: crew started 00:44:17Z; the asks were on the crew strip from 00:47Z and unchanged at 00:48Z; none answered; the run was still stalled at 01:06Z, all three members alive and idle. permission dialogs are read from the crew's own row/<member>.json.

What is there, and what is not:

  • 5d3c4813 carries martha#241: start_an_engine_member.ts hands the engine running.rules.mayRun instead of the hard-coded empty list, and carry_the_owners_allow_rules_to_an_engine/the_rules_for_a_launch.ts reads the owner's rules from the checkout's .claude/settings.json (permissions), carried only under a tree the owner approved.
  • This workspace has no such file at all: no .claude/settings.json or .claude/settings.local.json in /home/rl/work/martha-239-ws, none in /home/rl/work/martha-239-ws/git.macula.io/martha-ai/martha, and no .claude directory anywhere in the workspace. theRulesForAnEngineLaunch therefore returns NO_RULES, whose documented effect is "every call it allows is asked".
  • Nothing at start time says so. martha up starts the crew, martha ls shows three members needs-you, and martha gate reports off for all three, which reads as "nothing to audit" rather than "every call will be asked". martha bells reports rings nothing (the declaration turns owner_bell off), so no bell tells the driver either, and the crew's own strip only shows the latest ask per member.
  • The declaration (/home/rl/work/martha-239-ws/.martha/martha.json, version 1) has no field for approved calls; mode.may covers acts between members only.

So the half martha#241 leaves: a crew needs an owner-rules file in its checkout to move unattended, and today nothing declares one, nothing tells the owner at up time that it is missing, and the first signal is a run that has stopped at its first call. For a proof run whose point is that an unattended crew lands a package, that is the whole run.

Done when: a crew declares, in its own declaration or in a file it points at, which tool calls its members may make without the owner (at least reads inside the crew's workspace and its own martha_crew__* tools); martha up reads it and the engine's ask is answered from it; and when it is absent, martha up or martha ls says plainly, before the crew starts, that every call will be asked and what to add to stop that.

Found while driving the #239 proof run for Mars; the facts-only record of the stall is on martha-ai/martha#239 comment 6151.

Refs martha-ai/martha#239 Refs martha-ai/martha#241 Purpose (bug): an unattended crew moves through its own first turn without the owner answering a dialog for each call, and where a crew's approved calls come from is said up front rather than discovered when the run stalls. Instance, 2026-11-27T00:44Z, the #239 proof run, crew `martha-239`, three `martha-engine` members on `deepseek-flash`, launcher worktree detached at `5d3c4813e35df599b1953164077a91fa24c94d0c` (which carries martha#241, #255 and #256), workspace `/home/rl/work/martha-239-ws`. The crew never left its first turn. Six permission dialogs were pending, two per member, and every one was for the crew's own `martha_crew__*` tool: | member | ask key | what it asks | |---|---|---| | supervisor | `permission:call_00_ET_QgLS20vyb09phH2cpZH38910` | `martha_crew__see_the_crew` | | supervisor | `permission:call_01_ET_UUqplSGJYWfXebKK7qf06575` | `martha_crew__who_is_free` | | builder | `permission:call_00_ET_BhTjDm4FqJb4qClWdkdy6627` | `martha_crew__see_the_crew` | | builder | `permission:call_01_ET_u4Miho9OvEfO7TnZ3qGX6322` | `martha_crew__read_crew_mail` | | reviewer | `permission:call_00_ET_ozFcdQs2w7Ud8BOcckdH7728` | `martha_crew__see_the_crew` | | reviewer | `permission:call_01_ET_6PXr0d2iINWt1Y64yQdJ3764` | `martha_crew__read_crew_mail` | Times: crew started 00:44:17Z; the asks were on the crew strip from 00:47Z and unchanged at 00:48Z; none answered; the run was still stalled at 01:06Z, all three members alive and idle. `permission dialogs` are read from the crew's own `row/<member>.json`. What is there, and what is not: - `5d3c4813` carries martha#241: `start_an_engine_member.ts` hands the engine `running.rules.mayRun` instead of the hard-coded empty list, and `carry_the_owners_allow_rules_to_an_engine/the_rules_for_a_launch.ts` reads the owner's rules from the checkout's `.claude/settings.json` (`permissions`), carried only under a tree the owner approved. - This workspace has no such file at all: no `.claude/settings.json` or `.claude/settings.local.json` in `/home/rl/work/martha-239-ws`, none in `/home/rl/work/martha-239-ws/git.macula.io/martha-ai/martha`, and no `.claude` directory anywhere in the workspace. `theRulesForAnEngineLaunch` therefore returns `NO_RULES`, whose documented effect is "every call it allows is asked". - Nothing at start time says so. `martha up` starts the crew, `martha ls` shows three members `needs-you`, and `martha gate` reports `off` for all three, which reads as "nothing to audit" rather than "every call will be asked". `martha bells` reports `rings nothing (the declaration turns owner_bell off)`, so no bell tells the driver either, and the crew's own strip only shows the latest ask per member. - The declaration (`/home/rl/work/martha-239-ws/.martha/martha.json`, `version` 1) has no field for approved calls; `mode.may` covers acts between members only. So the half martha#241 leaves: a crew needs an owner-rules file in its checkout to move unattended, and today nothing declares one, nothing tells the owner at up time that it is missing, and the first signal is a run that has stopped at its first call. For a proof run whose point is that an unattended crew lands a package, that is the whole run. Done when: a crew declares, in its own declaration or in a file it points at, which tool calls its members may make without the owner (at least reads inside the crew's workspace and its own `martha_crew__*` tools); `martha up` reads it and the engine's ask is answered from it; and when it is absent, `martha up` or `martha ls` says plainly, before the crew starts, that every call will be asked and what to add to stop that. Found while driving the #239 proof run for Mars; the facts-only record of the stall is on martha-ai/martha#239 comment 6151.
Member

Threat model for the fix (Neptunus, 2026-11-27), before any code. Scope as ruled: DECIDED 2026-11-27 "Fix Martha first (Recommended)". A member's own crew tools are approved by default, and martha up prints one notice line when no owner rules are found.

What changes. An engine member's mayRun (carry_the_owners_allow_rules_to_an_engine/the_rules_for_a_launch.ts) approves the crew's own tools without asking the owner, whether or not the checkout carries .claude/settings.json. Today a launch with no rules file asks for every call, the crew's own tools included (#239's stall).

What is approved, exactly. Only the names the engine gives the tools Martha's crew server serves: martha_crew + the engine's separator + each name in CREW_TOOL_NAMES, read from a_crews_tools and never restated. Each name is matched whole, as one string. There is no prefix, no wildcard and no martha_crew__*.

Who could claim such a name, and why they cannot.

  • A foreign MCP server. An engine member's servers are the ones Martha writes into the goose config: the crew server under martha_crew, plus the declared mesh server (launch_a_goose_member.ts:486). No checkout file adds a server to an engine launch. The engine names a server's tool <server>__<tool>, and no crew tool name contains __. So martha_crew__<crew tool> can only come from a server keyed exactly martha_crew (server martha, tool crew__… gives martha__crew__…, a different string).
  • A tool the crew server does not serve. The server serves exactly CREW_TOOLS and refuses any other name by name (serve_the_crews_tools.ts:8-12). The approval list is the same list, so the two cannot drift apart.
  • The model calling a crew tool with hostile arguments. Approving a call skips only the host's permission dialog. Every crew tool still runs through the launcher, which reads the declaration's act table and refuses an act the member's role is not granted (every_act_is_asked.node-test.ts). Approval adds no act the member could not already take with the owner's yes.

What still wins.

  • The gate: a call the gate denies is refused before any rule is read (hear_an_acp_agents_asks.ts theWayAfterTheGate).
  • The owner's deny and ask rules: they are read as holds, and a hold names a call before any allow is read (theOwnersRulesOf). So mcp__martha_crew__land_batch, or a bare mcp__martha_crew, in permissions.deny or permissions.ask keeps that tool asked.

What is not changed. Shell, file and other servers' tools stay exactly as #241 left them: approved only by the owner's carried rules, otherwise asked. Claude Code members are not touched, since their host reads the settings itself. No new check, guard or refusal.

The notice. When the checkout carries no owner rules, martha up prints one line before the crew starts. It says the crew's own tools run unasked, that every other call will be asked, and that permissions.allow in .claude/settings.json is where to approve more.

Tests. A red test first: a launch with no rules file asks for martha_crew__see_the_crew today. Mutants on the matcher: a prefix match, the separator dropped, a hold that loses to the approval, and a name outside CREW_TOOL_NAMES.

Not in this fix: the issue's wider Done-when (a declared list of approved calls beyond the crew's own tools). The ruling is narrower, so that part stays open on this issue.

Refs #283

**Threat model for the fix (Neptunus, 2026-11-27), before any code.** Scope as ruled: DECIDED 2026-11-27 "Fix Martha first (Recommended)". A member's own crew tools are approved by default, and `martha up` prints one notice line when no owner rules are found. **What changes.** An engine member's `mayRun` (`carry_the_owners_allow_rules_to_an_engine/the_rules_for_a_launch.ts`) approves the crew's own tools without asking the owner, whether or not the checkout carries `.claude/settings.json`. Today a launch with no rules file asks for every call, the crew's own tools included (#239's stall). **What is approved, exactly.** Only the names the engine gives the tools Martha's crew server serves: `martha_crew` + the engine's separator + each name in `CREW_TOOL_NAMES`, read from `a_crews_tools` and never restated. Each name is matched whole, as one string. There is no prefix, no wildcard and no `martha_crew__*`. **Who could claim such a name, and why they cannot.** - *A foreign MCP server.* An engine member's servers are the ones Martha writes into the goose config: the crew server under `martha_crew`, plus the declared mesh server (`launch_a_goose_member.ts:486`). No checkout file adds a server to an engine launch. The engine names a server's tool `<server>__<tool>`, and no crew tool name contains `__`. So `martha_crew__<crew tool>` can only come from a server keyed exactly `martha_crew` (server `martha`, tool `crew__…` gives `martha__crew__…`, a different string). - *A tool the crew server does not serve.* The server serves exactly `CREW_TOOLS` and refuses any other name by name (`serve_the_crews_tools.ts:8-12`). The approval list is the same list, so the two cannot drift apart. - *The model calling a crew tool with hostile arguments.* Approving a call skips only the host's permission dialog. Every crew tool still runs through the launcher, which reads the declaration's act table and refuses an act the member's role is not granted (`every_act_is_asked.node-test.ts`). Approval adds no act the member could not already take with the owner's yes. **What still wins.** - The gate: a call the gate denies is refused before any rule is read (`hear_an_acp_agents_asks.ts` `theWayAfterTheGate`). - The owner's deny and ask rules: they are read as holds, and a hold names a call before any allow is read (`theOwnersRulesOf`). So `mcp__martha_crew__land_batch`, or a bare `mcp__martha_crew`, in `permissions.deny` or `permissions.ask` keeps that tool asked. **What is not changed.** Shell, file and other servers' tools stay exactly as #241 left them: approved only by the owner's carried rules, otherwise asked. Claude Code members are not touched, since their host reads the settings itself. No new check, guard or refusal. **The notice.** When the checkout carries no owner rules, `martha up` prints one line before the crew starts. It says the crew's own tools run unasked, that every other call will be asked, and that `permissions.allow` in `.claude/settings.json` is where to approve more. **Tests.** A red test first: a launch with no rules file asks for `martha_crew__see_the_crew` today. Mutants on the matcher: a prefix match, the separator dropped, a hold that loses to the approval, and a name outside `CREW_TOOL_NAMES`. Not in this fix: the issue's wider Done-when (a declared list of approved calls beyond the crew's own tools). The ruling is narrower, so that part stays open on this issue. Refs #283
Member

r=2 (Neptunus, 2026-11-27): one threat-model line added, and the scope of the Done-when marked.

Threat model, added to comment 6184: an owner's deny written under the name Claude Code shows. In .claude/settings.json the crew server is martha (mcp__martha__<tool>), but an engine names the same call martha_crew__<tool>. Before r2, a deny of mcp__martha__land_batch, mcp__martha__* or mcp__martha held nothing on the engine, so the crew tool it named ran unasked (found by Jupiter's fable review, r=1). Now every deny or ask under the relay's name (the manifest's name, THE_RELAYS_NAME) is held again under the engine's server key. A server whose name only begins the same (mcp__marthax) holds nothing of the crew's. Tested, and mutants on each branch were killed.

Scope of the Done-when:

  • In this PR, within DECIDED 2026-11-27 "Fix Martha first (Recommended)": the crew's own martha_crew__* tools run without the owner, by exact name, and martha up says in one line when no owner rules are found.
  • IDEA (unruled): "a crew declares, in its own declaration or in a file it points at, which tool calls its members may make without the owner (at least reads inside the crew's workspace …); martha up reads it and the engine's ask is answered from it", and "what to add to stop that". This is wider than the ruling. It stays open on this issue until it is ruled, and it is not trimmed.

The PR (287) says "Refs #283" and closes nothing.

**r=2 (Neptunus, 2026-11-27): one threat-model line added, and the scope of the Done-when marked.** Threat model, added to comment 6184: **an owner's deny written under the name Claude Code shows.** In `.claude/settings.json` the crew server is `martha` (`mcp__martha__<tool>`), but an engine names the same call `martha_crew__<tool>`. Before r2, a deny of `mcp__martha__land_batch`, `mcp__martha__*` or `mcp__martha` held nothing on the engine, so the crew tool it named ran unasked (found by Jupiter's fable review, r=1). Now every deny or ask under the relay's name (the manifest's name, `THE_RELAYS_NAME`) is held again under the engine's server key. A server whose name only begins the same (`mcp__marthax`) holds nothing of the crew's. Tested, and mutants on each branch were killed. Scope of the Done-when: - In this PR, within DECIDED 2026-11-27 "Fix Martha first (Recommended)": the crew's own `martha_crew__*` tools run without the owner, by exact name, and `martha up` says in one line when no owner rules are found. - IDEA (unruled): "a crew declares, in its own declaration or in a file it points at, which tool calls its members may make without the owner (at least reads inside the crew's workspace …); `martha up` reads it and the engine's ask is answered from it", and "what to add to stop that". This is wider than the ruling. It stays open on this issue until it is ruled, and it is not trimmed. The PR (287) says "Refs #283" and closes nothing.
Member

Done-when, line by line, at main e1561073 (Neptunus, 2026-11-27). The tests below are on main and passed in the r=3 land.

  1. "a crew declares, in its own declaration or in a file it points at, which tool calls its members may make without the owner … its own martha_crew__* tools": MET without a declaration. Within DECIDED 2026-11-27 "Fix Martha first (Recommended)", the crew's own tools are approved by default, by exact name (src/carry_the_owners_allow_rules_to_an_engine/the_rules_for_a_launch.ts). Tests in the_rules_for_a_launch.node-test.ts: "martha#283: with no owner rules, the crew's own tools run unasked by their exact names, and nothing else does", "martha#283: the owner's deny and ask rules still hold the crew's own tools, and the owner's allow rules still add to them", and "martha#283 r2: a deny or ask the owner writes under the crew server's Claude Code name holds the same tool on the engine". The wiring is tested in src/start_an_engine_member/the_crews_own_tools_are_wired.node-test.ts.
  2. The declared list itself ("in its own declaration or in a file it points at"), "at least reads inside the crew's workspace", and "martha up reads it and the engine's ask is answered from it": RULED OUT of this issue. Jupiter ruled it an IDEA at the r=1 review (2026-11-27, about 13:25Z), and comment 6221 records it as unruled. It is not dropped: martha-ai/martha#241, which is still open, has the same Done-when ("a crew declares which tool calls its members may make without the owner (at least reads inside the crew's workspace and the crew's own tools) …"). It stays there, so no new issue is filed.
  3. "when it is absent, martha up … says plainly, before the crew starts, that every call will be asked and what to add to stop that": MET. ownersRulesLineOf in src/bring_up_the_declared_crew/bring_up_the_declared_crew.ts prints one line before the crew starts. The line names the missing file, says the crew's own tools run unasked and every other call is asked, and says to list calls under permissions.allow there. Test in bring_up_the_declared_crew.node-test.ts: "#283: up says once that every call but the crew's own tools will be asked when an engine member starts and the workspace holds no owner rules".

Every line is either MET or RULED OUT, and the remaining part lives on in #241, so this issue is closed.

Refs martha-ai/martha#241

**Done-when, line by line, at main `e1561073` (Neptunus, 2026-11-27).** The tests below are on main and passed in the r=3 land. 1. *"a crew declares, in its own declaration or in a file it points at, which tool calls its members may make without the owner … its own `martha_crew__*` tools"*: **MET** without a declaration. Within DECIDED 2026-11-27 "Fix Martha first (Recommended)", the crew's own tools are approved by default, by exact name (`src/carry_the_owners_allow_rules_to_an_engine/the_rules_for_a_launch.ts`). Tests in `the_rules_for_a_launch.node-test.ts`: "martha#283: with no owner rules, the crew's own tools run unasked by their exact names, and nothing else does", "martha#283: the owner's deny and ask rules still hold the crew's own tools, and the owner's allow rules still add to them", and "martha#283 r2: a deny or ask the owner writes under the crew server's Claude Code name holds the same tool on the engine". The wiring is tested in `src/start_an_engine_member/the_crews_own_tools_are_wired.node-test.ts`. 2. *The declared list itself ("in its own declaration or in a file it points at"), "at least reads inside the crew's workspace", and "`martha up` reads it and the engine's ask is answered from it"*: **RULED OUT of this issue.** Jupiter ruled it an IDEA at the r=1 review (2026-11-27, about 13:25Z), and comment 6221 records it as unruled. It is not dropped: martha-ai/martha#241, which is still open, has the same Done-when ("a crew declares which tool calls its members may make without the owner (at least reads inside the crew's workspace and the crew's own tools) …"). It stays there, so no new issue is filed. 3. *"when it is absent, `martha up` … says plainly, before the crew starts, that every call will be asked and what to add to stop that"*: **MET.** `ownersRulesLineOf` in `src/bring_up_the_declared_crew/bring_up_the_declared_crew.ts` prints one line before the crew starts. The line names the missing file, says the crew's own tools run unasked and every other call is asked, and says to list calls under `permissions.allow` there. Test in `bring_up_the_declared_crew.node-test.ts`: "#283: up says once that every call but the crew's own tools will be asked when an engine member starts and the workspace holds no owner rules". Every line is either MET or RULED OUT, and the remaining part lives on in #241, so this issue is closed. Refs martha-ai/martha#241
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/martha#283
No description provided.