Skip to content

fix(session): stop foreground tasks before follow-up turns - #4649

Merged
reachjalil merged 1 commit into
devfrom
fix/interrupt-follow-up-handoff
Sep 8, 2026
Merged

reachjalil merged 1 commit into
devfrom
fix/interrupt-follow-up-handoff

Conversation

@reachjalil

Copy link
Copy Markdown
Member

Summary

  • Make composer Stop cancel the current foreground task tree, verify each child belongs to the same parent/workspace, and confirm native idle before releasing the next user turn.
  • Share the interruption boundary across visible panes and queued sends. Settle older in-flight submissions and stop late admissions before sending the follow-up; keep Stop available if cancellation fails or admission remains unknown.
  • Reconcile the old queue admission before the successor starts, without inheriting predecessor busy state. Use the matching v1/v2 client for queued and other-workspace-pane submissions.
  • Extend the existing parent/child permission journey with Stop followed immediately by fresh work, interrupted-child assertions, single follow-up completion, and unrelated-session isolation. Preserve explicit background tasks and normal steering semantics.

Verification — Incomplete

Head: 3f708af7f34b24ae4895e632e971c8a355d73ec0, rebased onto dev at 60494f2055c80f4f8694e53c8a8ac41aeac6b654.

Check Result
Focused regression tests Exit 0: 24 passed, 0 failed, 0 skipped; 251 assertions
App typecheck Exit 0; no diagnostics
Diff whitespace check Passed
Real-engine v1/v2 journey Not run; exact-head runtime evidence and publication remain outstanding

Commands run on this head:

pnpm --filter @openwork/app exec bun test ./tests/opencode-session-native.test.ts ./tests/queued-drain-admission-wedge.test.ts
pnpm --filter @openwork/app typecheck
git diff origin/dev...HEAD --check

The focused tests use controlled HTTP responses through the actual v1/v2 clients. They cover delayed child interruption, nested ownership, background/historical exclusions, timeout and retry fencing, late admissions, duplicate Stop, and endpoint isolation. They are not real-engine or desktop proof. This PR is open for review, not a claim of merge readiness. End-to-end execution was deferred from the local candidate pass; no runtime placement or passing end-to-end verdict is claimed.

Remaining proof on the pushed head:

OPENWORK_EVAL_REF=3f708af7f34b24ae4895e632e971c8a355d73ec0 OPENWORK_EVAL_ENGINE=v1 pnpm evals:e2e parent-child-permission-approval
OPENWORK_EVAL_REF=3f708af7f34b24ae4895e632e971c8a355d73ec0 OPENWORK_EVAL_ENGINE=v2 pnpm evals:e2e parent-child-permission-approval

Publish those saved runs after completion; any missing or skipped claims keep the verdict Incomplete.

Related work

No merge, release, deployment, or installer change is included.

@vercel

vercel Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 8, 2026 10:10pm UTC
openwork-den Ready Ready Preview Sep 8, 2026 10:10pm UTC
openwork-diagnostics Ready Ready Preview Sep 8, 2026 10:10pm UTC
openwork-landing Ready Ready Preview, v0 Sep 8, 2026 10:10pm UTC

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (3f708af7f34b24ae4895e632e971c8a355d73ec0). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

This branch was successfully deployed

4 active deployments
Preview – openwork-landing — 3f708af7 Deployed Sep 8, 2026 by vercel[bot]
Preview – openwork-den — 3f708af7 Deployed Sep 8, 2026 by vercel[bot]
Preview – openwork-app — 3f708af7 Deployed Sep 8, 2026 by vercel[bot]
Preview – openwork-diagnostics — 3f708af7 Deployed Sep 8, 2026 by vercel[bot]
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.

1 participant