Skip to content

Give stall recovery a full timeout grace after the first nudge - #887

Merged
TheGreatAxios merged 6 commits into
mainfrom
cl-7651-stall-nudge-grace
Sep 11, 2026
Merged

Give stall recovery a full timeout grace after the first nudge#887
TheGreatAxios merged 6 commits into
mainfrom
cl-7651-stall-nudge-grace

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Records stallNudgeAt on the first stall nudge and waits through queued empty stall pings inside stallTimeoutMs without treating them as activity or restarting grace
  • Stops the leaf only once the grace elapses with no tool.done or turn reset

Verification

  • Focused tests for stall nudge grace passed
  • bun run check blocked by known pre-existing main failures

Fixes CL-7651

@linear-code

linear-code Bot commented Sep 10, 2026

Copy link
Copy Markdown

CL-7651

@TheGreatAxios
TheGreatAxios force-pushed the cl-7651-stall-nudge-grace branch from 56c3a42 to c125043 Compare September 11, 2026 00:55

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critic · Request changes

Director logic: first empty ping records stallNudgeAt and nudges; later pings inside stallTimeoutMs wait; salvage only after grace. tool.done and turn-boundary inference.done clear the flag.

Findings

  • Extra merge/release/rebased-parent commits land relative to the stacked base (merge-base 57226a72).
  • Two-dot vs stacked tip still ships package.json 0.3.19 → 0.3.20 and a ## [0.3.20] section under empty Unreleased.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Request changes

Stall-nudge grace after the first empty ping matches the stated policy, but this PR is not stacked on cl-7648.

Findings

  • GitHub base cl-7648-coalesce-tool-failure-interventions is not an ancestor of HEAD. Three-dot includes 0.3.20 release/merge plus rebased 885/886. Rebase onto current stacked tip before merge.
  • Stall grace has no Unreleased changelog bullet once the 0.3.20 dump is not the changelog hunk.

Notes

GitHub blocks request-changes on own PRs, so this is a comment with that verdict.

@TheGreatAxios
TheGreatAxios force-pushed the cl-7648-coalesce-tool-failure-interventions branch from 16a5570 to ff61185 Compare September 11, 2026 02:24
@TheGreatAxios
TheGreatAxios force-pushed the cl-7651-stall-nudge-grace branch from 95d79af to 846c02e Compare September 11, 2026 02:24
@TheGreatAxios
TheGreatAxios force-pushed the cl-7648-coalesce-tool-failure-interventions branch from ff61185 to 5e0241a Compare September 11, 2026 03:11
@TheGreatAxios
TheGreatAxios force-pushed the cl-7651-stall-nudge-grace branch from 846c02e to ac8aecc Compare September 11, 2026 03:11
@TheGreatAxios
TheGreatAxios force-pushed the cl-7648-coalesce-tool-failure-interventions branch 2 times, most recently from 7eaf4a5 to 382337e Compare September 11, 2026 03:17
@TheGreatAxios
TheGreatAxios changed the base branch from cl-7648-coalesce-tool-failure-interventions to main September 11, 2026 03:20
Models sometimes emit <tool_call><function=...> wrappers as
assistant text instead of real tool_call blocks. Catch that narrow
shape, give one corrective nudge per no-real-tool epoch without
counting it as incomplete-report narration, then fall through to the
existing report policy. Thinking blocks and arbitrary XML stay out of
scope; the epoch resets only on genuine tool activity or a parent
follow-up.
Queued empty stall pings that drain right after the first nudge used
to count as a second consecutive stall and stop the leaf immediately.
Record stallNudgeAt on the nudge, wait through pings inside
stallTimeoutMs without treating them as activity or restarting grace,
and stop only once the grace elapses with no tool.done or turn reset.
Queued empty continuations with no clock advance must nudge then wait,
not salvage. Architecture now describes stallNudgeAt instead of a
consecutive-ping streak.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7651-stall-nudge-grace branch from ac8aecc to f91fe4e Compare September 11, 2026 03:32
@TheGreatAxios
TheGreatAxios merged commit 4dd0d7c into main Sep 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant