Repository navigation
feat(cache-warming): Warm after reportBlocked Turns - #3211
Merged
Merged
Conversation
A run that ends with reportBlocked stops right after that tool batch, like noReply. Start the normal idle period from that request too, outside gated Automation runs, and record it with turn_ending blocked. Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
marked this pull request as ready for review
November 11, 2026 21:37
BYK
approved these changes
Nov 11, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 654a208. Configure here.
BYK
added a commit
that referenced
this pull request
Nov 11, 2026
…ed (#3218) Follow-up to #3211 ([Bugbot comment](#3211 (comment))). `answerToolEnded` got `behavior.gated`, and the recorder stored no ending for a gated Turn. Child-agent Turns are gated, and only gated Turns have `reportBlocked`. So the `reportBlocked` ending never applied, and a child agent's `noReply` started no idle period. Now `answerToolEnded(toolName)` has no gate argument. The recorder skips only Automation runs, using the Prompt mode (`automation`) that it already gets in its `SystemPromptKey`. A child agent's `noReply` or `reportBlocked` starts an idle period like any other Turn. The answer-tool case in `cache-warming-segments.test.ts` covers both endings: a child-agent Turn warms and records the gap, and an Automation run schedules nothing. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Ac630b15e2afdd86b09f440d1fe3ff152 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Ac630b15e2afdd86b09f440d1fe3ff152) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ac630b15e2afdd86b09f440d1fe3ff152/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>
23 tasks done
BYK
added a commit
that referenced
this pull request
Nov 20, 2026
In a long design conversation, Junior wrote its own Plan item ids in replies as `#1914`, `#3211` and `#2673`. Readers took them for getsentry/junior PRs. One of them, #3211, is a real and unrelated PR. Plan ids are global numbers, and the plan blocks rendered them as `- #<id> (...)`, so the model copied the GitHub `#N` form. Two fixes: - **Model-facing ids are now `TODO-<n>`.** `updatePlan` and `listAgents` results, `removed_ids`, `replaced_person_changes`, and the `<plan>` and `<plan-delta>` blocks render `TODO-12`. `updatePlan` accepts only that form, so a bare `12` or `#12` fails with a hint. Storage, the REST API, and the dashboard keep numeric ids. - **Planning rule:** Plan item ids are only for `updatePlan`. Do not write them in a reply, a PR, an issue, or a message to a person. Name the work instead. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:local%3Aweb%3Aaf43b9a62d41482f5a8b4154 --> -- [View Session](https://junior-prod.sentry.dev/conversations/local%3Aweb%3Aaf43b9a62d41482f5a8b4154) [[Sentry]](https://sentry.sentry.io/explore/conversations/local%3Aweb%3Aaf43b9a62d41482f5a8b4154/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>
This branch was successfully deployed
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.

Cause. A run that ends with
reportBlockedstops right after that tool batch, asnoReplydoes. No final response comes, so the Turn starts no idle period. A child agent that ends blocked never warms, even though its parent often answers.Change
noReplyEnded()becomesanswerToolEnded(toolName, gated). The agent calls it for every answer tool that ends the run. The recorder maps the core tool names:noReplygivesno_reply,reportBlockedgivesblocked. Gated Automation runs still start no idle period. The decision now lives in the recorder, so the scenario test covers it.stop()starts the idle period from thereportBlockedrequest, the same way it does fornoReply(feat(cache-warming): Warm after a Turn that ends with noReply #3162). That request holds the prefix that the next Turn reads: the next request appends the assistant tool call, its result and the new input to it.app.cache_warming.turn_endinggets a new value,blocked. That keepsno_replymeaningnoReplyonly. It is documented in therunCacheWarmupJSDoc.Tests (
cache-warming-segments.test.ts): the #3162 case now runs for bothnoReplyandreportBlocked.reportBlockedmapping, thereportBlockedcase fails.No UI change.
via @BYK.
--
View Session [Sentry]