martha start <engine member> --acp: serve ACP upward on stdio for lazymartha; one ask, two answer paths, first wins #361
Closed
opened 2026-12-02 09:30:46 +00:00 by neptunus
·
1 comment
No Branch/Tag specified
main
ceres/367-crew-screen-up
terra/batch-337-237
uranus/251-fold-ci
saturnus/229-land-skip
titan/2-worktree-finish-branch-form
neptunus/232-repo-delete-clean
neptunus/230-force-push
uranus/111-gitlink-eisdir
venus/129-no-launcher-endpoint
saturnus/45-branch-move-head
jupiter/45-volatile-mesh-say
venus/8-land-on-any-host-2
titan/111-gitlinks
juno/040-host-rerecord
vesta/24-remove-github-sponsors
ceres/19-signin-probe
vesta/67-set-a-exports-git-dir
jupiter/47-status-clock
pallas/46-forge-ci-seam
juno/39-offline-private-scan
ceres/19-relay-end-written
venus/8-land-on-any-host
ceres/19-relay-frame
venus/28-budget-line
vesta/48-git-guard
ceres/47-hourly-status
terra/batch3-forge-b
pluto/23-declared-digests
ceres/318-friction-note-rebuilt
neptunus/check-private-digests
hygiea/5-tsx-typecheck
terra/batch2-forge
vesta/973-ask-proof-and-pr-base
jupiter/16-5-3-forge-repo-links
jupiter/check-private-stop
terra/batch3-forge
saturnus/1016-crew-mail
venus/999-refresh-modes
uranus/601-martha-forge-workflows
ceres/1041-work-graph
jupiter/957-gap-19-prompt-text
mercurius/987-stranger-text-gate
jupiter/check-private-stop-posted
pluto/1045-under-600
ceres/1041-contract-lines
pluto/1045-free-splits
diverged/hygiea/962-worktree-finish-owner-and-branch
ceres/967-provider-key
saturnus/1016-mesh-key
hygiea/962-worktree-finish-owner-and-branch
pluto/1045-cognitive-complexity
venus/999-refresh-modes-held-merge
pluto/1010-repo-numbers
pluto/1010-drift-numbers
terra/batch-terra-1121e
hygiea/916-provider-subscription-refusal
venus/999-brief-notice
hygiea/992-job-timeouts
jupiter/1016-crew-memory
terra/batch-terra-1121c
mars/1000-progress-off-tasks
uranus/989-confinement-v
hygiea/985-launcher-verbs-r2
mars/985-rename-handover-match
jupiter/979-guard-places
uranus/980-assign-model
ceres/959-wake-on-idle
uranus/989-confinement-u
juno/802-a-handle-on-my-run
pluto/989-confinement
terra/batch-terra-1120f
mercurius/987-rebased-keep
vesta/308-a-week-of-the-ledger-vesta
jupiter/984-gap-5-crew-state
hygiea/985-launcher-verbs
vesta/915-worktree-finish
terra/batch-terra-1120b
terra/981-review-fix
venus/review-917
final-tip
keep-318-tip
neptunus/1006-review
hygiea/976-the-ci-wait-by-run
terra/979-review-fix
terra/962-review
hygiea/601-row-174-the-engines-settings-watch
uranus/968-markers-r1
terra/981-review
vesta/308-a-week-of-the-ledger
terra/986-review
saturnus/511-up-config
hygiea-601-last3b
hygiea-601-last3
hygiea-601-pre-rebase
jupiter/batch-92
venus/venus-review-929
venus/venus-review-934
uranus/511-up-claude
saturnus/511-refusals
venus/906-token-fixture
jupiter/541-a-engine-start-clean
uranus/614-slice3-approved-skills-on
uranus/614-dw6-unrooted-skill-folders
venus/639-redact-stdin
venus/venus-review-913
neptunus/547-s6-kitty-launch
venus/venus-review-897
neptunus/907-review
venus/898-bundle-main-installer
hygiea/309-a-declared-goal
venus/614-engine-skills-2
neptunus/893-review
venus/639-night2
venus/venus-review-883
jupiter/541-c4-goose-call-answered-by-the-entry
venus/venus-review-866
venus/541-9a-slice-2
mercurius/614-engine-skills
titan/637-updater-switch
pluto/755-fewer-judge-starts
uranus/836-review
mercurius/846-posted-text
neptunus/828-review-r1
titan/801-hint-text
uranus/785-part-2
uranus/797-review
neptunus/830-review
venus/venus-review-837
uranus/724-reap
juno/784-the-launch-a-start-builds
neptunus/784-review-fix
juno/784-the-adapter-under-its-ceiling
diverged/juno/784-the-launch-a-start-builds
juno/784-the-adapter-back-under-origin
neptunus/694-review-fix
juno/732-the-cap-holds-b
neptunus/732-review-fix
titan/541-c3-hints-record
jupiter/host-2.1.328
juno/732-the-cap-holds
ceres/781-launcher-path
uranus/785-hint-files
ceres/724-part-2
neptunus/766-review-fix
uranus/755-hook-filter
jupiter/review-788
neptunus/745-review-fix
uranus/772-judge-env
jupiter/753-keys-declared-twice
pallas/784-launch-request
ceres/562-wire-the-scan
jupiter/744-split-prove-the-core
titan/541-c2-goose-gate-rows
pallas/765-approve-listing
pr-766-tip
terra/769-review
pallas/748-cycle-roots
uranus/uranus-batch-69
venus/venus-review-756
pr-733-head
neptunus/727-shell-quoting
venus/venus-review-738
pallas/694-a-trial-line-keeps-its-transcript
ceres/724-part-1-a-test-leaves-nothing-behind-v2
ceres/tests-leave-nothing-in-the-temp-directory
neptunus/541-2-4-3-the-recording
ceres/700-the-stand-in-reports-its-start
titan/541-6b-multi-host-review-model
uranus/uranus-733r1
scratch-703
titan/541-5-member-host
neptunus/541-2-4-2-the-tool-call
ceres/625-release-redraw
mars/541-acp-transport
ceres/batch-62-redraw
neptunus/541-6-host-model-vocabulary
heads/pr/672
pr/672c
heads/pr/673
juno/541-6-host-model-vocabulary
pr/668b
saturnus/612-no-answer-gets-a-second-launch
ceres/601-release-bump
heads/pr/625
heads/pr/668
pr/656b
heads/pr/666
pallas/611-init-layout
pr/654-r2b
heads/pr/656
pr/662-new
pr/654-new
pr/660-new
saturnus/632-retire-owner-guard
saturnus/602-own-config
ceres/638-read-shape
neptunus/541-10-recorded-goose-host
titan/611-init-layout
venus/244-member-half
titan/165-stand-in-case
pallas/177-tree-stat-record
ceres/314-volatile-path-note-clean
uranus/uranus-batch-48
jupiter/160-where-we-are
uranus/uranus-batch-46
juno/513-budget-r2
pallas/437-trial-builder-r2
pallas/437-trial-builder
saturnus/289b-shell
saturnus/289b-rules
saturnus/289-record-values
ceres/170-vouching-on-real-events
ceres/170-vouching-reaches-the-member
neptunus/136-member-memory
mercurius/4-claw-code-analysis
mercurius/5-scaffold-theme
v0.5.0
dry-run-v0.5.0
installer-v2.0.4
dry-run-installer-v2.0.4
v0.4.3
installer-v2.0.3
dry-run-installer-v2.0.3
dry-run-v0.4.3
v0.4.2
dry-run-v0.4.2
installer-v2.0.2
dry-run-installer-v2.0.2
v0.4.1
dry-run-v0.4.1
installer-v2.0.1
installer-v2.0.0
tested-locks
v0.4.0
ci-tools
v0.3.0
installer-v1.1.1
v0.2.0
installer-v1.1.0
v0.1.0
installer-v1.0.2
installer-v1.0.1
installer-v1.0.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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#361
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (feature): lazymartha can run an engine member as a child over ACP on stdio, and every ask the owner has to answer reaches lazymartha's queue. Martha keeps the gate, the owner's rules and the dashboard rows.
Raf, DECIDED 2026-12-02: "Yes, build it (Recommended); Real CLI in a pane (Recommended); Whole room (Recommended)". This supersedes DECIDED 2026-11-20 "let's go tmux".
Design: martha-ai/lazymartha#6, comment 8053 (Uranus; Jupiter PASS r=2). This issue is package 1 of that design: §1, §5 row 1, and r=2's "one ask, two answer paths, the first answer wins".
Refs martha-ai/lazymartha#6.
What it does
martha start <engine member> --acpkeeps today's engine path (the stand-in or martha-engine as an ACP child, the gate, the rules, the rows, the owner-answers socket) and changes only the owner's side. In place of the chat at the tab, it serves ACP on its own stdio:initialize,session/new(answers the member's engine session),session/prompt(a queued turn, as an owner's line at the tab), andsession/cancel(as Ctrl-C). It relays everysession/updatefrom the engine unchanged.session/request_permission, with once-only options (allow_once,reject_once) likeanswer_a_permission_once. The reply settles the ask through the sameasks.answerthe tab andmartha answeruse, and writes the sameowner_answers.jsonlline the tab writes.martha answerand the upward reply both reach the same held ask. Exclusivity is the existing in-memoryheldmap:close()deletes the key synchronously, so two answers cannot both apply. When the ask is settled any other way (martha answer, withdrawal, cancel), martha sends_martha/ask_settled {key, by}up, which is an ACP extension notification, so lazymartha drops it from its queue at once. A late upward reply is answeredanswered-nothingand changes nothing.--acpis allowed. Without--acp,NOT_A_TERMINALstill refuses.Threat model (before code)
Assets: the owner's yes on a tool call (a member's
shell/edit), and the gate's and rules' decisions.Actors: the owner (lazymartha's user), a member running as the same OS user, a remote party (none: stdio only, no socket, no port).
martha answeris refused inside a member (isStillRefusedFromInsideAMember, martha#601: "a member answering the owner's ask is a push to main without the yes").start --acpis a third way to answer, so it gets the same refusal:--acpinside a member is refused by the same check. This is a speed bump as NOT_A_WALL states, the same strength asanswertoday.ask-the-ownerasks go up. Arefuse-onceorrun-oncedecision never goes up and is never changed by the parent. A parent reply naming an unknown or already-settled key changes nothing. Allow-always (keep) is not offered upward in this package.permission:<toolCallId>@<sessionId>, never "the oldest", so a reply settles only the ask it names.heldmap, and tested as a race of the two paths.--acprun parses as JSON-RPC.!or/is refused as at the tab. Nothing from the parent reaches a shell.Out of scope: same-user forgery of state files (NOT_A_WALL, unchanged), and the room (package 4a).
Done when
martha start <engine member> --acpruns a turn over stdio:initialize,session/new,session/promptup; the engine'ssession/updates relayed;session/cancelcancels the turn. Tested with the ACP stand-in, with stdout holding only JSON-RPC lines.session/request_permissionwith its key. The parent'sallow_onceruns the tool andreject_oncerefuses it, each writing theowner_answers.jsonlline. A gatedenyand a rules-allowed call never go up.martha answer(the socket) and by the upward reply. Exactly one applies, the other getsanswered-nothing, and whenmartha answerwins the parent receives_martha/ask_settled. Both orders are tested.--acpis refused inside a member, with the same check and message asmartha answer; tested.--acpnothing changes: the tab chat andNOT_A_TERMINALas today (the existing tests stay green).ask-the-ownergoes up, first-wins, stdout-only-frames) each turn a test red; the wholenpm testis green before the push.martha upopens the crew screen, the new lazymartha pin, and the docs #367Closed. Landed in martha main
28b8909b(PR 363, in Terra's #361+#364 batch; reviewed by Jupiter).Done-when:
initialize,session/new,session/promptup,session/updaterelayed,session/cancelcancels it), with stdout holding only JSON-RPC lines. Tested inserve_acp_to_the_client_above.node-test.tsandstart_an_engine_member.node-test.ts, against the ACP stand-in.session/request_permission.allow_onceruns the tool andreject_oncerefuses it, each writing itsowner_answers.jsonlline. A rules-allowed call never goes up: tested, and the mutant is killed. A gatedenyopens no ask, so it takes the same path. (Not tested on its own; named in the PR.)answered-nothing, and whenmartha answerwins the parent gets_martha/ask_settled.--acpis refused inside a member, withmartha answer's check and message (..._an_owner_act_from_inside_a_member.node-test.ts).--acpnothing changes: the existing tests stay green.npm testbefore the push: 5976 tests, 1 fail. That failure is the unrelated martha#70 loop case under load, filed as #362.