fix: restore provider and extensions for LRU-evicted sessions#7616
fix: restore provider and extensions for LRU-evicted sessions#7616wpfleger96 merged 1 commit intomainfrom
Conversation
5bd6742 to
aef6636
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aef6636684
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
aef6636 to
1f5d1eb
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f5d1eb8f9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
1f5d1eb to
ff28b37
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff28b37615
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
When a session is evicted from the AgentManager LRU cache and a new /reply arrives, get_or_create_agent was creating a blank agent with no provider or extensions. The session data is persisted in SQLite but was never read back on re-creation. Now get_or_create_agent checks for existing session state before falling back to the default provider. For evicted sessions with a persisted provider, it calls restore_provider_from_session and load_extensions_from_session concurrently — the same restoration pattern used by restart_agent_internal. Closes #7615
ff28b37 to
21dfc9c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21dfc9c19d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
* main: docs: add GOOSE_INPUT_LIMIT environment variable documentation (#7299) Merge platform/builtin extensions (#7630) Clean up stale references to removed components (#7644) fix: scope empty session reuse to current window to prevent session mixing (#7602) fix: prevent abort in local inference (#7633) Revert git patch for llama-cpp-2 (#7642) docs: update recipe usage step to reflect auto-submit behavior (#7639) docs: add guide for customizing the sidebar (#7638) docs: update Claude Code approve behavior and model list in cli-providers guide (#7448) fix: restore provider and extensions for LRU-evicted sessions (#7616) Restore goosed logging (#7622)
* origin/main: (107 commits) Merge platform/builtin extensions (#7630) Clean up stale references to removed components (#7644) fix: scope empty session reuse to current window to prevent session mixing (#7602) fix: prevent abort in local inference (#7633) Revert git patch for llama-cpp-2 (#7642) docs: update recipe usage step to reflect auto-submit behavior (#7639) docs: add guide for customizing the sidebar (#7638) docs: update Claude Code approve behavior and model list in cli-providers guide (#7448) fix: restore provider and extensions for LRU-evicted sessions (#7616) Restore goosed logging (#7622) feat: return structured {stdout, stderr} from shell tool with output schema (#7604) Improve custom provider creation experience (#7541) fix(scheduler): schedules added via CLI showing up in UI (#7594) chore: openai reasoning model cleanup (#7529) chore(deps): bump hono from 4.12.1 to 4.12.3 in /evals/open-model-gym/mcp-harness (#7585) chore(deps): bump minimatch from 10.1.1 to 10.2.3 in /evals/open-model-gym/suite (#7498) chore(deps): bump swiper from 11.2.10 to 12.1.2 in /documentation (#7368) Better network failure error & antrhopic retry (#7595) feat: make the text bar persistent and add a queue for messages (#7560) fix: outdated clippy command in goosehints (#7590) ... # Conflicts: # Cargo.lock # Cargo.toml # crates/goose-server/src/commands/agent.rs # crates/goose-server/src/main.rs # crates/goose-server/src/routes/reply.rs
Restores provider and MCP extensions for sessions re-created after LRU eviction. When
AgentManager::get_or_create_agentcreates a new agent for an evicted session, the new agent was a blank shell — the session data was persisted in SQLite but never read back, causing/replyto immediately fail with "Provider not set". This fix makesget_or_create_agentsession-aware.get_or_create_agent, load session from DB when creating a new agent; ifprovider_nameis persisted, callrestore_provider_from_sessionandload_extensions_from_sessionconcurrentlydefault_provideronly if no session state was found (preserving behavior for genuinely new sessions)Closes #7615