Repository navigation
Return child session refusal details - #382
Open
ketchupz1999 wants to merge 1 commit into
Open
ketchupz1999 wants to merge 1 commit into
ketchupz1999 wants to merge 1 commit into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
recheck |
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.
By opening this pull request you agree to the Contributor License Agreement. On your first pull request a bot asks you to sign it with a one-line comment.
Closes #217.
When
child_session_createorchild_session_create_manywas refused at admission (full fleet queue, spend allowance, sandbox minutes, or a release closing admission), the agent got a generic failure or only an error code, so it could not tell whether to wait, retry or stop.childSessionRefusalResultinchild-session-tools.tsmaps those four known errors to one tool error: the existing user-facing message pluscodeand the numbers behind it (limit,spent/allowance,used/cap,retryable). Both create tools use it; unknown errors keep their current behaviour.messageand its other structured fields instead of collapsing a 429 into the error code.Tests, each failing against the old sources:
createandcreate_manybun test --max-concurrency=1 --timeout 30000 src/knowledge/gateway/child-session-tools.test.ts src/knowledge/gateway/child-session-delegation.test.ts: 15 pass. Rootbun run typecheck,bun test scripts/agent-docs.test.ts(5 pass) and the ratchet and persisted-names guards pass. Locally the fullbun run testgives 3547 pass and 8 fail, all in files this change does not touch (macOS tooling: spawn ENOENT, missinggfind, file URL encoding, loopback fetch).This change was prepared with AI assistance and reviewed by me.
Need help on this PR? Tag
@codesmith-botwith what you need.