Purpose (fix): a martha-engine member stays running after its crew tool server is spawned, instead of stopping with nothing logged #127

Closed
opened 2026-11-24 04:28:53 +00:00 by pluto · 2 comments
Member

Purpose (fix): a martha-engine member starts and stays running, instead of stopping right after the launch spawns the crew's tool server, with nothing in its log saying why.

Found on the 0.4.0 pilot (macula-io/martha#102) after macula-io/martha#124 was fixed; diagnosing it continues inside that package.

What happens, from the pilot workspace /home/rl/work/martha-pilot-ws, with the engine installed from the recorded commit 12574353 and the store path fix in place:

  • martha start Pluto, typed in a tmux pane (so the terminal check passes): Pluto started, pid ....
  • The engine's own log shows it reaching the crew tool server and stopping there. Its last lines:
{"level":"INFO","fields":{"message":"Created new ACP agent"},"target":"goose::acp::server_factory"}
{"level":"INFO","fields":{"message":"Skipping malformed extension config entry","key":"code_execution","error":"data did not match any variant of untagged enum ExtensionConfig"},"target":"goose::config::extensions"}
{"level":"INFO","fields":{"message":"Setting MCP process working directory: \"/home/rl/work/martha-pilot-ws\""},"target":"goose::agents::extension_manager::stdio"}
  • Nothing follows, there is no error or panic, the member is gone, and martha ls reports Pluto stopped deepseek-flash. The launcher process was still alive until it was stopped by hand.

What is known, and what is not. The crew tool server itself runs: the exact command and environment from the launch's config answer a harness run with stdin at EOF and exit 0. The engine binary is the fork's portable variant (--no-default-features --features portable-default), built at the recorded commit because libclang is absent on both hosts. Whether that feature set, the config entry the engine calls malformed, or something after the spawn is the cause has not been established yet.

Evidence, copied out of /run, which a reboot wipes: /home/rl/.claude/sessions/pluto-102/launch-a2627915/logs/cli/2026-11-24/20261124_052434.log (the engine's log above) and .../launcher.json. The launch's own config and secrets files were not copied.

Note on where tests run: msi00 has no node at all (node --version answers "command not found", and it has no asdf or nvm node), so a node test run happens on host00 under nice -n 10, not on the build box.

Refs macula-io/martha#102, macula-io/martha#124

Purpose (fix): a `martha-engine` member starts and stays running, instead of stopping right after the launch spawns the crew's tool server, with nothing in its log saying why. Found on the 0.4.0 pilot (macula-io/martha#102) after macula-io/martha#124 was fixed; diagnosing it continues inside that package. **What happens**, from the pilot workspace `/home/rl/work/martha-pilot-ws`, with the engine installed from the recorded commit 12574353 and the store path fix in place: - `martha start Pluto`, typed in a tmux pane (so the terminal check passes): `Pluto started, pid ...`. - The engine's own log shows it reaching the crew tool server and stopping there. Its last lines: ``` {"level":"INFO","fields":{"message":"Created new ACP agent"},"target":"goose::acp::server_factory"} {"level":"INFO","fields":{"message":"Skipping malformed extension config entry","key":"code_execution","error":"data did not match any variant of untagged enum ExtensionConfig"},"target":"goose::config::extensions"} {"level":"INFO","fields":{"message":"Setting MCP process working directory: \"/home/rl/work/martha-pilot-ws\""},"target":"goose::agents::extension_manager::stdio"} ``` - Nothing follows, there is no error or panic, the member is gone, and `martha ls` reports `Pluto stopped deepseek-flash`. The launcher process was still alive until it was stopped by hand. **What is known, and what is not.** The crew tool server itself runs: the exact command and environment from the launch's config answer a harness run with stdin at EOF and exit 0. The engine binary is the fork's portable variant (`--no-default-features --features portable-default`), built at the recorded commit because libclang is absent on both hosts. Whether that feature set, the config entry the engine calls malformed, or something after the spawn is the cause has not been established yet. **Evidence**, copied out of `/run`, which a reboot wipes: `/home/rl/.claude/sessions/pluto-102/launch-a2627915/logs/cli/2026-11-24/20261124_052434.log` (the engine's log above) and `.../launcher.json`. The launch's own config and secrets files were not copied. **Note on where tests run**: msi00 has no node at all (`node --version` answers "command not found", and it has no asdf or nvm node), so a node test run happens on host00 under `nice -n 10`, not on the build box. Refs macula-io/martha#102, macula-io/martha#124
Author
Member

The premise is wrong: the engine does not stop. What stops is the record that says it runs.

Re-run today at 04:38Z from the pilot workspace, node /home/rl/work/worktrees/martha-124-session-store-path/bin/martha start Pluto typed in a tmux pane, engine /home/rl/.local/bin/martha-installed martha-engine (portable build, sha256 3cd33f8e...), store path fix in place:

  • The pane printed Pluto started, pid 1676729 and nothing else. That line is printed only after driveTheEngine has opened the session, checked the mode, read the session's row back from the store and had the session's start taken by the entry, so the whole ACP exchange succeeded.
  • 2m44s later both processes were still alive: 1676618 node bin/martha start Pluto (the launcher, holding the terminal) and 1676729 martha-engine acp (its child, the member).
  • The engine's log again ends at the same six lines, the last being Setting MCP process working directory: "/home/rl/work/martha-pilot-ws". That is its normal INFO output, not a death: driven by hand over the same config, initialize and session/new are answered and the next line the engine writes is a provider WARN, and only because the provider is called.
  • martha ls said Pluto stopped deepseek-flash, martha stop Pluto said Pluto is not running, so nothing was stopped. (rc 0), martha restart Pluto said the same and exited 1.

The defect this points at

A martha-engine member's start writes no member launch record. The claude-code launch writes one (src/end_a_launch/end_a_launch.ts line 146, recordMemberLaunch(launchRecords, ...) into <state>/martha/<sha256 of root>/launches/<Member>.launch.json), and everything that asks whether a member runs reads that directory (launchesIn in src/attribute_a_cross_session_sender/attribute_a_cross_session_sender.ts, then isRunning in src/list_stop_and_restart_the_crew/list_stop_and_restart_the_crew.ts). Nothing under src/start_an_engine_member/ or src/launch_a_goose_member/ writes it, and no module in that path even names the launch records.

Runtime proof, same run: the pilot workspace's record directory (~/.local/state/martha/698b2498.../launches/, sha256 of /home/rl/work/martha-pilot-ws) held only a stale Neptunus.launch.json (pid 424402, gone) and no Pluto.launch.json at all, while /run/user/1000/martha-1000/a5fe24ad-.../launcher.json named the live member exactly (pid 1676729, start ticks 3291309, matching /proc/1676729/stat and the boot id).

So the member runs, and every owner-facing read of it says stopped: martha ls, the crew strip in the member's own window (Pluto: offline), martha stop, martha restart. The handover note on martha#102, "martha restart <member> refuses a stopped member", is this defect seen from the other side.

What is not established

  • Whether an engine member answers a turn at all. martha up --prompt says Pluto runs on martha-engine, so it is not given your first prompt, and martha start --prompt refuses for want of the member's window, so nothing in the CLI gives an engine member a first turn.
  • Whether the missing record alone is the whole of it. AStartOnItsHost.node_id is available to startOnTheEngine, so recordMemberLaunch could be called on that path; whether an engine member is meant to have a node id at all is a design question for whoever takes the fix.

Refs martha#102, martha#124. Evidence kept at ~/.claude/sessions/pluto-127-probe/ (evidence-not-running.txt, start-A.log, start-B.log, up.log, probe.py).

## The premise is wrong: the engine does not stop. What stops is the record that says it runs. Re-run today at 04:38Z from the pilot workspace, `node /home/rl/work/worktrees/martha-124-session-store-path/bin/martha start Pluto` typed in a tmux pane, engine `/home/rl/.local/bin/martha`-installed `martha-engine` (portable build, sha256 3cd33f8e...), store path fix in place: - The pane printed `Pluto started, pid 1676729` and nothing else. That line is printed only after `driveTheEngine` has opened the session, checked the mode, read the session's row back from the store and had the session's start taken by the entry, so the whole ACP exchange **succeeded**. - 2m44s later both processes were still alive: `1676618 node bin/martha start Pluto` (the launcher, holding the terminal) and `1676729 martha-engine acp` (its child, the member). - The engine's log again ends at the same six lines, the last being `Setting MCP process working directory: "/home/rl/work/martha-pilot-ws"`. That is its normal INFO output, not a death: driven by hand over the same config, `initialize` and `session/new` are answered and the next line the engine writes is a provider WARN, and only because the provider is called. - `martha ls` said `Pluto stopped deepseek-flash`, `martha stop Pluto` said `Pluto is not running, so nothing was stopped.` (rc 0), `martha restart Pluto` said the same and exited 1. ## The defect this points at A martha-engine member's start writes no member launch record. The claude-code launch writes one (`src/end_a_launch/end_a_launch.ts` line 146, `recordMemberLaunch(launchRecords, ...)` into `<state>/martha/<sha256 of root>/launches/<Member>.launch.json`), and everything that asks whether a member runs reads that directory (`launchesIn` in `src/attribute_a_cross_session_sender/attribute_a_cross_session_sender.ts`, then `isRunning` in `src/list_stop_and_restart_the_crew/list_stop_and_restart_the_crew.ts`). Nothing under `src/start_an_engine_member/` or `src/launch_a_goose_member/` writes it, and no module in that path even names the launch records. Runtime proof, same run: the pilot workspace's record directory (`~/.local/state/martha/698b2498.../launches/`, sha256 of `/home/rl/work/martha-pilot-ws`) held only a stale `Neptunus.launch.json` (pid 424402, gone) and no `Pluto.launch.json` at all, while `/run/user/1000/martha-1000/a5fe24ad-.../launcher.json` named the live member exactly (`pid 1676729`, start ticks `3291309`, matching `/proc/1676729/stat` and the boot id). So the member runs, and every owner-facing read of it says stopped: `martha ls`, the crew strip in the member's own window (`Pluto: offline`), `martha stop`, `martha restart`. The handover note on martha#102, "`martha restart <member>` refuses a stopped member", is this defect seen from the other side. ## What is not established - Whether an engine member answers a turn at all. `martha up --prompt` says `Pluto runs on martha-engine, so it is not given your first prompt`, and `martha start --prompt` refuses for want of the member's window, so nothing in the CLI gives an engine member a first turn. - Whether the missing record alone is the whole of it. `AStartOnItsHost.node_id` is available to `startOnTheEngine`, so `recordMemberLaunch` could be called on that path; whether an engine member is meant to have a node id at all is a design question for whoever takes the fix. Refs martha#102, martha#124. Evidence kept at `~/.claude/sessions/pluto-127-probe/` (`evidence-not-running.txt`, `start-A.log`, `start-B.log`, `up.log`, `probe.py`).
Author
Member

Closed: the purpose is met, as restated in comment 3443

The premise this issue was filed on was wrong, and the record says so in 3443: the engine does not stop. What stopped was the record that says it runs. The fix landed on main as PR 132, tip 1f323383, merged with --no-ff as dcd20230.

Confirmed on main, not on the branch. On a clone fast-forwarded to dcd20230, ./prove_the_relay_loads/run_the_tests_of_one_file.sh src/start_an_engine_member/start_an_engine_member.node-test.ts answers 25 tests, 25 pass, 0 fail. That includes "martha#127: an engine member that starts is in the launcher records as running, and its end takes the record away", the test that is red both ways without the fix. Terra ran the same file 25/25 on the merge result before landing, so the merge and main agree.

What the purpose asked for, now true on main. An engine member's start writes its member launch record: member name, node id, the engine's own pid, the checkout, and when it started. Its end takes the record away. Every read of whether a member runs (martha ls, the crew strip, stop, restart) reads a running member as running. The live proof is the pilot restart on macula-io/martha#102, where martha ls on the real workspace is what the owner reads.

The reviewer's three notes, recorded here so a merged branch does not take them with it. None changed the tip, which is why the landing ran on exactly the range that passed:

  1. This issue's Purpose line states the old premise. Closed as met as restated in 3443, not as originally written.
  2. The launch record is dropped after the launch's end closes, not before it.
  3. The five-field launch record literal now appears in two places, end_a_launch and the engine start. A later change to the record's shape has to find both.

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

## Closed: the purpose is met, as restated in comment 3443 The premise this issue was filed on was wrong, and the record says so in 3443: the engine does not stop. What stopped was the record that says it runs. The fix landed on main as PR 132, tip 1f323383, merged with `--no-ff` as dcd20230. **Confirmed on main, not on the branch.** On a clone fast-forwarded to dcd20230, `./prove_the_relay_loads/run_the_tests_of_one_file.sh src/start_an_engine_member/start_an_engine_member.node-test.ts` answers 25 tests, 25 pass, 0 fail. That includes "martha#127: an engine member that starts is in the launcher records as running, and its end takes the record away", the test that is red both ways without the fix. Terra ran the same file 25/25 on the merge result before landing, so the merge and main agree. **What the purpose asked for, now true on main.** An engine member's start writes its member launch record: member name, node id, the engine's own pid, the checkout, and when it started. Its end takes the record away. Every read of whether a member runs (`martha ls`, the crew strip, stop, restart) reads a running member as running. The live proof is the pilot restart on macula-io/martha#102, where `martha ls` on the real workspace is what the owner reads. **The reviewer's three notes, recorded here so a merged branch does not take them with it.** None changed the tip, which is why the landing ran on exactly the range that passed: 1. This issue's Purpose line states the old premise. Closed as met as restated in 3443, not as originally written. 2. The launch record is dropped after the launch's end closes, not before it. 3. The five-field launch record literal now appears in two places, `end_a_launch` and the engine start. A later change to the record's shape has to find both. Refs macula-io/martha#102, macula-io/martha#124.
pluto closed this issue 2026-11-24 06:52:34 +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#127
No description provided.