Skip to content

Cancel desktop computer response reads promptly - #1958

Merged
elie222 merged 1 commit into
mainfrom
codex/native-stream-cancellation
Oct 23, 2026
Merged

elie222 merged 1 commit into
mainfrom
codex/native-stream-cancellation

Conversation

@elie222

@elie222 elie222 commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Why

Cancelling a desktop computer command can leave the client waiting on its response stream. Stop pending reads and buffered events as soon as the request is cancelled, so cancellation reliably reaches the host process.

What changed

  • Keep the combined request signal alive while consuming the response and explicitly cancel its reader on abort.
  • Check cancellation before yielding buffered frames and release the reader without waiting on stalled abort cleanup.
  • Preserve command deadlines and never retry a cancelled command.

Validation

Native computer transport and command suites pass locally, including a deterministic stream that ignores fetch cancellation and stalls cleanup. The real-process abort test also verifies that the child exits. Adapter type checking passes. Windows coverage runs in CI.

@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
rakazo-www Skipped Skipped Oct 23, 2026 1:46pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Desktop computer requests now stop pending reads and buffered events when the caller cancels or the deadline expires.

  • Cancelling a desktop command now stops the response stream promptly.

No actionable issues were found. The full test suites were not run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Caller cancels or deadline expires] --> B[Cancel response reader]
  B --> C[Pending read finishes]
  C --> D[Check cancellation before delivering events]
  D --> E[Skip waiting for stalled cleanup]
  E --> F[Release reader and reject request]
Loading

Reviews (1) · Last reviewed commit: "Cancel desktop computer response reads p..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Playwright screenshots

No new feature frames; gallery is suite-vs-main drift.

Open screenshot gallery · Dashboard · CI run

Updated for commit 62d8772.

@elie222
elie222 merged commit a9c4654 into main Oct 23, 2026
27 checks passed
@elie222
elie222 deleted the codex/native-stream-cancellation branch October 23, 2026 17:58

This branch was previously deployed

1 inactive deployment
Preview — 62d8772b Deployed Oct 23, 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