Files
buzz/crates
Michael Neale 45584a9c7a refactor(buzz-agent): hold the provider on buzz's side, not in goose's session row
I claimed the remaining session row was needed because update_provider
persists the model config there and goose reads it back for the context
limit. That was wrong, and the fix is straightforward: buzz builds the
provider and model config itself, so it can hold them.

New crate::model::SessionModel owns the pair. The turn reads the provider
and config from it instead of Agent::provider and
model_config_for_session, and session/set_model swaps it there rather
than calling update_provider. That removes the last write buzz makes to
goose's store.

The row itself still has to exist, but for a different reason than I
gave. Agent::add_extension_inner (goose agent.rs:1465) resolves each MCP
extension's working directory by loading the session, and fails setup if
the row is missing -- 'Failed to get session: Session not found'. I found
that by removing create_session and watching every tool-using test fail.
So: one row per session, created for extension setup, and zero writes
after it. Removing it needs goose to take the working directory as an
argument instead of reading it back.

Verified: a session with an MCP server, a tool call and two turns leaves
1 sessions row and 0 messages rows, still recalls turn 1 in turn 2, and
still advertises 9 catalog models. handtest.py --all 18/18; 87 unit + 21
integration green.

Co-authored-by: Michael Neale <michael.neale@gmail.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
2026-08-11 21:32:00 +10:00
..