fix(claude): classify stop diagnostics as interrupted - #4838
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
ApprovabilityVerdict: Approved 57fd6f8 Targeted bug fix that reclassifies diagnostic-only Claude results as 'interrupted' when an explicit user interrupt was requested. The change is defensive, well-scoped, and includes comprehensive test coverage. You can customize Macroscope's approvability policy. Learn more. |
Summary
error_during_executionresult as interrupted only when it follows an explicit interrupt for that turnClaude can return this after stopping during tool use:
Without explicit correlation, the adapter classified it as a failed turn and surfaced the internal diagnostic as a runtime error.
Verification
vp test run apps/server/src/provider/Layers/ClaudeAdapter.test.ts(63 passed)vp fmt --check apps/server/src/provider/Layers/ClaudeAdapter.ts apps/server/src/provider/Layers/ClaudeAdapter.test.tsvp lint apps/server/src/provider/Layers/ClaudeAdapter.ts apps/server/src/provider/Layers/ClaudeAdapter.test.tsvp run --filter t3 typecheckNote
Classify diagnostic-only Claude stop results as interrupted when an explicit interrupt was requested
interruptRequestedTurnIdtoClaudeSessionContextto track which turn had an explicit interrupt requested, set ininterruptTurnand cleared after result handling.isClaudeExecutionDiagnosticOnlyResultto detecterror_during_executionresults with a single[ede_diagnostic]error string.isInterruptedResultandturnStatusFromResultnow accept anexplicitInterruptRequestedflag; diagnostic-only results are classified asinterruptedwhen this flag is true.Macroscope summarized 57fd6f8.