Repository navigation
t4: wait_for_reply - wake a thread when someone outside t4 answers (AI-143) - #26
Merged
Merged
Conversation
A thread names who it waits on and a check (any command that prints the reply once it exists, or an email sender/conversation); t4 runs it on an interval at no AI cost and posts one message on the reply, at the deadline, or when the check keeps failing. /api/t4/state lists the watches for the dashboard's 'Waiting on a reply' lane.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosNo All 64 scenario measurements
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
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.
A thread that has asked a customer, supplier or staff member calls
wait_for_replyand ends its turn. t4 runs its check (any command that prints the reply once it exists, or an email sender/conversation via t4'semail replies --since) every minute (5 min for waits over 3 h) at no AI cost, and posts one message: the reply, "NO REPLY ... by " at the deadline, or the error after 5 failed checks./api/t4/statelists the watches (replyWatches) for the dashboard's new "Waiting on a reply" lane (t4 repo PR).Why: usa-rs's Daily Data Triage asked Dolma in the dashboard's issue chat, scheduled three wakes to look (each a turn), and meanwhile asked the user "Anything else on this?" - it looked idle, not waiting on Dolma.
apps/server/src/t4/T4ReplyWatch.ts(+ test), thet4-reply-watchesjob, the MCP tool (always loaded),/api/t4/state.agentContextBudget.json: tool list 67,186 -> 69,016 bytes (the new tool).docs/t4/DESIGN.mdrow.Verified:
src/t4/,src/mcp/toolkits/t4/,AgentContextBudgetandMcpHttpServertests - 137 passed (5 new); server typecheck clean.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.