Skip to content

fix(claude): mark a follow-up cancelled by the dead-login Stop as not run (STA-18495) - #49349

Merged
Jinwoo-H merged 1 commit into
mainfrom
sta-18495-auth-stop-settles-followup
Nov 26, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
sta-18495-auth-stop-settles-followup

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes STA-18495.

When Claude's login is dead or denied, Orca stops Claude's retry loop automatically. That Stop cancels the whole queue, including a follow-up sent during the retries, but it skipped the settlement callback the manual Stop passes. The cancelled follow-up then stayed "sending" until the chat was reopened.

The automatic Stop now passes the same onDispatchSettledLate callback as the manual Stop, so the cancelled follow-up is marked not run right away.

Test

claude-structured-event-delivery.test.ts: a 401 retry at attempt 3 with a queued follow-up settles the follow-up as rejected and not run. Fails without the fix.

Performance

No change. One extra callback, called only for follow-ups the dead-login Stop cancels.

Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​54 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​54
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2

@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Auth-retry cancellation now receives the session ID and event-delivery dependencies. It forwards late dispatch settlements to the optional onDispatchSettledLate callback. A test checks that a 401 api_retry event resolves the replay promise to null, requests cancellation, reports the follow-up as rejected and unrun, and clears the dispatch-waiter list.

Merge Risk: Minimal · up to 39dee

This change marks a follow-up as not run when Claude's automatic Stop cancels the queue after a dead login, so it no longer stays in a sending state. No actionable merge risk was identified.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description follows the template's core intent. It explains what changed and why, gives a test note stating that the test fails without the fix, and includes a Performance statement. It links the … Add an ELI5 section in plain language. Add a Risk section that gives a Level (Low, Medium, or High), names the riskiest part, and describes how to revert. Add a Visual Proof section that states N/A with a reason, since this is a behavior ch…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the main change: a follow-up cancelled by the dead-login automatic Stop is now marked as not run. The raw summary confirms the change passes the same late-settlement callback used by t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a follow-up cancelled by the dead-login automatic Stop is now marked as not run. The raw summary confirms the change passes the same late-settlement callback used by the manual Stop, and the title's scope matches that change. The title is 85 characters, which is slightly long but still specific and readable.

Full details: Description check

Explanation

The description follows the template's core intent. It explains what changed and why, gives a test note stating that the test fails without the fix, and includes a Performance statement. It links the issue (STA-18495) only as 'Fixes STA-18495' and omits the template's 'Fixes #' issue link format. It has no ELI5 section, no Visual Proof section (or an N/A reason), no Risk level, and no Testing checklist ticks. Several template sections are missing, but the core technical content is present.

Resolution

Add an ELI5 section in plain language. Add a Risk section that gives a Level (Low, Medium, or High), names the riskiest part, and describes how to revert. Add a Visual Proof section that states N/A with a reason, since this is a behavior change in the retry path. Use the template's 'Fixes #' issue link format, or confirm the STA-18495 reference is the linked issue. Mark the Testing checklist items that apply, and state which platforms were tested.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d53d6068-1867-4ed3-b6b5-6854ea302b0b
Commits

Reviewing files that changed from the base of the PR and between 3015c4f and 39dee3b.

Files selected for processing: 2

  • src/main/claude/structured/lifecycle/claude-structured-event-delivery.test.ts
  • src/main/claude/structured/lifecycle/claude-structured-event-delivery.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@Jinwoo-H
Jinwoo-H merged commit de53e45 into main Nov 26, 2026
54 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