Skip to content

fix(tools): disclose the agent wait timeout bound in the schema - #6850

Merged
Hmbown merged 4 commits into
codewhale-hq:mainfrom
asto18089:upstream/agent-wait-disclosure
Oct 6, 2026
Merged

Hmbown merged 4 commits into
codewhale-hq:mainfrom
asto18089:upstream/agent-wait-disclosure

Conversation

@asto18089

@asto18089 asto18089 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

agent(action="wait") blocks the turn behind a finite budget — 30s default, clamped to at most 120s — and reports timed_out: true alongside any already-settled children; results still arrive as completion sentinels. The until schema and the agents/wait tool description said none of this (the timeout_secs property 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_out receipt, with two tests pinning the copy to the runtime constants and cross-asserting the two constant sets agree (the constants were duplicated across tools/subagent and coord).

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 red
  • cargo clippy -p codewhale-tui --all-targets --all-features --locked

Disclosure: 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

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • No CHANGELOG.md changes

No-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.

`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>
@asto18089
asto18089 requested a review from Hmbown as a code owner October 5, 2026 11:51
@github-actions github-actions Bot added the contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm label Oct 5, 2026
@Hmbown Hmbown added this to the v0.10.2 milestone Oct 5, 2026
Hmbown added 3 commits October 5, 2026 12:31
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
Hmbown merged commit 36b28ad into codewhale-hq:main Oct 6, 2026
67 of 76 checks passed
Hmbown pushed a commit that referenced this pull request Oct 6, 2026
Picks up #6849 (SSE cancel projection) and #6850 (agent wait
disclosure). The parent-surface byte ceiling carries both sides:
wave's description rewrites (90,121B) plus #6850's +222B wait-bound
disclosure, with the standing Linux margin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants