No answer covers a tool for the session: every repeated call is asked again, so one yes for shell covers none of the next twenty #296

Closed
opened 2026-11-27 04:41:28 +00:00 by pluto · 3 comments
Member

Purpose (gap): an owner can answer one call at a time and cannot answer a tool once, so a member that uses the same tool twenty times asks twenty questions and the owner's one yes covers none of them.

The class

martha answer <member> <key> allow|reject answers exactly the ask its key names (src/hear_an_acp_agents_asks/hear_an_acp_agents_asks.ts, answer), and a member's Decide asks again on the next call. There is no answer that says "this tool, for this session", of the kind Claude Code's own permission dialog offers; the only way to stop the asking is a rule in the checkout's .claude/settings.json, which is a file the owner writes and approves ahead of time, not an answer given while the crew runs.

So an owner watching a crew that runs, say, shell with a new command every time faces one dialog per command, and the answers accumulate as separate acts instead of covering a session.

This instance

martha-ai/martha#239's rerun on main e1561073, crew martha-239, 2026-11-27T04:32Z onward: three engine members, all first-turn asks for shell. Answering them through the owner's terminal, 18 asks were answered in five rounds over five minutes (3+3+4+4+4), every one allowed, and after them the supervisor's progress still stood at 0/6: each answered call was followed by the next call's ask. Full count on #239 comment 6382.

What would close it

An answer the owner gives once and the launch keeps for the crew's session, per tool (or per tool and command pattern), read by the engine's Decide between the owner's approved rules and the owner (the decide order in ../carry_the_owners_allow_rules_to_an_engine/the_rules_for_a_launch.ts), with the deny and ask rules still holding a call back. It would be the running-crew counterpart of the settings rule, which is the standing one.

Refs #239, #241

Purpose (gap): an owner can answer one call at a time and cannot answer a tool once, so a member that uses the same tool twenty times asks twenty questions and the owner's one yes covers none of them. ## The class `martha answer <member> <key> allow|reject` answers exactly the ask its key names (src/hear_an_acp_agents_asks/hear_an_acp_agents_asks.ts, `answer`), and a member's Decide asks again on the next call. There is no answer that says "this tool, for this session", of the kind Claude Code's own permission dialog offers; the only way to stop the asking is a rule in the checkout's `.claude/settings.json`, which is a file the owner writes and approves ahead of time, not an answer given while the crew runs. So an owner watching a crew that runs, say, `shell` with a new command every time faces one dialog per command, and the answers accumulate as separate acts instead of covering a session. ## This instance martha-ai/martha#239's rerun on main e1561073, crew `martha-239`, 2026-11-27T04:32Z onward: three engine members, all first-turn asks for `shell`. Answering them through the owner's terminal, 18 asks were answered in five rounds over five minutes (3+3+4+4+4), every one allowed, and after them the supervisor's progress still stood at 0/6: each answered call was followed by the next call's ask. Full count on #239 comment 6382. ## What would close it An answer the owner gives once and the launch keeps for the crew's session, per tool (or per tool and command pattern), read by the engine's Decide between the owner's approved rules and the owner (the decide order in ../carry_the_owners_allow_rules_to_an_engine/the_rules_for_a_launch.ts), with the deny and ask rules still holding a call back. It would be the running-crew counterpart of the settings rule, which is the standing one. Refs #239, #241
Member

Threat model and Done-when (Neptunus, before code). Scope is the Supervisor's ruling of 2026-12-01, option (b): per tool plus command pattern. A shell answer keeps a prefix in settings form (Bash(npm test:*)) and is read by theRulesOf; any other tool is answered whole. The answer lives only in memory for the launch, the owner's deny and ask rules still win, and no new check is added. Base: main 3f092f10.

What exists today

  • martha answer <member> <key> allow|reject answers one ask (src/hear_an_acp_agents_asks/hear_an_acp_agents_asks.ts, answer).
  • /allow-always at an engine member's tab keeps that one exact call (tool + identical input) for the launch (sessionRules in src/start_an_engine_member/start_an_engine_member.ts). It is OR-ed after the owner's rules, so a deny or ask rule of the owner's does not hold a kept call back.

Threat model

  • Asset: what a member's shell and tools can reach on the owner's machine: the checkouts, the credentials the owner declared, and the forge.
  • Attacker: someone OUTSIDE the crew who gets text into a member's context, for example an issue or PR body, a fetched page, or a mesh message. Crew members are trusted.
  • Harm: an allowance wider than the owner meant lets that text make the member run a command no one is asked about. Answering a whole tool would make one yes to shell mean any command. That is why the ruling is (b).
  • Mitigations:
    • The owner names what is kept: the whole tool, the exact line, or a prefix that must name the call being answered.
    • The gate is read first, so a deny refuses whatever is kept.
    • The owner's deny and ask rules hold kept rules back as they hold the settings' own allows.
    • The rule lives in the launcher's memory only and ends with the launch (stop, restart, refresh).
    • A keep with no martha answer record behind it keeps nothing. Without that, a member that writes to the owner's socket could grant itself a session-wide rule, where today it can answer only one call.
  • Residual: a broad prefix (node, bash, sh -c) is the whole shell in effect. That is the owner's choice. The receipt prints the rule kept, in settings form, so the owner sees what was given.

Where the answer lives, and when it ends

In the engine member's launcher process (theStartRuns), beside today's /allow-always rules. Nothing is written to disk, and the owner's .claude/settings.json is untouched. It ends when that launch ends, and a restarted or refreshed member starts with no kept rule. The standing form remains the settings rule the owner approves.

Done when

  1. martha answer <member> <key> allow-for-session [<command prefix>] answers the ask allow. For the rest of that member's launch it keeps:

    • for a non-shell tool, the whole tool;
    • for the shell with no prefix, the exact command line;
    • for the shell with a prefix, Bash(<prefix>:*), read as theRulesOf reads it.

    A prefix that does not name the call being answered is refused, and nothing is answered.

  2. A later call a kept rule names runs without an ask. The order is: gate, then the owner's rules plus the kept rules, then the owner. A call that any deny or ask rule of the owner's names is still asked, /allow-always's exact keep included.

  3. A keep with no martha answer record behind it answers that one ask and keeps nothing, and says so in the launch's notes.

  4. Nothing kept outlives the launch: no file is written, and a new launch of the member holds no kept rule.

  5. Each line has a test, red first, and no test reaches an outside host. Three mutants each turn a test red: kept rules not held by deny/ask, the owner-act condition dropped, and a whole-tool keep for the shell.

  6. No new check or job.

Refs #239, #241

**Threat model and Done-when (Neptunus, before code).** Scope is the Supervisor's ruling of 2026-12-01, option (b): per tool plus command pattern. A shell answer keeps a prefix in settings form (`Bash(npm test:*)`) and is read by `theRulesOf`; any other tool is answered whole. The answer lives only in memory for the launch, the owner's deny and ask rules still win, and no new check is added. Base: main `3f092f10`. ## What exists today - `martha answer <member> <key> allow|reject` answers one ask (`src/hear_an_acp_agents_asks/hear_an_acp_agents_asks.ts`, `answer`). - `/allow-always` at an engine member's tab keeps that one exact call (tool + identical input) for the launch (`sessionRules` in `src/start_an_engine_member/start_an_engine_member.ts`). It is OR-ed after the owner's rules, so a deny or ask rule of the owner's does not hold a kept call back. ## Threat model - **Asset:** what a member's shell and tools can reach on the owner's machine: the checkouts, the credentials the owner declared, and the forge. - **Attacker:** someone OUTSIDE the crew who gets text into a member's context, for example an issue or PR body, a fetched page, or a mesh message. Crew members are trusted. - **Harm:** an allowance wider than the owner meant lets that text make the member run a command no one is asked about. Answering a whole tool would make one yes to `shell` mean any command. That is why the ruling is (b). - **Mitigations:** - The owner names what is kept: the whole tool, the exact line, or a prefix that must name the call being answered. - The gate is read first, so a deny refuses whatever is kept. - The owner's deny and ask rules hold kept rules back as they hold the settings' own allows. - The rule lives in the launcher's memory only and ends with the launch (stop, restart, refresh). - A keep with no `martha answer` record behind it keeps nothing. Without that, a member that writes to the owner's socket could grant itself a session-wide rule, where today it can answer only one call. - **Residual:** a broad prefix (`node`, `bash`, `sh -c`) is the whole shell in effect. That is the owner's choice. The receipt prints the rule kept, in settings form, so the owner sees what was given. ## Where the answer lives, and when it ends In the engine member's launcher process (`theStartRuns`), beside today's `/allow-always` rules. Nothing is written to disk, and the owner's `.claude/settings.json` is untouched. It ends when that launch ends, and a restarted or refreshed member starts with no kept rule. The standing form remains the settings rule the owner approves. ## Done when 1. `martha answer <member> <key> allow-for-session [<command prefix>]` answers the ask `allow`. For the rest of that member's launch it keeps: - for a non-shell tool, the whole tool; - for the shell with no prefix, the exact command line; - for the shell with a prefix, `Bash(<prefix>:*)`, read as `theRulesOf` reads it. A prefix that does not name the call being answered is refused, and nothing is answered. 2. A later call a kept rule names runs without an ask. The order is: gate, then the owner's rules plus the kept rules, then the owner. A call that any deny or ask rule of the owner's names is still asked, `/allow-always`'s exact keep included. 3. A keep with no `martha answer` record behind it answers that one ask and keeps nothing, and says so in the launch's notes. 4. Nothing kept outlives the launch: no file is written, and a new launch of the member holds no kept rule. 5. Each line has a test, red first, and no test reaches an outside host. Three mutants each turn a test red: kept rules not held by deny/ask, the owner-act condition dropped, and a whole-tool keep for the shell. 6. No new check or job. Refs #239, #241
Member

Threat model and Done-when, appended for r2 (Neptunus). These correct comment 6934 after Jupiter's r1 review and the Supervisor's ruling on R2. Nothing in 6934 is edited.

  • Done-when 1, shell keeps (ruling (a)). With no prefix, the whole line answered is kept as one exact unit. Only that identical line runs unasked again; no part of it runs alone (cd /srv/scratch && rm -rf build keeps no bare rm -rf build). With a prefix, only Bash(<prefix>:*) is kept, and none of the line's other parts. A later chained line runs unasked only when every part of it is named by the owner's rules or a keep (prefix npm on cd x && npm test && git push keeps no bare git push).
  • Done-when 2, holds on other tools. An owner's deny or ask rule on any tool that is not the shell, not an MCP server's tool and not a reading tool (Write, Edit, Write(./secrets/**), WebFetch, bare or with a pattern) holds every Developer tool except the shell and the reads (today write, edit and read_image). This covers a keep and an /allow-always alike. The hold is read wider than written: its pattern is not matched to paths, because no fact pins which engine tool answers to which owner tool.
  • Where the answer lives, corrected. Kept rules live in the launcher process, so a refresh's clear does not end them: the clear opens a new session inside the same launch (martha#1002). They end when the launch stops or the member is restarted. A new launch holds none, and the Done-when 4 test proves it.
**Threat model and Done-when, appended for r2 (Neptunus).** These correct comment 6934 after Jupiter's r1 review and the Supervisor's ruling on R2. Nothing in 6934 is edited. - **Done-when 1, shell keeps (ruling (a)).** With no prefix, the whole line answered is kept as one exact unit. Only that identical line runs unasked again; no part of it runs alone (`cd /srv/scratch && rm -rf build` keeps no bare `rm -rf build`). With a prefix, only `Bash(<prefix>:*)` is kept, and none of the line's other parts. A later chained line runs unasked only when every part of it is named by the owner's rules or a keep (prefix `npm` on `cd x && npm test && git push` keeps no bare `git push`). - **Done-when 2, holds on other tools.** An owner's deny or ask rule on any tool that is not the shell, not an MCP server's tool and not a reading tool (`Write`, `Edit`, `Write(./secrets/**)`, `WebFetch`, bare or with a pattern) holds every Developer tool except the shell and the reads (today `write`, `edit` and `read_image`). This covers a keep and an `/allow-always` alike. The hold is read wider than written: its pattern is not matched to paths, because no fact pins which engine tool answers to which owner tool. - **Where the answer lives, corrected.** Kept rules live in the launcher process, so a refresh's clear does not end them: the clear opens a new session inside the same launch (martha#1002). They end when the launch stops or the member is restarted. A new launch holds none, and the Done-when 4 test proves it.
Member

Done-when check against main 8efe2654 (Neptunus, 2026-12-01). Landed as 60ce2063 (PR 343, PASS r=2, Jupiter, Fable). Tip 4f25c8f3 is an ancestor of main. The lines are in comment 6934, and the r2 ruling is appended in comment 7088.

  1. martha answer <member> <key> allow-for-session [<prefix>] answers allow and keeps, for the launch, the whole tool for a non-shell tool, the exact whole line for the shell with no prefix, and Bash(<prefix>:*) alone with a prefix. A prefix that names no part of the line is refused: met. Tests: the_rules_kept_for_a_launch.node-test.ts (kept whole; one exact unit; prefix keeps only itself; Jupiter's two proofs; no part, another tool, a line not read plainly), the_owners_answer_route.node-test.ts, hear_an_acp_agents_asks.node-test.ts.
  2. A later call a kept rule names runs unasked, in the order gate, then the owner's rules plus kept rules, then the owner. Every deny and ask rule holds a kept rule back, /allow-always included, and so does a Write/Edit/WebFetch hold on the Developer's tools: met. Tests: the hold tests in the_rules_kept_for_a_launch.node-test.ts (r1 R1, both lists, five rules), and start_an_engine_member.node-test.ts ("one martha answer … allow-for-session ls covers the launch's next ls line…").
  3. A keep with no martha answer record behind it keeps nothing and says so: met. Tests: hear_an_acp_agents_asks.node-test.ts and the_owners_answer_route.node-test.ts; the owner-act read fix is pinned by the launch test.
  4. Nothing kept outlives the launch: met. Test: start_an_engine_member.node-test.ts "Done-when 4: …", in which no file holds the rule and the next launch asks the line again.
  5. Each line has a test, red first, and none reaches an outside host. 17 mutants were killed, the three named among them (holds-dropped, owner-act-dropped, shell-whole): met.
  6. No new check or job: met; the diff adds none.

Jupiter's r2 notes are filed as martha#344. Every line is met. Closing.

Done-when check against main `8efe2654` (Neptunus, 2026-12-01). Landed as `60ce2063` (PR 343, PASS r=2, Jupiter, Fable). Tip `4f25c8f3` is an ancestor of main. The lines are in comment 6934, and the r2 ruling is appended in comment 7088. 1. `martha answer <member> <key> allow-for-session [<prefix>]` answers `allow` and keeps, for the launch, the whole tool for a non-shell tool, the exact whole line for the shell with no prefix, and `Bash(<prefix>:*)` alone with a prefix. A prefix that names no part of the line is refused: met. Tests: `the_rules_kept_for_a_launch.node-test.ts` (kept whole; one exact unit; prefix keeps only itself; Jupiter's two proofs; no part, another tool, a line not read plainly), `the_owners_answer_route.node-test.ts`, `hear_an_acp_agents_asks.node-test.ts`. 2. A later call a kept rule names runs unasked, in the order gate, then the owner's rules plus kept rules, then the owner. Every deny and ask rule holds a kept rule back, `/allow-always` included, and so does a `Write`/`Edit`/`WebFetch` hold on the Developer's tools: met. Tests: the hold tests in `the_rules_kept_for_a_launch.node-test.ts` (r1 R1, both lists, five rules), and `start_an_engine_member.node-test.ts` ("one `martha answer … allow-for-session ls` covers the launch's next `ls` line…"). 3. A keep with no `martha answer` record behind it keeps nothing and says so: met. Tests: `hear_an_acp_agents_asks.node-test.ts` and `the_owners_answer_route.node-test.ts`; the owner-act read fix is pinned by the launch test. 4. Nothing kept outlives the launch: met. Test: `start_an_engine_member.node-test.ts` "Done-when 4: …", in which no file holds the rule and the next launch asks the line again. 5. Each line has a test, red first, and none reaches an outside host. 17 mutants were killed, the three named among them (holds-dropped, owner-act-dropped, shell-whole): met. 6. No new check or job: met; the diff adds none. Jupiter's r2 notes are filed as martha#344. Every line is met. Closing.
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#296
No description provided.