Skip to content

feat(acp): let goose dashboard chats share one ACP process, switch off by default - #37567

Merged
chenmingwei23 merged 1 commit into
mainfrom
feat/goose-chat-sharing
Nov 16, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
feat/goose-chat-sharing

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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 acp process, 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

  • No change while the preview or the goose switch is off: every goose session keeps its own process on GooseAcpClient.
  • No Side Chat sharing: its goose home is a process-wide setting.
  • No new steer transport: a shared goose chat steers over goose's own _goose/unstable/session/steer, as a goose chat on its own process does.
  • No new routing: this reuses the claude routing in feat(acp): let claude dashboard chats share one ACP process, switch off by default #37540.
  • No per-session KIROCREW_SESSION_KEY in 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.

  • Sets. goose joins ACP_BACKENDS_CHAT_RUNTIME_SHARING and ACP_BACKENDS_SHARED_RUNTIME_ONLY_FOR_CHATS (agent_sdk/backends_sessions.py), so acp_lifecycle.start asks for a placement first and only a dashboard chat that gets one takes the shared runtime. CHAT_RUNTIME_SHARING_HARNESSES gains goose: False; the config help, configuration.md and config-baseline.json name it.
  • Switch. Settings > Developer > Feature previews > ACP runtime sharing gets a "Goose chats" row (ChatRuntimeSharingHarnessRows.tsx), with its label and line in 13 languages (en-XA regenerated).
  • Account era. goose_spawn_identity (providers/chat_share.py) keys on the goose home (the resolved config.yaml path, GOOSE_PATH_ROOT, HOME and the XDG config, data and state dirs), GOOSE_PROVIDER and the provider's *_HOST keys (the environment over config.yaml, as goose resolves them), and the credential the environment hands the child (names ending _KEY, _KEY_ID, _TOKEN, _SECRET, _PROFILE), with the start's extra_env over 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 whole config.yaml or secrets.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 Chat. Already refused by the placement (its side: origin is not the dashboard); GooseHarness.prepare_session (src/kiro_crew/acp/harness/goose.py) now takes the start's options and refuses side_read_only too.
  • Steer. The shared session handle only spoke _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), as AcpClient does: it names the run goose announced on session_info_update._meta.goose.activeRunId, is not sent while an approval is open, and reports the steer consumed on goose's _meta.goose.steer echo of the answer's messageId; 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).
  • Where. Config help in src/kiro_crew/config/sections_agent.py; strings in website/src/i18n/locales/en.manual.json and the 12 other locale files; the chat-sharing member list in docs/system-specs/modules/runtime-ownership.md now names goose, and says why goose does not need chat_closes_on_departure: goose's session/close drops that session's agent, and its stdio MCP servers die with it (rmcp's TokioChildProcess kills 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 in ACP_BACKENDS_ACP_RUNTIME; a side: origin is refused; goose's switch is off until stored true; the loader fills goose: False.
  • test/test_chat_runtime_sharing_cleanup.py: the goose era follows the provider and its host; a new model key or a rewritten secrets.yaml does not move it; the environment's GOOSE_PROVIDER wins 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 by prepare_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 that messageId only; 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).
  • Run locally one file at a time, plus test_claude_shared_runtime.py, test_acp_harness_contract.py, test/metrics/test_chat_runtime_share.py: all pass. mypy over src/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).

Goose switch goose processes Memory (RSS, all goose processes) A ends B answers C answers
Off 4 (1 per chat + 1 background) 629 MB 61.7 s 6.3 s 5.2 s
On 2 (1 for the three chats + 1 background) 324 MB 61.1 s 5.6 s 5.1 s

Gateway log, switch on: chat-runtime-sharing spawned runtime=<pid> tenants=1 for the first chat, then joined runtime=<same pid> up to tenants=3. Switch off: chat-runtime-sharing ineligible reason=harness_switched_off backend=goose once 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:

Goose row off

The goose row switched on:

Goose row on

Gateway log, switch on: the three chats join one goose process:

Gateway log

goose processes and memory, switch off vs on:

Processes and memory

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

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of 7c08c0ce0a6228f656e84875d33389378a4f5767 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • The Goose row's label and description. The diff adds "chat_runtime_sharing_harness_goose": "Chats using Goose" and "…_goose_desc": "On: new chats on this harness share one background program and use less memory. Off: each chat runs its own program.". shot-01 and shot-02 render different copy, and the KAS, Codex and Claude rows in those shots don't match the current strings either ("Chats on the KAS harness" vs the test's /Chats using Kiro Agent/). So the blind read judged copy that will not ship. The fix is to re-capture shot-01 (off) and shot-02 (on) of Settings › Feature Previews › ACP runtime sharing from HEAD 7c08c0ce.

Notes

  • The shipped description "…on this harness…" keeps the word the blind reader could not parse ("I don't know what a 'harness' is"). Use "On: new Goose chats share one background program and use less memory. Off: each chat runs its own program.".
  • shot-02 shows no save confirmation after the toggle ("Nothing on screen confirms the change was saved"). It's worth checking that the re-captured shot shows the row settled and has no save_failed state.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 7c08c0ce0a6228f656e84875d33389378a4f5767 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Inside the shared goose process, KIROCREW_SESSION_KEY is unset for every chat (stated under "Not a goal"). Any session-keyed tool that falls back to that variable loses its chat's key once the user turns the switch on. Put that limit in the switch's help text so users know before they opt in.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 7c08c0ce0a6228f656e84875d33389378a4f5767 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Item 6 — one consumer, generalized: _CLIENT_STEERING_REQUEST_METHODS: dict[str, str] = OWN_STEERING_REQUEST_METHODS and _GOOSE_SESSION_STEER = METHOD_GOOSE_SESSION_STEER stay on as second names for the new single table. That leaves 6 sites across 3 files (client_class.py, client.py, client_turn_control.py) still reading the old names. The shared handle also checks membership in the dict but then hardcodes goose's method, so the dict's values are never read there. Subtraction: delete both aliases in client_turn_control.py:352-353 and import OWN_STEERING_REQUEST_METHODS/METHOD_GOOSE_SESSION_STEER directly.

What this change ships

Inventory (7 items) — 6 justified

Intent: let users with several goose dashboard chats run them on one goose process to save memory and start-ups. This is an ADDITION.

  1. A "Chats using Goose" switch under ACP runtime sharing, off by default — justified
  2. With the preview and the switch both on, goose dashboard chats join one shared process — justified
  3. A goose chat joins a process only when it has the same goose home, provider, host and environment credential — justified
  4. A goose Side Chat is also refused when the shared session is prepared, not only at placement — justified
  5. A mid-turn steer in a shared goose chat reaches the running turn instead of being queued — justified
  6. goose's run-id and steer-echo parsing moved into one table and two readers that both drivers share — one consumer, generalized
  7. Config help, configuration.md, the runtime-ownership spec and 13 locales name goose — justified

[FIRST-PRINCIPLES-REVIEWED] 7c08c0c

Description read

[DESCRIPTION-READ] e1d27c3113480667ea9dee552146a079ae54a1852a5bfca090f0328ced0abdde

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@chenmingwei23
chenmingwei23 force-pushed the feat/claude-chat-sharing branch from fb55b5d to 1c351fc Compare November 15, 2026 08:43
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 7c08c0ce0a6228f656e84875d33389378a4f5767 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7c08c0c

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 7c08c0ce0a6228f656e84875d33389378a4f5767 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 7c08c0ce0a6228f656e84875d33389378a4f5767 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 7c08c0c

Verdict parsed from the review's SHA-scoped output markers for commit 7c08c0ce0a6228f656e84875d33389378a4f5767.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 7c08c0ce0a6228f656e84875d33389378a4f5767 false-positive: <reason, 20 to 500 characters>

@chenmingwei23
chenmingwei23 force-pushed the feat/goose-chat-sharing branch from 6fc5861 to 1512ca1 Compare November 15, 2026 08:51
@chenmingwei23
chenmingwei23 force-pushed the feat/claude-chat-sharing branch 2 times, most recently from 711c3ac to 983d66d Compare November 15, 2026 09:02
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 15, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/goose-chat-sharing branch from 1512ca1 to 1553b7f Compare November 15, 2026 09:19
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Dispositions for 1553b7f (also rebased onto #37540 at 983d66d):

  • fixed target=gpt+fable span=src/kiro_crew/acp/harness/goose.py:415 (operator-selected goose home)

GooseHarness.apply_spawn_env no longer removes GOOSE_PATH_ROOT; the child reads the goose home the operator chose, the same one goose_spawn_identity reads. Side Chats stay refused by placement and prepare_session.
test_the_process_seeds_the_required_mode_and_keeps_the_operators_home pins it.

  • fixed target=gpt span=src/kiro_crew/providers/chat_share.py:244 (environment-only endpoints)

goose_spawn_identity enumerates *_HOST keys from config.yaml and the environment, environment first, so an endpoint only the environment names, and its change, move the era.
test_the_goose_era_follows_the_provider_not_its_secrets covers an env-only OLLAMA_HOST and its change.

@chenmingwei23
chenmingwei23 force-pushed the feat/claude-chat-sharing branch from 983d66d to a39ab66 Compare November 15, 2026 09:26
@chenmingwei23
chenmingwei23 force-pushed the feat/goose-chat-sharing branch from 1553b7f to 7c4ee40 Compare November 15, 2026 09:37
@chenmingwei23
chenmingwei23 force-pushed the feat/claude-chat-sharing branch from a39ab66 to 43a82d8 Compare November 15, 2026 09:44
@chenmingwei23
chenmingwei23 force-pushed the feat/goose-chat-sharing branch from 7c4ee40 to 29f6cdd Compare November 15, 2026 09:54
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 15, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/goose-chat-sharing branch from 29f6cdd to 76006bb Compare November 15, 2026 10:12
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

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 AcpRuntime.__init__: _expect_mcp_reports is also False when the host's harness names no notification_aliases.mcp_init method (goose, claude-agent-acp and codex-acp send plain session/update only; kiro-cli and KAS keep the wait). Test: test_goose_shared_runtime.py::test_a_goose_session_on_the_shared_process_skips_the_mcp_report_ceiling, red without the change.

@chenmingwei23
chenmingwei23 marked this pull request as ready for review November 15, 2026 11:46
@chenmingwei23
chenmingwei23 requested review from buluoray and removed request for a team November 15, 2026 11:46
@chenmingwei23
chenmingwei23 force-pushed the feat/claude-chat-sharing branch from 43a82d8 to 0ac9f65 Compare November 15, 2026 11:58
@chenmingwei23
chenmingwei23 force-pushed the feat/goose-chat-sharing branch from 76006bb to b448ff7 Compare November 15, 2026 12:02
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

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.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 15, 2026
@github-actions github-actions Bot added the readiness: passed Eligible automated validation passed for the current revision label Nov 15, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/claude-chat-sharing branch from 371343c to 966ea1c Compare November 15, 2026 15:53
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 15, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/goose-chat-sharing branch from 2cb4e5d to 3419d01 Compare November 15, 2026 16:15
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 15, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/claude-chat-sharing branch from 966ea1c to 4a130b8 Compare November 15, 2026 16:32
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 15, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/goose-chat-sharing branch from 3419d01 to 74cac51 Compare November 15, 2026 16:39
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 15, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/claude-chat-sharing branch from 4a130b8 to 4afc9c9 Compare November 15, 2026 16:44
@chenmingwei23
chenmingwei23 force-pushed the feat/goose-chat-sharing branch from 74cac51 to 4758c25 Compare November 15, 2026 16:50
@chenmingwei23
chenmingwei23 force-pushed the feat/claude-chat-sharing branch from 4afc9c9 to 576e70b Compare November 15, 2026 16:58
@chenmingwei23
chenmingwei23 force-pushed the feat/goose-chat-sharing branch from 4758c25 to ae2a5e9 Compare November 15, 2026 17:01
@chenmingwei23
chenmingwei23 force-pushed the feat/claude-chat-sharing branch from 576e70b to 39c59f0 Compare November 15, 2026 17:14
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

First Principles and Opus on a054a54: both addressed in a6ddfbd.

  • First Principles (the _host_sends_mcp_init drain change reaches every codex session, undeclared): removed from this PR, with its test. It is now its own PR, perf(acp): skip the MCP no-report wait on hosts that never announce MCP servers #37698, which states that it changes every codex session and carries its own tests. Until it lands, a shared goose warm-up turn takes about 7 s; the description says so.
  • Opus (runtime-ownership.md member list omits goose): goose is added to the bullet (off by default, dashboard chats only, a Side Chat never shares). It also says why goose needs no chat_closes_on_departure: goose v1.57.0 session/close calls AgentManager::remove_session_if_loaded (crates/goose/src/execution/manager.rs), which drops that session's agent, and its stdio MCP servers run under rmcp 3.4.1 TokioChildProcess, whose ChildWithCleanup drop kills the child.

@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Opus on a6ddfbd (a shared goose chat loses mid-turn steering): real, fixed in e7b2345.

The shared AcpSessionHandle now speaks goose's _goose/unstable/session/steer (session_handle_steering._steer_via_goose_request), the way AcpClient does: it names the run id goose announced on session_info_update._meta.goose.activeRunId, is not sent while an approval is open, and reports EVENT_STEER_CONSUMED on goose's _meta.goose.steer echo of the answer's messageId. A steer goose drops with its run is requeued. supports_steer and steer() read one table, OWN_STEERING_REQUEST_METHODS in acp/types.py, which AcpClient now reads too.

Test: test/test_goose_shared_steer.py (offered; names the run and settles on the echo; dispatch reads the run id and the echo; no run or a refused answer queues). With the handle's goose path reverted, all four fail.

@chenmingwei23

Copy link
Copy Markdown
Contributor Author

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, acp/steering_wire.py (goose_announced_run, goose_steer_echo_id, re-exported by acp/types.py). AcpClient (client_turn_control._note_active_run, _steer_echo_event) and the shared handle (session_handle_steering._note_goose_run, _goose_steer_echo) both call them and keep only their own state.

Test: test_both_drivers_read_gooses_steer_frames_with_one_reader (test/test_goose_shared_steer.py) asserts all four call sites go through the shared readers, and that the readers' update kinds match UPDATE_SESSION_INFO and UPDATE_USER_MESSAGE_CHUNK.

…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 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-353 keeps _GOOSE_SESSION_STEER and _CLIENT_STEERING_REQUEST_METHODS as second names for the new table, as First Principles noted. A follow-up could import METHOD_GOOSE_SESSION_STEER / OWN_STEERING_REQUEST_METHODS directly.
  • The process-wide KIROCREW_SESSION_KEY limit 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants