Skip to content

[Bug]: Orca keeps disconnecting from running Pi agents #7791

Closed

Description

@shaharmor

Operating system

macOS

Orca version

1.4.128

Details

Hi,

Starting recent version (Or previous one), Orca keeps disconnecting from running Pi agents in the middle of their work, while non orca agents stay connected.

Activity

  1. added
    bug
    on Jul 8, 2026
  2. added
    os:macos
    on Jul 8, 2026
  3. added theissue type on Jul 12, 2026
  4. AmethystLiang commented on Jul 12, 2026

    @AmethystLiang
    Contributor

    reviewing this now

  5. AmethystLiang commented on Jul 12, 2026

    @AmethystLiang
    Contributor

    Resolved by #8355, merged as 21c0e45.

    The investigation reproduced two separate failure modes:

    • Pi awaits extension handlers, so Orca awaiting a stalled loopback status POST could hold the running Pi turn open indefinitely.
    • Pi emits session_shutdown for reload, new, resume, and fork while its PTY can remain alive, so normalizing that event to done could falsely remove a live agent from Running.

    The merged fix takes hook delivery off the Pi critical path, bounds it to one active request plus one latest pending snapshot with a one-second abort, preserves the WSL fallback, and makes agent_end the only Pi completion event. Actual process exits still clear through PTY teardown.

    Validation: 238 focused regression tests, 264 expanded Pi tests, and the full suite of 28,534 tests passed. Existing Pi processes must reload or restart once to load the updated managed extension.

    Closing as completed.

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

Metadata

Metadata

Assignees

Labels

bugos:macos

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions