fix(tools): disclose the agent wait timeout bound in the schema - #6850
Merged
Hmbown merged 4 commits intoOct 6, 2026
Merged
Conversation
`agent(action="wait")` blocks the calling turn behind a finite budget: 30s by default, clamped to at most 120s, with the receipt reporting `timed_out: true` alongside any children that already settled. The `until` schema description only said "returns when any one child settles", so the model planning around a wait could not know the block is bounded or what a timeout looks like — an undisclosed finite block reads as a hang when nothing settles. Disclose the bound and the timed_out receipt in the `until` description, and make the matching `agents/wait` tool description name `timeout_secs` with its default and maximum instead of an unexplained "the timeout". Two tests pin both faces to the runtime constants, so a drift in either the copy or the constants turns the other red. Signed-off-by: asto <asto18089@126.com>
The agent schema wait disclosure grows by exactly 222 UTF-8 bytes (265 to 487). Raise the existing reviewed catalog ceiling by that same amount, from 88,837 to 89,059, and retain the runtime measurement that catches unrelated growth. This is a test guard correction for the original contributor PR. Local exact-byte measurement verified; full CI remains required. Signed-off-by: Hunter Bown <hmbown@gmail.com>
Hmbown
approved these changes
Oct 6, 2026
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
agent(action="wait")blocks the turn behind a finite budget — 30s default, clamped to at most 120s — and reportstimed_out: truealongside any already-settled children; results still arrive as completion sentinels. Theuntilschema and theagents/waittool description said none of this (thetimeout_secsproperty alone carried "Default 30"), so a bounded block could read as a hang when nothing settled.Both faces now name the bound and the
timed_outreceipt, with two tests pinning the copy to the runtime constants and cross-asserting the two constant sets agree (the constants were duplicated acrosstools/subagentandcoord).Testing
cargo test -p codewhale-tui --lib wait_schema_text_discloses wait_bound_constants_agree— both tests format the runtime constants into the expected substring, so a copy change or a constant change alone turns them redcargo clippy -p codewhale-tui --all-targets --all-features --lockedDisclosure: schema/description strings, two
pub(crate)constant visibility widenings, and tests only; no runtime behavior change.Adapted from the Pinvou fork's surface-alignment audit (Pinvou/CodeWhale
6f780290f).Checklist
CHANGELOG.mdchangesNo-Issue: tool description and schema disclosure correction submitted directly as this contributor PR.
Maintainer correction: the canonical agent schema adds exactly 222 UTF-8 bytes (265 to 487). Commit d43c894 pairs this intended increase with the parent catalog ceiling (88,837 to 89,059); the runtime measurement still rejects unrelated growth. Exact byte delta and resulting remote blob verified locally; hosted CI on the final head remains required.