Skip to content

fix(provider): recover claude startup before first prompt - #347

Merged
astyfx merged 1 commit into
mainfrom
fix/stave-crane-task-not-started
Aug 7, 2026
Merged

fix(provider): recover claude startup before first prompt#347
astyfx merged 1 commit into
mainfrom
fix/stave-crane-task-not-started

Conversation

@astyfx

@astyfx astyfx commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

Starting a Crane-originated task from the prepared Stave window could leave the first provider turn with no response when Claude's streaming query closed during MCP readiness before it consumed the queued prompt. This change recovers that startup-only close and preserves the terminal classification.

Changes

Fixes

  • provider: retry a Claude stream that ends after initialization before initial turn work, with the initial prompt preloaded
  • provider: fail fast if the initial queue closes before accepting the prompt
  • lifecycle: preserve explicit aborts and prevent returned adapter terminal events from masking timeout failures

Breaking Changes

  • None.

Test Evidence

  • bun run test:ci
  • 376 isolated test files passed, including the Claude startup recovery and provider lifecycle regressions
  • TypeScript checks and desktop builds passed as part of the CI gate

Notes

  • Recovery is limited to the startup-only stream state and runs at most once, so an already active provider turn is not duplicated.
  • This is a provider-runtime change; no renderer, preload, or IPC payload contract changed.

@astyfx
astyfx requested a review from a team as a code owner August 7, 2026 13:44
@astyfx
astyfx requested review from JongSikLim and paul-seo73 and removed request for a team August 7, 2026 13:44
@upwind-code-us

upwind-code-us Bot commented Aug 7, 2026

Copy link
Copy Markdown

Upwind Upwind Code Scan - ✅ Proceed with Deployment

0 newly introduced vulnerabilities · 0 resolved · 0 total in this PR vs main

View full analysis in Upwind Console

Scan completed in 19s

Scan history (1 scan)
Commit Scanned at New Resolved Net
ce3378b < 2026-08-07 13:44 UTC 0 0 0

Last scanned: ce3378b · 2026-08-07 13:44 UTC

@upwind-code-us

upwind-code-us Bot commented Aug 7, 2026

Copy link
Copy Markdown

Upwind Upwind IaC Scan - ✅ Proceed with Deployment

0 newly introduced misconfigurations · 0 resolved · 0 total in this PR vs main

View full analysis in Upwind Console →

Scan completed in 3s

Scan history (1 scan)
Commit Scanned at New Resolved Net
ce3378b < 2026-08-07 13:44 UTC 0 0 0

Last scanned: ce3378b · 2026-08-07 13:44 UTC

@heath-s heath-s left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved

@astyfx
astyfx merged commit 69ca766 into main Aug 7, 2026
3 of 4 checks passed
@astyfx
astyfx deleted the fix/stave-crane-task-not-started branch August 7, 2026 13:44
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.

2 participants