Repository navigation
feat(acp): let goose dashboard chats share one ACP process, switch off by default - #37567
Conversation
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing a screenshot of the shipped Goose row. The screenshots show "Chats on the Goose harness" / "On: they share one program and use less memory…", and neither string exists anywhere in this revision's locale files. Evidence gaps
Notes
[UX-REVIEWED] 7c08c0c Description read[DESCRIPTION-READ] 00e67e24169483baeb65669e495774298bdce6f4ce9d3078e16a53808566adfe That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: goose is added to the existing chat-sharing route behind its own switch, which defaults off, and rendered evidence of the row is attached. Notes
[DESIGN-REVIEWED] 7c08c0c Description read[DESCRIPTION-READ] 4a3412099efec95eeca16665250bf0c8cff893d4321f529ef8e63fb888e980d8 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The goose switch is new and off by default, and so is the preview. The steer and era work is what makes sharing on that switch correct. One aliasing leftover. Notes
What this change shipsInventory (7 items) — 6 justifiedIntent: let users with several goose dashboard chats run them on one goose process to save memory and start-ups. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 7c08c0c Description read[DESCRIPTION-READ] e1d27c3113480667ea9dee552146a079ae54a1852a5bfca090f0328ced0abdde That sha256 names the PR description this verdict read. Recompute it with |
fb55b5d to
1c351fc
Compare
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
6fc5861 to
1512ca1
Compare
711c3ac to
983d66d
Compare
1512ca1 to
1553b7f
Compare
|
Dispositions for 1553b7f (also rebased onto #37540 at 983d66d):
|
983d66d to
a39ab66
Compare
1553b7f to
7c4ee40
Compare
a39ab66 to
43a82d8
Compare
7c4ee40 to
29f6cdd
Compare
29f6cdd to
76006bb
Compare
|
Disposition for GPT on 29f6cdd (MCP report ceiling): real. goose names no MCP-init method, so the drain could never end early and every shared goose start and resume waited the full 6s ceiling. Head 76006bb fixes it once in |
43a82d8 to
0ac9f65
Compare
76006bb to
b448ff7
Compare
|
GPT 6.1 F1 (chat_share.py:247, credential rotation joins a runtime holding the revoked key): real, fixed in b448ff7. goose_spawn_identity now also keys on the credential the child inherits from the environment (names ending _KEY, _KEY_ID, _TOKEN, _SECRET, _PROFILE), where goose looks a secret up first. Like codex_spawn_identity, the era is a random per-process token per distinct value, so it carries nothing of the key; secrets.yaml and the keyring are still not read, so a token refresh does not move it. Test: test_the_goose_era_follows_the_provider_not_its_secrets now asserts a rotated OPENAI_API_KEY gives a new era, the same key the same era, and the key text never appears in it. With the source change reverted, that test fails. |
371343c to
966ea1c
Compare
2cb4e5d to
3419d01
Compare
966ea1c to
4a130b8
Compare
3419d01 to
74cac51
Compare
4a130b8 to
4afc9c9
Compare
74cac51 to
4758c25
Compare
4afc9c9 to
576e70b
Compare
4758c25 to
ae2a5e9
Compare
576e70b to
39c59f0
Compare
|
First Principles and Opus on a054a54: both addressed in a6ddfbd.
|
|
Opus on a6ddfbd (a shared goose chat loses mid-turn steering): real, fixed in e7b2345. The shared Test: |
|
First Principles on 1979dd1 (a second parser for goose's steer frames): real, fixed in 373aaf2. The run-id frame and the steer echo are now read in one place, Test: |
…f by default
goose 1.57.0 keeps an agent per session in one `goose acp` process and
runs their turns in parallel, and session/close keeps the record that
session/load restores. GooseHarness (the previous step) reads each
session's mode back and holds it there, but no chat reached it.
goose joins ACP_BACKENDS_CHAT_RUNTIME_SHARING and
ACP_BACKENDS_SHARED_RUNTIME_ONLY_FOR_CHATS, so through the claude
routing a goose dashboard chat takes the shared runtime only when its
placement exists, and every other goose session keeps its own process
on GooseAcpClient. Its switch under ACP runtime sharing defaults off
("Goose chats", 13 languages).
A goose placement keys on goose's own provider identity
(goose_spawn_identity: GOOSE_PROVIDER and its *_HOST keys, the
environment over config.yaml), never on Kiro's sign-in and never on a
file goose rewrites while it runs (config.yaml as a whole, secrets.yaml).
No provider, or a config that cannot be read, gives a key nothing can
match. A Side Chat never shares: its origin is not the dashboard, and
GooseHarness.prepare_session refuses one too.
bolichen97
left a comment
There was a problem hiding this comment.
Reviewed head 7c08c0c together with #37646 (which carries this commit) and against the claude route from #37540 on main.
Switch off (the default): same as main. goose now joins ACP_BACKENDS_SHARED_RUNTIME_ONLY_FOR_CHATS, so a goose chat start asks resolve_chat_share first. With the preview off it returns sharing_disabled; with the preview on and the goose switch off it returns harness_switched_off. Both refuse before goose_spawn_identity is read (providers/chat_share.py), and the start falls through to the same AcpClient arm in acp_lifecycle.start. That is the path claude already takes. The AcpClient steer refactor (client_turn_control._note_active_run / _steer_echo_event now calling steering_wire.goose_announced_run / goose_steer_echo_id) reads the same frames the same way as the old inline code, including the empty messageId case.
Switch on: isolation. cwd, extra_env, model, effort, sandbox tier and agent are already in ChatRuntimeKey. The goose era adds the goose home, the provider, its *_HOST keys and the environment credentials, as random per-value tokens. A missing provider or an unreadable config fails closed. Side Chats are refused twice: at placement (origin) and in GooseHarness.prepare_session. Steer state (_goose_active_run_id, _goose_steers) lives on each AcpSessionHandle and is reset per turn. The run id comes from the session's own update stream. The steer is not sent while that session has an approval open. Cancel, approvals and the crash path all use the existing per-session AcpRuntime machinery. No new regex in product code.
Tests. Ran locally on this head: test_chat_runtime_sharing.py, test_chat_runtime_sharing_cleanup.py, test_config_all_settings.py, test_goose_shared_runtime.py, test_goose_shared_steer.py, test_goose_steer_request.py, test_harness_parity.py, test_session_handle_bindings.py, test_client_bindings.py, test_acp_harness_contract.py, test_claude_shared_runtime.py. Result: 1841 passed. CI on this head: all checks pass, none pending.
Non-blocking:
client_turn_control.py:352-353keeps_GOOSE_SESSION_STEERand_CLIENT_STEERING_REQUEST_METHODSas second names for the new table, as First Principles noted. A follow-up could importMETHOD_GOOSE_SESSION_STEER/OWN_STEERING_REQUEST_METHODSdirectly.- The process-wide
KIROCREW_SESSION_KEYlimit is stated under "Not a goal". Putting it in the switch's help text, as Design suggested, would tell users before they opt in.
Approving.
AI-assisted, sent by Bolin Review bot
Problem / Motivation
Goal: goose dashboard chats can share one goose process when the user turns on their switch under ACP runtime sharing; the switch is off by default.
Every goose chat starts its own
goose acpprocess, even though goose 1.57.0 serves many sessions in one process and runs their turns in parallel. The previous step (#37562) gave the shared runtime a goose harness that checks each session on its own, but no chat is routed to it.Why it matters
Each extra goose process costs memory and a start-up. Users who keep several goose chats open pay that per chat. The ACP runtime sharing preview already offers this for KAS, codex and claude; goose users have no switch.
Not a goal
GooseAcpClient._goose/unstable/session/steer, as a goose chat on its own process does.KIROCREW_SESSION_KEYin the shared goose process: the variable is process-wide, so the shared child carries none. Tools that read it inside a goose session on the shared process do not see their chat's key; each per-chat goose process (switch off) still gets its own.What changed (motivation -> approach -> change)
goose had a shared-runtime harness and no route to it -> route goose chats the way claude chats are routed, behind their own switch -> one set row each, a switch, and an account era that does not move while goose runs.
ACP_BACKENDS_CHAT_RUNTIME_SHARINGandACP_BACKENDS_SHARED_RUNTIME_ONLY_FOR_CHATS(agent_sdk/backends_sessions.py), soacp_lifecycle.startasks for a placement first and only a dashboard chat that gets one takes the shared runtime.CHAT_RUNTIME_SHARING_HARNESSESgainsgoose: False; the config help,configuration.mdandconfig-baseline.jsonname it.ChatRuntimeSharingHarnessRows.tsx), with its label and line in 13 languages (en-XAregenerated).goose_spawn_identity(providers/chat_share.py) keys on the goose home (the resolvedconfig.yamlpath,GOOSE_PATH_ROOT,HOMEand the XDG config, data and state dirs),GOOSE_PROVIDERand the provider's*_HOSTkeys (the environment overconfig.yaml, as goose resolves them), and the credential the environment hands the child (names ending_KEY,_KEY_ID,_TOKEN,_SECRET,_PROFILE), with the start'sextra_envover the gateway's. Like codex's, the era is a random per-process token per distinct value, so it carries nothing of a key. It does not read the wholeconfig.yamlorsecrets.yaml, which goose rewrites while it runs (the last model, a refreshed token), the trap claude and codex hit. No provider, or a config that cannot be read, gives a key nothing can match, so that chat does not share.side:origin is not the dashboard);GooseHarness.prepare_session(src/kiro_crew/acp/harness/goose.py) now takes the start'soptionsand refusesside_read_onlytoo._session/steering, which goose never advertises, so turning sharing on would have queued every mid-turn correction as the next turn. It now speaks goose's_goose/unstable/session/steer(session_handle_steering._steer_via_goose_request), asAcpClientdoes: it names the run goose announced onsession_info_update._meta.goose.activeRunId, is not sent while an approval is open, and reports the steer consumed on goose's_meta.goose.steerecho of the answer'smessageId; a steer goose drops with its run is requeued (steer_needs_loss_recovery). Both drivers read one table,OWN_STEERING_REQUEST_METHODS(acp/types.py).src/kiro_crew/config/sections_agent.py; strings inwebsite/src/i18n/locales/en.manual.jsonand the 12 other locale files; the chat-sharing member list indocs/system-specs/modules/runtime-ownership.mdnow names goose, and says why goose does not needchat_closes_on_departure: goose'ssession/closedrops that session's agent, and its stdio MCP servers die with it (rmcp'sTokioChildProcesskills the child on drop). The goose harness itself is refactor(acp): move the goose session code off AcpClient into GooseAcpClient #37535 and feat(acp): GooseHarness, goose on the shared runtime with per-session checks (not routed) #37562, already on main.Backwards compatibility
Compatible: the goose switch defaults off and the preview defaults off, so no goose session changes route unless the user turns both on.
Removes nothing: the diff adds a set member, a switch and its strings; the goose code that #37535 moved is already on main.
Tests
test/test_chat_runtime_sharing.py: goose shares only from the dashboard with its switch on, and is in the chats-only set and not inACP_BACKENDS_ACP_RUNTIME; aside:origin is refused; goose's switch is off until stored true; the loader fillsgoose: False.test/test_chat_runtime_sharing_cleanup.py: the goose era follows the provider and its host; a new model key or a rewrittensecrets.yamldoes not move it; the environment'sGOOSE_PROVIDERwins over the file; no provider, unparsable YAML or a non-mapping config fails closed.test/test_goose_shared_runtime.py: a Side Chat is refused byprepare_session; a goose placement keys on goose's own era.test/test_goose_shared_steer.py: a shared goose chat is offered a steer; the steer names the run goose announced and settles as consumed on goose's echo of thatmessageIdonly; with no run, or an older goose answering-32601, it is queued. With the handle's goose path reverted, all four fail.test/test_config_all_settings.py,website/src/test/chatRuntimeSharingHarnessRows.test.tsx(goose row off by default, writes its own key).test_claude_shared_runtime.py,test_acp_harness_contract.py,test/metrics/test_chat_runtime_share.py: all pass. mypy oversrc/kiro_crew/is clean.Proof: not provable -- other: a new set member and switch, default off; nothing outside the goose switch changes behaviour
Manual verification
Pod run with a real goose 1.57.0 (provider pointed at a local stub model), three dashboard chats in one project, ACP runtime sharing preview on. Chat A runs a 60 s shell command; chats B and C each send a message 5 s later. Measured mid-run with the goose switch off and on, same driver both times. The "on" run includes the restart fix in #37579 (without it, a chat whose first message overtook its pre-warm founded a second process).
Gateway log, switch on:
chat-runtime-sharing spawned runtime=<pid> tenants=1for the first chat, thenjoined runtime=<same pid>up totenants=3. Switch off:chat-runtime-sharing ineligible reason=harness_switched_off backend=gooseonce per chat. A shared goose warm-up turn takes about 7 s for now: the 6 s MCP no-report wait it pays (goose sends no MCP-init frame) is skipped in #37698, split out of this PR because it changes every codex session too; with it, the warm-up took about 1 s on the pod.Screenshots / video
Captured on the pod before the row label was renamed to match the other rows ("Chats on the Goose harness" then, "Chats using Goose" now); the switch and its behaviour are unchanged.
Settings > Feature previews, the goose row off by default:
The goose row switched on:
Gateway log, switch on: the three chats join one goose process:
goose processes and memory, switch off vs on:
38 s narrated demo (settings row, timing, log lines, process and memory table):
goose-chat-sharing-demo.mp4
Related Issues
Part of #5033
Step 3 of 3. #37535, #37562 and #37579 are on main. Stacked on #37540 (base
feat/claude-chat-sharing, the claude routing it reuses). The MCP no-report wait skip is split out to #37698.Checklist