Skip to content

[Bug]: Windows AppHangB1 when opening/activating terminal session #6874

Open

Description

@niuhuoshan

Operating system

Windows

Orca version

1.4.109.0

Details

Summary

Orca repeatedly freezes on Windows when opening or activating a workspace/session. After the freeze, Windows reports AppHangB1 for Orca.exe, and orca status --json reports that the app is no longer running with the runtime stuck in stale_bootstrap.

This still reproduces after a full reboot, after removing a previously heavy workspace (open-design), and after reopening the session. It does not look like a renderer heap or system memory exhaustion issue: the latest trace breadcrumbs show the renderer heap around 78 MB, and the machine still had significant free physical memory.

This appears related to the existing Windows terminal freeze reports:

Environment

  • Orca executable version: 1.4.109.0
  • Previously reproduced on Orca 1.4.103.0
  • Daemon pid file currently still reports appVersion: "1.4.103" even though the executable is 1.4.109.0
  • OS: Windows 11 Pro, 10.0.26200, x64
  • WSL: Ubuntu workspaces accessed via UNC paths like \\wsl.localhost\Ubuntu\home\<redacted>\workspace\...
  • GPU: AMD Radeon(TM) Graphics
    • Driver version: 31.0.12042.4
    • Driver date: 2022-10-19
  • Virtual display adapters present:
    • ToDesk Virtual Display Adapter, driver 16.44.2.509
  • Physical memory: 32 GB

Symptoms

  • Opening or activating a workspace/session can freeze the entire Orca window.
  • After the freeze, the Orca GUI/runtime is unavailable from the CLI.
  • The daemon process may remain alive, but the app/runtime is gone or unreachable.
  • This can happen repeatedly in the same day, including after reboot.
  • The issue is not resolved by removing a heavy workspace/repo from Orca.

Latest observed failure

After the latest freeze:

{
  "id": "local-status",
  "ok": true,
  "result": {
    "app": {
      "running": false,
      "pid": null
    },
    "runtime": {
      "state": "stale_bootstrap",
      "reachable": false,
      "runtimeId": null
    },
    "graph": {
      "state": "not_running"
    }
  },
  "_meta": {
    "runtimeId": "none"
  }
}

Only the daemon process remained:

Orca.exe pid 23896
Responding: true
ProductVersion: 1.4.109.0
Private memory: ~60 MB

The daemon pid file:

{
  "pid": 23896,
  "startedAtMs": null,
  "entryPath": "C:\\Users\\<redacted>\\AppData\\Local\\Programs\\orca\\resources\\app.asar.unpacked\\out\\main\\daemon-entry.js",
  "appVersion": "1.4.103"
}

Windows Event Log

Repeated Application Hang / AppHangB1 events were recorded:

2026-06-30 16:18:35 Application Hang
Program Orca.exe version 1.4.109.0 stopped interacting with Windows and was closed.

2026-06-30 16:18:35 Windows Error Reporting
Event Name: AppHangB1
P1: Orca.exe
P2: 1.4.109.0
P3: 6a16071b
P4: 76a1
P5: 134217728

Other repeated Orca hangs from the same day:

2026-06-30 15:01:13 Orca.exe 1.4.109.0 AppHangB1
2026-06-30 14:57:55 Orca.exe 1.4.103.0 AppHangB1
2026-06-30 14:52:15 Orca.exe 1.4.103.0 AppHangB1
2026-06-30 14:47:53 Orca.exe 1.4.103.0 AppHangB1
2026-06-30 14:28:50 Orca.exe 1.4.103.0 AppHangB1

There are also Windows LiveKernelEvent / BlueScreen reports on the machine, including watchdog codes 117 and 141. I am not sure whether those are causal or a separate GPU/display-driver instability that makes the Electron/WebGL/terminal path more fragile.

Orca trace observations

From C:\Users\<redacted>\AppData\Roaming\Orca\logs\main.trace.ndjson:

  • Renderer memory breadcrumbs stayed low before the hang:
    • usedHeapMB: around 78
    • totalHeapMB: around 87
    • heapLimitMB: 3586
    • browserWebviews: 0
  • The trace shows recurring WSL git scans:
    • git.exec remote
    • git.exec worktree
    • working directories under \\wsl.localhost\Ubuntu\home\<redacted>\workspace\...
  • A sidebar_worktree_activate breadcrumb appeared shortly before one of the freeze periods.
  • Latest trace breadcrumbs stopped around 2026-06-30 16:17:23, and Windows recorded the AppHangB1 at 2026-06-30 16:18:35.

Example trace timeline near the latest hang:

2026-06-30 15:56:21 sidebar_worktree_activate
2026-06-30 15:58:13 git.exec remote
2026-06-30 16:00:13 git.exec remote
2026-06-30 16:02:13 git.exec remote
2026-06-30 16:04:13 git.exec remote
2026-06-30 16:06:13 git.exec remote
2026-06-30 16:08:13 git.exec remote
2026-06-30 16:10:13 git.exec remote
2026-06-30 16:12:13 git.exec remote
2026-06-30 16:14:13 git.exec remote
2026-06-30 16:16:13 git.exec remote
2026-06-30 16:17:23 renderer_memory
2026-06-30 16:18:35 Windows AppHangB1 for Orca.exe 1.4.109.0

Expected behavior

Opening or activating a terminal/workspace session should not freeze the whole Orca window, and the runtime should remain reachable.

Actual behavior

The Orca window freezes or is closed by Windows as non-responsive. After that, orca status --json reports:

  • app.running: false
  • runtime.state: stale_bootstrap
  • runtime.reachable: false
  • graph.state: not_running

Notes

I can provide a redacted main.trace.ndjson and exported Windows Event Viewer entries if helpful.

Activity

  1. niuhuoshan commented on Jul 1, 2026

    @niuhuoshan
    Author

    Some registered workspaces are plain folders without .git, but Orca still restores/manages them as workspaces with attached PTYs. This may interact badly with WSL UNC paths.

  2. added theissue type on Jul 12, 2026
  3. added
    pending_reproRepro attempted; still pending conclusive reproduction
    on Jul 16, 2026
  4. OrcaWin commented on Jul 17, 2026

    @OrcaWin
    Collaborator

    Agent reproduction package (Windows orchestration 2026-07-16)

    Host context: Windows 11 / Orca 1.4.143.0 / repo path used: docs/bug-reproductions/
    Labels applied: see issue labels (has_repro or cannot_repro).
    Security: Do not run user-uploaded binaries from issue attachments. Recreate fixtures from the steps/scripts below.


    Issue 6874 — Windows AppHangB1 when opening/activating terminal session

    Status: cannot_repro (forced hang on 1.4.143 this session)
    Host: Windows 11 10.0.26200 (25H2), Orca 1.4.143.0
    Label: cannot_repro
    URL: #6874

    Summary

    Reporter: opening/activating a workspace/session freezes Orca; Windows records AppHangB1 for Orca.exe; afterward orca status --json shows app.running: false and runtime.state: stale_bootstrap. Related historical freezes: #5787, #4436, #5365, #5345.

    Attempt on this host (2026-07-16)

    Environment

    • Orca processes: multiple Orca.exe / orca children; main UI pid 13120, all Responding=true throughout
    • Runtime: state=ready, reachable=true before and after
    • Accessibility snapshot noted Resource Manager: 87 terminal sessions (high load)
    • orca terminal list: ~39 handles during tests
    • Did not force-kill processes

    Activation stress

    Sequentially activated worktrees via orca worktree show + orca terminal create --focus for:

    1. C:/Users/neil/orca/orca
    2. C:/Users/neil/orca/workspaces/orca/repo
    3. C:/Users/neil/orca/workspaces/orca/7640
    4. C:/Users/neil/orca/workspaces/orca/firewall-mobile
    5. C:/Users/neil/orca/workspaces/orca/pr-8955-add
    Path ~elapsed notRespondingCount status ok
    main ~15s 0 true
    repo ~13s 0 true
    7640 ~13s 0 true
    firewall-mobile ~13s 0 true
    pr-8955-add ~21s 0 true

    Note: terminal create often timed out waiting for terminal handle under load, but the app/runtime stayed reachable and Responding.

    Evidence:

    • docs/bug-reproductions/evidence/6874-activate-attempt-*.json
    • docs/bug-reproductions/evidence/6874-status-before-*.json / 6874-status-after-*.json
    • docs/bug-reproductions/evidence/6874-processes-*.txt
    • docs/bug-reproductions/evidence/6874-memory-*.json (orca diagnostics memory)

    Event Viewer / WER

    Recent Application log includes AppHangTransient for:

    P1: Orca.exe
    P2: 1.4.135.0
    Event Name: AppHangTransient
    

    (Historical, not produced during this 1.4.143 activation pass.)

    Files:

    • evidence/6874-wer-recent.txt
    • evidence/6874-apphang-recent.txt (may be empty if no Application Hang provider hits matched)

    No new AppHangB1 / stale_bootstrap observed on 1.4.143 during this attempt.

    Expected vs actual (this attempt)

    Expected (bug) Hang + AppHangB1 + stale_bootstrap
    Actual No hang; status remained ready; processes Responding

    Notes

    • Intermittent / environment-specific (WSL UNC workspaces, older GPU drivers, virtual display adapters in original report).
    • High terminal session count may still stress Windows path; worth re-testing after reducing sessions or with WSL UNC projects.
    • Related session-restore orphan-PTY work: #5787 comments in createMainWindow.ts.

    Repro recipe if hang returns

    1. Open/activate several workspaces with live terminals (especially WSL UNC).
    2. Watch UI freeze.
    3. Immediately: orca status --json → capture stale_bootstrap.
    4. Export Application Hang / WER for Orca.exe.
    5. Optional: orca diagnostics memory --json if still reachable.

    How another agent should use this

    1. Read this comment fully (status, expected vs actual, blockers).
    2. If a script is included above, copy it to a temp file and run it on a Windows 11 host with Orca installed (prefer production install under %LOCALAPPDATA%\Programs\orca).
    3. Capture evidence (CLI --json, screenshots, logs) under a local folder; optionally comment results back here.
    4. If status is cannot_repro / needs_setup, satisfy the listed prerequisites first, then re-attempt and flip labels: remove cannot_repro, add has_repro when conclusive.
  5. nwparker commented on Nov 17, 2026

    @nwparker
    Contributor

    Thanks for reporting this! This looks like it comes from Orca's older WSL integration, which reaches into the distro from Windows through \\wsl.localhost paths and wsl.exe. We've since shipped a new WSL bridge, WSL hosts, where Orca's server runs inside the distro itself, so this part of the old path isn't involved.

    Could you give it a try?

    1. Open Settings → Experimental and turn on WSL hosts.
    2. Click Add a project → Add remote host → Add WSL distro and pick your distro.
    3. Open your project on that WSL host and try the same steps again.

    If it still happens there, please let us know here with your Orca version. That helps us a lot.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingos:Windowspending_reproRepro attempted; still pending conclusive reproductionsize/lLarge PR (≤2500 added lines, ≤50 files)

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions