Repository navigation
Conversation
…entence When the store could not be read for a child agent's call, the call now fails with "<tool> could not reach its agent" and the log keeps the store's error with the app_id, session and tool. The model, the tool_call frame and the stored result said only "the tool failed" before, so they now name the tool. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Closing: a failed read during a delegation already gives the model, the tool_call frame and the stored item fixed words on main since #2499 ( |
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.
When the store could not be read for a child agent's call (its config, a sibling's config, or a connector definition), the model, the
tool_callframe and the stored result said only "the tool failed". This PR makes that call fail with "ask_kid could not reach its agent", naming the tool, and logs the store's error withapp_id,sessionandtool. A refusal (an unknown child, the sensitive-connector rule) keeps its own error and its "the tool failed" answer, as onmain.How it works
ask_kid could not reach its agentapp_id,session,toolTestAChildWhoseConfigCannotBeReadIsUnreachable,TestAFailedReadIsLoggedWithTheSessionsIdsTestAChildWhoseSiblingCannotBeReadIsUnreachableTestAChildWhoseConnectorDefinitionCannotBeReadIsUnreachableask_kid was stopped before it finishedTestAReadCutShortByTheCallEndingIsThatEndingthe tool failed, error text as onmainmainTestAChildThatNoLongerExistsKeepsItsOwnRefusalthe tool failed, error text as onmainmainTestADelegationTheSensitiveRuleRefusesKeepsItsOwnRefusalWhat was already true on
mainSince #2499,
harness.ToolFailuretells the model, the frame and the stored result "the tool failed" for any tool error not marked correctable, so no store text reached them before this PR either. The new tests check this too (readsNothingOf) and pass onmain. What fails onmainis the sentence: it said "the tool failed" for a read the router could not make, and now says which tool and that the agent could not be reached. The sentence is markedharness.Correctableso the model reads it as written.Not changed
The error of the child's own run (
manager.Run,run.Failed) still goes up as it is, so the model reads "the tool failed" for it.sensitive.exposureOfstill returns the store's error to its callers, andchildRunneris the one that answers for it.🤖 Generated with Claude Code
Mutations and commands
Each mutant is applied to
child_agents.go, run withgo test -tags integration ./internal/session/ -run TestChildConversationSuite, and restored....ConfigCannotBeReadIsUnreachable,TestAFailedReadIsLoggedWithTheSessionsIds,TestAReadCutShortByTheCallEndingIsThatEnding...SiblingCannotBeReadIsUnreachable,...ConnectorDefinitionCannotBeReadIsUnreachableTestAReadCutShortByTheCallEndingIsThatEndingTestAReadCutShortByTheCallEndingIsThatEndingapp_id/ nosession/ notool/ noerror/ warn instead of errorTestAFailedReadIsLoggedWithTheSessionsIdsErrNoAgentConfigno longer excluded from the read failureTestAChildThatNoLongerExistsKeepsItsOwnRefusal13 of 13 killed (
mutinv.shlisted 5 lines, all covered by the first six rows).Base probe: with
child_agents.gofromd734ca0bb, the three read tests and the log test fail (model, frame and stored result read "the tool failed"); both controls pass.Run:
go test -tags integration ./internal/session/and-run TestChildAgentsSuite ./internal/api/pass;go test ./internal/session/passes;go vetwith and without theintegrationtag is clean.