Skip to content

(terminals): assign a job to live tabs once the Windows job helper is ready - #1159

Merged
devsuitup merged 3 commits into
mainfrom
fix/1156-late-job-assignment
Nov 21, 2026
Merged

devsuitup merged 3 commits into
mainfrom
fix/1156-late-job-assignment

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

Closes #1156

Follow-up of #1140 (#1154). Tabs restored during a slow cold start all joined the first Windows job helper start and failed at 15 s; they kept the plain ConPTY close for life, so children they spawned later outlived the tab (#1015).

  • When a later helper start succeeds, every live tab whose assignment failed is assigned once; exited or closed tabs are skipped, and a failed late assignment is not retried.
  • The backoff expiry triggers its own retry while tabs are waiting, still bounded by the three start attempts.
  • The backoff uses a monotonic clock, so a backwards wall-clock step no longer holds the retry off.
  • Children spawned before the late assignment are not captured; documented in .ai/contexts/ipc-bridge.md.

Tests: test/windows-job-recovery.test.js (new, stubbed helper) and test/windows-job-helper.test.js, red on main first.

… is ready

Tabs whose job assignment failed during a slow start are now assigned once
when a later helper start succeeds, the backoff expiry retries on its own,
and the backoff uses a monotonic clock.
…it is being stopped

A project-delete stop waiting on the first assignment no longer keeps the
tab out of recovery, and the close/release/observe guard is tested again
after the backoff expires.
@devsuitup
devsuitup merged commit e1fdbd8 into main Nov 21, 2026
11 of 12 checks passed
@devsuitup
devsuitup deleted the fix/1156-late-job-assignment branch November 21, 2026 01:19
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.

(terminals): assign a job to live tabs whose Windows job helper start failed, once the helper is ready

1 participant