Skip to content

[codex] fix: retry transient shell subscription failures#3528

Open
StiensWout wants to merge 1 commit into
pingdotgg:mainfrom
StiensWout:staging/retry-shell-subscription-failures
Open

[codex] fix: retry transient shell subscription failures#3528
StiensWout wants to merge 1 commit into
pingdotgg:mainfrom
StiensWout:staging/retry-shell-subscription-failures

Conversation

@StiensWout

@StiensWout StiensWout commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Retry handled shell subscription failures after the same 250 ms delay used by thread detail sync.
  • Add shell sync regression coverage for recovering from an expected subscription failure without replacing the session.

Root cause

Shell state handled expected subscription failures by surfacing a synchronization error, but it did not request a retry from the shared durable subscription helper. After a transient domain failure, shell sync could stay dormant until a session replacement.

Impact

Transient expected shell subscription failures now resubscribe and can recover to a live snapshot, clearing the shell synchronization error once fresh shell data arrives.

Validation

  • PATH="$HOME/.vite-plus/bin:$PATH" vp test packages/client-runtime/src/state/shell-sync.test.ts
  • PATH="$HOME/.vite-plus/bin:$PATH" vp check
  • PATH="$HOME/.vite-plus/bin:$PATH" vp run typecheck

Note

Low Risk
Small behavioral change in client shell sync using an existing RPC subscribe retry option; covered by a new unit test.

Overview
Environment shell sync now passes retryExpectedFailureAfter: "250 millis" on subscribeShell, aligning with thread detail sync so expected subscription failures still surface the sync error via onExpectedFailure but automatically resubscribe instead of staying dormant until the session is replaced.

shell-sync.test.ts extracts shared supervisor/cache setup into makeTestShellState and adds a regression test: first subscribe attempt fails, state shows the synchronization error, after 250 ms a retry runs, and the next snapshot clears the error and reaches live status.

Reviewed by Cursor Bugbot for commit 60a25cd. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Retry transient shell subscription failures after 250ms in makeEnvironmentShellState

Adds retryExpectedFailureAfter: "250 millis" to the subscribeShell call in shell.ts so that expected subscription failures trigger an automatic retry after a 250ms delay, while still recording the error via onExpectedFailure. A new test in shell-sync.test.ts verifies the retry behavior and successful transition to live state after the next snapshot.

Macroscope summarized 60a25cd.

@coderabbitai

coderabbitai Bot commented Jun 23, 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

Run ID: 14fe5e2b-f17b-468b-ae68-e492c6b3fdb2

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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:XS 0-9 changed lines (additions + deletions). labels Jun 23, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Single-line configuration change that enables retry behavior for transient shell subscription failures. The fix is minimal, well-tested, and follows existing patterns in the codebase.

You can customize Macroscope's approvability policy. Learn more.

Co-authored-by: Codex <codex@openai.com>
@StiensWout StiensWout force-pushed the staging/retry-shell-subscription-failures branch from 4de3d90 to 60a25cd Compare June 23, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 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