Purpose (fix): an engine member's tool call runs and is recorded, so the member no longer stops on its first result #143

Manually merged
terra merged 2 commits from pluto/141-engine-tool-name into main 2026-11-24 10:56:04 +00:00
Member

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

An engine member's first tool call ended the member the moment the owner allowed it: Pluto is stopped: the engine named no tool for call call_00_..., so its result cannot be recorded (forge macula-io/martha#141).

What was wrong. The launch merges a call's updates by its id, and a later update's _meta replaces the _meta the first one carried; this engine sends a live-output notification under _meta.toolNotification while a shell call runs, so by the time the result arrived, the merged record no longer held goose.toolCall.toolName and aResultOf read no name from it. The record from the failing run, kept while the call ran:

"meta": {"toolNotification": {"type": "live_output", "params": {"sequence": 1, "chunks": [{"stream": "stdout", "output": "PILOT-TOOL\n"}]}}}

What changes. The name is read when the call is heard for the gate — the permission request carries the call as its first update named it — and the result uses that name. The result's own record stays as the fallback.

The stand-in can now send one session/update between a call's answer and its result, as this engine does, and the new test covers exactly that shape. Its mutant — the result's own record read for the name — fails by name (drive_the_engine.node-test.ts).

Proof.

  • drive_the_engine.node-test.ts 12/12; the stand-in's consumers unchanged: hear_an_acp_agents_asks 13/13, the_calls_an_agent_ran 6/6, the_acp_client 28/28, answer_a_goose_call_by_the_entry 8/8, start_an_engine_member 26/26. Typecheck and eslint clean.
  • On the pilot, from this branch's bin/martha: start Pluto --prompt 'Run this shell command and reply with its output only: echo PILOT-TOOL'; the owner allowed the one ask with martha answer; the member kept running (martha ls: running), the store recorded the call and its result ({"stdout": "PILOT-TOOL", ...}), and it answered PILOT-TOOL. It then took the next turn the crew channel gave it and answered that too.

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

Purpose (fix): a member on the martha-engine host runs the tool its turn asks for, so the 0.4.0 pilot's engine member can be handed work and not only text. An engine member's first tool call ended the member the moment the owner allowed it: `Pluto is stopped: the engine named no tool for call call_00_..., so its result cannot be recorded` (forge macula-io/martha#141). What was wrong. The launch merges a call's updates by its id, and a later update's `_meta` replaces the `_meta` the first one carried; this engine sends a live-output notification under `_meta.toolNotification` while a shell call runs, so by the time the result arrived, the merged record no longer held `goose.toolCall.toolName` and `aResultOf` read no name from it. The record from the failing run, kept while the call ran: ``` "meta": {"toolNotification": {"type": "live_output", "params": {"sequence": 1, "chunks": [{"stream": "stdout", "output": "PILOT-TOOL\n"}]}}} ``` What changes. The name is read when the call is heard for the gate — the permission request carries the call as its first update named it — and the result uses that name. The result's own record stays as the fallback. The stand-in can now send one `session/update` between a call's answer and its result, as this engine does, and the new test covers exactly that shape. Its mutant — the result's own record read for the name — fails by name (`drive_the_engine.node-test.ts`). Proof. - `drive_the_engine.node-test.ts` 12/12; the stand-in's consumers unchanged: `hear_an_acp_agents_asks` 13/13, `the_calls_an_agent_ran` 6/6, `the_acp_client` 28/28, `answer_a_goose_call_by_the_entry` 8/8, `start_an_engine_member` 26/26. Typecheck and eslint clean. - On the pilot, from this branch's `bin/martha`: `start Pluto --prompt 'Run this shell command and reply with its output only: echo PILOT-TOOL'`; the owner allowed the one ask with `martha answer`; the member kept running (`martha ls`: running), the store recorded the call and its result (`{"stdout": "PILOT-TOOL", ...}`), and it answered `PILOT-TOOL`. It then took the next turn the crew channel gave it and answered that too. Refs macula-io/martha#102, macula-io/martha#134.
martha#141: the tool's name is the one read when the call was heard, so a live-output update cannot stop the member
Some checks failed
dependency advisories / advisories (pull_request) Has been cancelled
dependency advisories / node in . (pull_request) Has been cancelled
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Has been cancelled
dependency advisories / node in installer (pull_request) Has been cancelled
dependency advisories / node in . (container) (pull_request) Has been cancelled
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been cancelled
dependency advisories / node in installer (container) (pull_request) Has been cancelled
c4 model / c4-model (pull_request) Has been cancelled
c4 model / c4-model-1 (pull_request) Has been cancelled
CI / links resolve (pull_request) Has been cancelled
CI / gate coverage (pull_request) Has been cancelled
CI / structural floor (pull_request) Has been cancelled
CI / Martha's names are its own (pull_request) Has been cancelled
CI / no import cycle (pull_request) Has been cancelled
CI / the relay loads in the recorded host (pull_request) Has been cancelled
CI / the host drift check bites (pull_request) Has been cancelled
CI / the engine drift check bites (pull_request) Has been cancelled
CI / the posted text check bites (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
CI / the ring reaches the owner on the live run's tmux (pull_request) Has been cancelled
CI / workflows are valid (pull_request) Has been cancelled
CI / installer (pull_request) Has been cancelled
CI / nothing private (pull_request) Has been cancelled
CI / no test the base passed goes missing (pull_request) Has been cancelled
CI / the pictures change only with the version (pull_request) Has been cancelled
CI / no literal restates a defined value (pull_request) Has been cancelled
CI / every check runs in a job (pull_request) Has been cancelled
CI / every job has a timeout (pull_request) Has been cancelled
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Has been cancelled
standalone / the pinned Node is nodejs.org's (pull_request) Has been cancelled
e197f7a282
The engine sends a live-output notification under _meta.toolNotification while a shell call
runs, and the launch merges a call's updates by its id, so the _meta that first named the call
is replaced before its result arrives. aResultOf then read the result's own record, found no
goose.toolCall.toolName, and stopped the member for a result it could not name.

The name is now kept when the call is heard for the gate, and the result uses it. The stand-in
can send one update between a call's answer and its result, as this engine does, and the new
test's mutant (the result's own record read for the name) fails by name.
martha#141: the new test's live-output update is the failing run's own record, copied
All checks were successful
dependency advisories / advisories (pull_request) Successful in 0s
dependency advisories / node in . (pull_request) Successful in 15s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 14s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
c4 model / c4-model-1 (pull_request) Successful in 4s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 6s
dependency advisories / node in installer (pull_request) Successful in 17s
CI / Martha's names are its own (pull_request) Successful in 30s
CI / structural floor (pull_request) Successful in 43s
CI / no import cycle (pull_request) Successful in 30s
CI / the host drift check bites (pull_request) Successful in 1m30s
CI / the posted text check bites (pull_request) Successful in 15s
CI / the engine drift check bites (pull_request) Successful in 49s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 13s
CI / workflows are valid (pull_request) Successful in 15s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 33s
CI / the pictures change only with the version (pull_request) Successful in 18s
CI / no literal restates a defined value (pull_request) Successful in 1m0s
CI / every check runs in a job (pull_request) Successful in 15s
CI / every job has a timeout (pull_request) Successful in 14s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 30s
CI / installer (pull_request) Successful in 3m55s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 16s
CI / the relay loads in the recorded host (pull_request) Successful in 14m49s
CI / the clean-install proof removes its container (pull_request) Successful in 16m16s
CI / gate coverage (pull_request) Successful in 24m1s
6d265a0e71
The in-progress update it sends while a shell call runs was hand-spelled; it is
now the shape and text the #141 run's own record kept for its call, so the test
is a copy of what the engine sends and not a guess at it.
terra manually merged commit 955d19a997 into main 2026-11-24 10:56:04 +00:00
Sign in to join this conversation.
No reviewers
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!143
No description provided.