Fix frontend extension session state and tool routes#8464
Open
sunilkumarvalmiki wants to merge 1 commit intoaaif-goose:mainfrom
Open
Fix frontend extension session state and tool routes#8464sunilkumarvalmiki wants to merge 1 commit intoaaif-goose:mainfrom
sunilkumarvalmiki wants to merge 1 commit intoaaif-goose:mainfrom
Conversation
Signed-off-by: sunilkumarvalmiki <g.sunilkumarvalmiki@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the two open frontend-extension regressions around session state and app-facing tool routes.
Fixes #8425
Fixes #8426
What changed
Agent::list_tools()instead of only appending them during prompt preparation/agent/call_toolwith a clear424 Failed Dependencyresponse instead of a generic500Root cause
Frontend extensions were being flattened into in-memory tool state, but not tracked as extension configs.
That meant session persistence serialized only backend-managed extensions,
/agent/toolsmissed frontend tools, and/agent/call_toolbypassed the agent-level frontend check and fell through to a backend-only dispatch path.Behavioral impact
After this change:
/sessions/{id}/extensionsincludes frontend extensions added through/agent/add_extension/agent/toolsexposes frontend tools for the session/agent/call_toolfails explicitly for frontend tools with a client-facing explanation instead of a 500Validation
cargo buildcargo test -p goose --test agentcargo test -p goose-serverjust generate-openapicargo clippy --all-targets -- -D warningsLive repro after fix
Using a local
goosedinstance with afrontend-e2eextension that providesfrontend__echo:/sessions/{id}/extensionsincludedfrontend-e2e/agent/toolsincludedfrontend__echo/agent/call_toolreturned:{"message":"Tool 'frontend__echo' is provided by the frontend and must be executed by the frontend host"}with
HTTP/2 424.