Skip to content

fix(claude): classify stop diagnostics as interrupted - #4838

Open
D3OXY wants to merge 1 commit into
pingdotgg:mainfrom
D3OXY:d3oxy/fix-claude-ede-interrupt-diagnostic
Open

fix(claude): classify stop diagnostics as interrupted#4838
D3OXY wants to merge 1 commit into
pingdotgg:mainfrom
D3OXY:d3oxy/fix-claude-ede-interrupt-diagnostic

Conversation

@D3OXY

@D3OXY D3OXY commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • correlate Claude SDK interrupt requests with the active provider turn
  • treat a diagnostic-only error_during_execution result as interrupted only when it follows an explicit interrupt for that turn
  • keep unrelated Claude execution diagnostics classified as failures

Claude can return this after stopping during tool use:

[ede_diagnostic] result_type=user last_content_type=n/a stop_reason=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.ts
  • vp lint apps/server/src/provider/Layers/ClaudeAdapter.ts apps/server/src/provider/Layers/ClaudeAdapter.test.ts
  • vp run --filter t3 typecheck

Note

Classify diagnostic-only Claude stop results as interrupted when an explicit interrupt was requested

  • Adds interruptRequestedTurnId to ClaudeSessionContext to track which turn had an explicit interrupt requested, set in interruptTurn and cleared after result handling.
  • Introduces isClaudeExecutionDiagnosticOnlyResult to detect error_during_execution results with a single [ede_diagnostic] error string.
  • isInterruptedResult and turnStatusFromResult now accept an explicitInterruptRequested flag; diagnostic-only results are classified as interrupted when this flag is true.
  • If the interrupt call fails, the stored turn ID is cleared to avoid misclassifying future results.

Macroscope summarized 57fd6f8.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 003e5a72-2fa6-4bcd-88f6-dce3ee01cf73

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jul 29, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant