fix: restore final_output_tool when agent is recreated after LRU eviction - #10793
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b853a8bc97
ℹ️ 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".
| if let Some(recipe) = &session.recipe { | ||
| agent | ||
| .apply_recipe_components(recipe.response.clone(), true) | ||
| .await; |
There was a problem hiding this comment.
Render recipe parameters before restoring response schema
This restores the final-output tool from the raw session.recipe.response, but ACP recipe sessions persist the original template recipe and store the selected values separately (new_session.rs stores recipe and user_recipe_values; apply_session_recipe later re-renders before applying). If a valid schema templates a field name such as "{{ output_field }}", any AgentManager-only restore path after eviction advertises and validates the literal placeholder schema instead of the user's rendered schema, forcing the model to return the wrong JSON shape. Please render the stored recipe with session.user_recipe_values before installing the final output tool.
Useful? React with 👍 / 👎.
* origin/main: (58 commits) Handle MCP tool list change notifications fix: restore final_output_tool when agent is recreated after LRU eviction (#10793) feat(ui): bring back make sidebar resizable with drag handle and persisted width (#10795) docs: document auto-injected GOOSE_SHELL flags (#10759) feat: surface output-token-limit info (#10831) fix(desktop): avoid O(n²) cloning during session load (#10665) feat: add interactive menu for single select elicitations (#10327) fix(acp): prefix child stderr log target so it passes the default goose=info filter (#10901) chore (codex-acp): migrate to @agentclientprotocol/codex-acp (#10923) style: add dark mode inline code styling for message bubbles (#10861) docs: clarify macOS sandbox feature was removed in post-v1.25.0 cleanup (#10900) fall back to static model list only for non-models payloads (#10189) Remove CLI project support (#10838) fix(anthropic): add claude-sonnet-5 and claude-fable-5 to known models list (#10865) fix: stdio extensions silently skipped when name missing or env: used in config (#10773) feat(desktop): show session metadata on sidebar chat hover (#10663) fix(serve): start scheduler at startup instead of first ACP connection (#10766) fix: respect disabled builtin extensions (developer) at session start (#10223) fix: parse PyPI requirements for OSV checks (#10510) fix(telegram): contain voice file extensions (#10456) ... # Conflicts: # Cargo.lock # crates/goose/src/agents/extension_manager.rs # crates/goose/tests/mcp_replays/npx-y@modelcontextprotocol_server-everything@2026.1.14
Fixes #10784
Summary
Restores final_output_tool when an agent is recreated after being evicted from the LRU cache in create_agent_locked. Previously, only MCP extensions were reloaded, the recipe's response schema was silently dropped, so the recipe__final_output tool never appeared in requests sent to the model.
Testing
manaul and unit