Purpose (fix): an engine member's first tool call stops the member when the owner allows it #141

Closed
opened 2026-11-24 09:59:26 +00:00 by pluto · 2 comments
Member

Purpose (fix): a member on the martha-engine host can run the tool a first turn asks for, so the 0.4.0 pilot's engine member can be handed work and not only text.

What happens. On the pilot (macula-io/martha#102, main f085cc10, engine 1.60.0 at commit 12574353, declaration unchanged), a turn whose only request is one shell call ends the member the moment the owner allows it:

$ martha start Pluto --prompt 'Run this shell command and reply with its output only: echo PILOT-TOOL'
Pluto started, pid 177449
$ martha answer
Pluto  permission:call_00_R5uLzRULm8FZhkQC7PH96911@20261124_1  shell: shell · echo PILOT-TOOL
$ martha answer Pluto 'permission:call_00_R5uLzRULm8FZhkQC7PH96911@20261124_1' allow
Pluto: permission:call_00_R5uLzRULm8FZhkQC7PH96911@20261124_1 answered allow

and in the start's own output, at once:

martha: Pluto is stopped: the engine named no tool for call call_00_R5uLzRULm8FZhkQC7PH96911, so its result cannot be recorded
martha: A turn for Pluto failed: session/prompt (request 3) never answered: the agent's output ended

It repeats with two asks in one turn (shell: ls -la and tree); both listed by martha answer, both allowed, the same stop on the first result. Text-only turns are fine: --prompt 'Reply with exactly: FIRST-OK' answers FIRST-OK and the store row reads back.

Where it is read. aResultOf (src/launch_a_goose_member/drive_the_engine.ts:89-90) takes the tool's name from the result record alone: theEnginesNameOf({ ...title: '', heard: call }, naming) reads heard.meta along naming.meta_path (src/speak_acp_to_an_agent/answer_a_goose_call_by_the_entry.ts:52-56). A result this engine sends carries nothing at that path, so the name is undefined and the launch stops the member rather than recording the result. The name was known when the call was heard for the gate (aCalledToolOf, :59-63, the same lookup over the permission request), so the gap is that the launch does not carry that name forward from the call it heard to the result that follows.

What it costs at the gate. An engine member can be handed a text turn but not work: martha ls then reads it offline, and the ask channel itself is sound (martha answer lists each ask and answers it under a pty).

Done when. A member on the engine's host, given a first turn that asks for one shell call, runs it after the owner allows it, keeps running, and its next turn is taken. The store row records the call and its result, and the launch does not stop.

Refs macula-io/martha#102, macula-io/martha#134, macula-io/martha#541.

Purpose (fix): a member on the martha-engine host can run the tool a first turn asks for, so the 0.4.0 pilot's engine member can be handed work and not only text. **What happens.** On the pilot (macula-io/martha#102, main `f085cc10`, engine 1.60.0 at commit `12574353`, declaration unchanged), a turn whose only request is one shell call ends the member the moment the owner allows it: ``` $ martha start Pluto --prompt 'Run this shell command and reply with its output only: echo PILOT-TOOL' Pluto started, pid 177449 $ martha answer Pluto permission:call_00_R5uLzRULm8FZhkQC7PH96911@20261124_1 shell: shell · echo PILOT-TOOL $ martha answer Pluto 'permission:call_00_R5uLzRULm8FZhkQC7PH96911@20261124_1' allow Pluto: permission:call_00_R5uLzRULm8FZhkQC7PH96911@20261124_1 answered allow ``` and in the start's own output, at once: ``` martha: Pluto is stopped: the engine named no tool for call call_00_R5uLzRULm8FZhkQC7PH96911, so its result cannot be recorded martha: A turn for Pluto failed: session/prompt (request 3) never answered: the agent's output ended ``` It repeats with two asks in one turn (`shell: ls -la` and `tree`); both listed by `martha answer`, both allowed, the same stop on the first result. Text-only turns are fine: `--prompt 'Reply with exactly: FIRST-OK'` answers FIRST-OK and the store row reads back. **Where it is read.** `aResultOf` (`src/launch_a_goose_member/drive_the_engine.ts:89-90`) takes the tool's name from the result record alone: `theEnginesNameOf({ ...title: '', heard: call }, naming)` reads `heard.meta` along `naming.meta_path` (`src/speak_acp_to_an_agent/answer_a_goose_call_by_the_entry.ts:52-56`). A result this engine sends carries nothing at that path, so the name is undefined and the launch stops the member rather than recording the result. The name was known when the call was heard for the gate (`aCalledToolOf`, `:59-63`, the same lookup over the permission request), so the gap is that the launch does not carry that name forward from the call it heard to the result that follows. **What it costs at the gate.** An engine member can be handed a text turn but not work: `martha ls` then reads it `offline`, and the ask channel itself is sound (`martha answer` lists each ask and answers it under a pty). **Done when.** A member on the engine's host, given a first turn that asks for one shell call, runs it after the owner allows it, keeps running, and its next turn is taken. The store row records the call and its result, and the launch does not stop. Refs macula-io/martha#102, macula-io/martha#134, macula-io/martha#541.
Author
Member

A live-output update that arrives BEFORE the permission request still fails closed (pre-existing as of #143): the name is kept only from the request, so if the engine sends its notification first, neither the request nor the result carries the name and the member stops. Recorded here so a recurrence is recognised as this shape and not mistaken for a new one.

A live-output update that arrives BEFORE the permission request still fails closed (pre-existing as of #143): the name is kept only from the request, so if the engine sends its notification first, neither the request nor the result carries the name and the member stops. Recorded here so a recurrence is recognised as this shape and not mistaken for a new one.
Author
Member

Purpose met: yes. On main 955d19a9 (PR 143), the same command that stopped the member here now runs its tool call to the end and answers.

From /home/rl/work/martha-pilot-ws, the clone on 955d19a9, martha version 0.4.0, engine 1.60.0 unchanged, declaration unchanged:

$ node /home/rl/work/git.macula.io/macula-io/martha/bin/martha start Pluto --prompt 'Run this shell command and reply with its output only: echo PILOT-TOOL'
Pluto started, pid 1915902
$ node ... martha answer
Pluto  permission:call_00_ET_ranPrsZUOPHNjVEtOxXl0061@20261124_1  shell: shell · echo PILOT-TOOL
$ node ... martha answer Pluto 'permission:call_00_ET_ranPrsZUOPHNjVEtOxXl0061@20261124_1' allow
Pluto: permission:call_00_ET_ranPrsZUOPHNjVEtOxXl0061@20261124_1 answered allow
$ node ... martha ls
Pluto  running  /home/rl/work/martha-pilot-ws  since 2026-11-24T10:56:54.716Z  deepseek-flash
Neptunus  running  /home/rl/work/martha-pilot-ws  since 2026-11-24T09:59:39.601Z  claude-opus-5-5

What the member's store recorded for that turn (a copy of sessions.db with its -wal):

  • the call: {"name":"shell","arguments":{"command":"echo PILOT-TOOL"}}, id call_00_ET_ranPrsZUOPHNjVEtOxXl0061
  • the ask, answered allow_once
  • its result: "content":"PILOT-TOOL", "structuredContent":{"stdout":"PILOT-TOOL","stderr":"","exit_code":0}
  • the answer it gave: PILOT-TOOL

One line on what this turn does not show: its record carries no _meta.toolNotification, because the call finished before a live-output update landed, so the live-output path itself is proved by the unit test built from this issue's own recorded shape (drive_the_engine.node-test.ts, whose mutant fails by name), not by this live turn.

The pre-existing shape noted above still fails closed and is left as it is: a live-output update that arrives before the permission request.

Refs #102, #143.

Purpose met: yes. On main `955d19a9` (PR 143), the same command that stopped the member here now runs its tool call to the end and answers. From `/home/rl/work/martha-pilot-ws`, the clone on `955d19a9`, `martha version` 0.4.0, engine 1.60.0 unchanged, declaration unchanged: ``` $ node /home/rl/work/git.macula.io/macula-io/martha/bin/martha start Pluto --prompt 'Run this shell command and reply with its output only: echo PILOT-TOOL' Pluto started, pid 1915902 $ node ... martha answer Pluto permission:call_00_ET_ranPrsZUOPHNjVEtOxXl0061@20261124_1 shell: shell · echo PILOT-TOOL $ node ... martha answer Pluto 'permission:call_00_ET_ranPrsZUOPHNjVEtOxXl0061@20261124_1' allow Pluto: permission:call_00_ET_ranPrsZUOPHNjVEtOxXl0061@20261124_1 answered allow $ node ... martha ls Pluto running /home/rl/work/martha-pilot-ws since 2026-11-24T10:56:54.716Z deepseek-flash Neptunus running /home/rl/work/martha-pilot-ws since 2026-11-24T09:59:39.601Z claude-opus-5-5 ``` What the member's store recorded for that turn (a copy of `sessions.db` with its `-wal`): - the call: `{"name":"shell","arguments":{"command":"echo PILOT-TOOL"}}`, id `call_00_ET_ranPrsZUOPHNjVEtOxXl0061` - the ask, answered `allow_once` - its result: `"content":"PILOT-TOOL"`, `"structuredContent":{"stdout":"PILOT-TOOL","stderr":"","exit_code":0}` - the answer it gave: `PILOT-TOOL` One line on what this turn does not show: its record carries no `_meta.toolNotification`, because the call finished before a live-output update landed, so the live-output path itself is proved by the unit test built from this issue's own recorded shape (`drive_the_engine.node-test.ts`, whose mutant fails by name), not by this live turn. The pre-existing shape noted above still fails closed and is left as it is: a live-output update that arrives before the permission request. Refs #102, #143.
pluto closed this issue 2026-11-24 10:58:06 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
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#141
No description provided.