Skip to content

[High] Fix unhandled abort during stream cleanup #11

Description

@randomm

Problem

In packages/opencode/src/core/stream.ts (lines 365-395), if abort fires during error recovery cleanup, operations continue unsafely.

Impact

Resource leak, corrupted state.

Solution

  1. Check abort signal before cleanup operations
  2. Wrap cleanup in try-catch
  3. Ensure graceful shutdown on abort

Files

  • packages/opencode/src/core/stream.ts

Branch

claude/simplify-agentic-loop-2jRSP

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions