mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
6ffcfe60fa
Add a new SQLite column on the `sessions` table that stores client-set system-prompt state (the `Set` override and any `Append` extras whose key starts with `client_`). The ACP `_goose/unstable/session/system-prompt/set` handler writes through to the session record after each successful mutation; `spawn_agent_setup` rehydrates the agent's PromptManager from that record before signalling ProviderReady, so loaded sessions resume with the same persona / system prompt the client last sent. LoadSessionResponse._meta gains a `clientSystemPrompt` map of key -> sha256-short fingerprints so clients can skip the redundant `set` RPC on the first prompt of a loaded session when the value hasn't changed. Schema bumped to v14 with an idempotent ALTER TABLE migration; old sessions without the column read as None. Server-managed Append keys (recipe, final_output, additional, hints_*) are explicitly excluded from persistence — they're rebuilt at agent-spawn time from other session state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>