Skip to content

fix(desktop): render goose's system prompt in the activity log - #4182

Open
sumit-m wants to merge 1 commit into
block:mainfrom
sumit-m:acp-goose-system-prompt-card
Open

fix(desktop): render goose's system prompt in the activity log#4182
sumit-m wants to merge 1 commit into
block:mainfrom
sumit-m:acp-goose-system-prompt-card

Conversation

@sumit-m

@sumit-m sumit-m commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Problem

Goose agents never show a System prompt card in the agent activity log. Every other runtime does.

The transcript builder turns a session/new request into that card by reading params.systemPrompt. Goose does not receive its system prompt that way — buzz-acp sends it as a separate request immediately after session/new:

// crates/buzz-acp/src/acp.rs — session_set_goose_system_prompt
self.send_request(
    "_goose/unstable/session/system-prompt/set",
    json!({ "sessionId": session_id, "mode": "append", "key": "buzz", "text": text }),
)

agentSessionTranscript.ts has no branch for that method, so the request is observed but never rendered. The result is that a goose agent's base prompt, persona, team instructions, core memory and canvas are invisible in the UI — there is no way to see what the agent was actually told.

Fix

Read params.text from that request and upsert the same "System prompt" metadata item the session/new path already produces.

The request lands before the session's first turn, so reusing the existing acpSource: "session/new" places the card in the same standalone slot at the head of the session run — no changes to grouping or presentation.

Notes

  • Purely additive: one new else if branch. No existing path changes, and nothing renders differently for runtimes that already worked.
  • Goose falls back to user-message framing when the custom method is unsupported (goose_system_prompt_supported == Some(false)). That path is untouched — [Base] continues to appear in Prompt context as before.
  • The Rust side already pins the request shape (goose_system_prompt_request_uses_append_contract asserts method, mode, key and text on the bytes written), and write_ndjson observes every outbound message, so the frame this branch consumes is guaranteed to be emitted.

Test

One new test asserting a goose system-prompt request produces exactly one card, with the same ["Base", "System"] sections, outside any turn bucket.

pnpm test 3886 passing, pnpm typecheck clean, biome check clean.

Not verified against a live goose agent — I have no goose model configured. The chain is covered by tests on both sides of the wire.

Goose delivers standing context through a separate request after session/new, so
it produced no System prompt card at all. All three delivery routes now render
the same card in the same place.

Signed-off-by: sumit-m <33051892+sumit-m@users.noreply.github.com>
@sumit-m
sumit-m requested a review from a team as a code owner August 1, 2026 21:22
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.

1 participant