Skip to content

[Bug]: Main process reaches 100% CPU after terminal/worktree churn and retains thousands of removed worktrees #15412

Closed

Description

@seanssoh

Operating system

macOS 26.3.2 (Apple Silicon)

Orca version

1.4.184

Details

Short summary

After roughly 30 minutes of normal multi-agent use, Orca input, rendering, terminal output, and worktree create/attach operations become progressively unusable. The Orca main process reaches ~100% CPU and its RSS grows rapidly. Quitting and reopening Orca immediately restores responsiveness, while persistent agent processes survive and reattach.

The local persistent state also retains thousands of removed worktree records and stale workspace-session owners. Repeatedly removing those stale records through the supported worktree.rm RPC causes a full Git worktree rescan per record and can itself pin the main process at 100% CPU.

createOrAttach timed out after 30000ms and listSessions timed out after 9500ms occur after the runtime is already degraded; they appear to be symptoms, not the initiating cause.

Observed runtime behavior

On a fresh restart:

  • Main process CPU: roughly 10-27%
  • Main process RSS: roughly 300 MB
  • Renderer heap: roughly 14 MB
  • Input is responsive

Immediately before a restart during degradation:

  • Main process CPU: 97-106%
  • Main process RSS grew from about 540 MB to 812 MB in about 20 seconds
  • Input and terminal output were delayed to the point of being unusable
  • New worktree/session create or attach operations timed out

A second reproduction about 30 minutes after restart showed:

  • Main PID CPU: 99-102%
  • Main PID RSS: 1.31 GB at first measurement
  • Renderer CPU: about 6%; the bottleneck was the Electron main process
  • A 5-second macOS sample showed the main thread continuously draining Node/V8/libuv filesystem callbacks (uv__work_done -> node::fs::AfterInteger -> JS callbacks)

Historical renderer crash reports on the same machine also show renderer heap growth from about 2.5 GB to 3.3 GB to approximately 4 GB before repeated renderer crashes in 1.4.168/1.4.175.

Persistent-state mismatch

At one fresh snapshot:

  • worktree.ps: 22 current worktrees, 11 live terminals
  • workspaceSession.tabsByWorktree: 53 owner keys
  • Stale persisted owner keys absent from the runtime worktree set: 35
  • Persisted terminal tabs/layouts: 26
  • Sleeping agent session records: 23
  • worktreeMeta: 2,858 records
  • Local, path-missing, non-live records eligible for cleanup: about 2,000

Many retained records pointed at long-deleted /private/tmp/..., Claude scratch worktrees, review worktrees, and removed Orca child worktrees.

Terminal lifecycle churn

Daemon logs show substantial create/attach/kill churn and failed cleanup:

  • 2026-08-17: 617 created, 613 exited, 667 killed, 384 kill-failed, 390 attached
  • 2026-08-18: 304 created, 252 exited, 330 killed, 195 kill-failed, 202 attached
  • 2026-08-19 (partial day): 20 created, 14 exited, 16 killed, 20 kill-failed, 54 attached

Other recurring errors include tab_not_found, listSessions timed out after 9500ms, close failures, and createOrAttach timed out after 30000ms.

Cleanup reproduction

  1. Start Orca with a large worktreeMeta set containing removed local worktrees.
  2. Confirm each candidate is absent from worktree.ps, absent from an authoritative worktree.detectedList, and its filesystem path no longer exists.
  3. Call worktree.teardownMissingTerminals for the exact IDs.
  4. Call non-force worktree.rm for each exact stale ID.
  5. A 5-record smoke test succeeds and removes the record plus tabs/browser tabs/groups/layout state without changing live terminal counts.
  6. A larger sequential batch causes Orca main CPU to reach 100%.
  7. main.trace.ndjson shows each worktree.remove taking roughly 0.1-1.5 seconds and repeatedly invoking git worktree scans for the same repositories. Even after the caller is stopped, queued main-process filesystem/Git work continues for some time.

Agent Bridge / external worktree ingestion

One registered repository had externalWorktreeVisibility: show, which caused independently managed external and agent worktrees to be discovered by Orca. Changing the repository to:

  • externalWorktreeVisibility: hide
  • agentWorktreeVisibility: hide
  • externalWorktreeDiscoverySuppressedAt: <now>
  • importedExternalWorktreePaths: []

keeps the repository visible while preventing those independent sessions/worktrees from being surfaced as Orca workspaces. A first-class per-repository "never ingest external agent sessions" control would make this much clearer and safer.

Suspected persistence gap

Inspection of the 1.4.184 bundled code suggests:

  • removeWorktreeMeta() correctly calls workspace-session owner cleanup.
  • removeWorkspaceSessionStateForWorktree() exists and cleans owner state across partitions.
  • worktree.teardownMissingTerminals exists and performs an authoritative scan before stopping missing-worktree PTYs.
  • Renderer authoritative reconciliation builds purge state for removed local worktrees.
  • Persisted metadata forgetting after an authoritative scan appears to be implemented for SSH (forgetRemovedForExecutionHost) but not equivalently for local worktrees.

This may explain why local worktreeMeta records survive after their worktrees disappear and are loaded/scanned again on every run.

Expected behavior / requested fix

  1. After an authoritative local Git scan, automatically and durably forget metadata and workspace-session owner state for worktrees that no longer exist.
  2. Prune empty tabsByWorktree owner keys, dependent layouts, sleeping-agent records, terminal tombstones, and history/cache records once their exact live PTY/worktree owner is gone.
  3. Make cleanup batch-oriented: one authoritative repo scan, then remove all confirmed-missing IDs without rescanning Git per ID.
  4. Coalesce persistence saves and terminal-manager notifications during a cleanup batch.
  5. Bound or garbage-collect terminal lifecycle managers after exit/kill/failed-kill paths.
  6. Add diagnostics for retained worktree metadata count, workspace-session owner count, internal terminal-manager count, queued filesystem work, and main-process event-loop lag.
  7. Add a regression test with thousands of historical worktree records and hundreds of terminal create/attach/kill cycles; assert bounded CPU, memory, state size, and create/attach latency.
  8. Make createOrAttach/listSessions timeout errors include event-loop lag and queue/backlog diagnostics so the initiating cause is distinguishable from the timeout symptom.
  9. Expose a supported CLI/RPC for bounded local stale-state GC, or make normal reconciliation sufficient so an external janitor is unnecessary.

I can provide the redacted macOS sample and trace slices if useful.

Activity

  1. seanssoh commented on Aug 19, 2026

    @seanssoh
    Author

    Additional reproduction evidence: after the sequential stale-worktree cleanup was stopped, the Orca main process remained at 97-102% CPU for several minutes and RSS continued to climb. A normal macOS application quit request did not terminate the main process within 20 seconds, so no offline state mutation was attempted. This is consistent with the main event loop remaining occupied by queued filesystem/Git work after the RPC caller has gone away.

  2. seanssoh commented on Aug 19, 2026

    @seanssoh
    Author

    Follow-up after separating the renderer, persistent-state, history-scanner, and external-load hypotheses on 1.4.184. The strongest current mechanism is terminal-manager/replay accumulation; the large Codex history scanner is a separate historical amplifier, not the sole cause of this reproduction.

    1. Renderer terminal-manager / replay evidence

    Across the 10 retained renderer trace rotations (88 renderer launches):

    • terminal_replay_guard_wedged_release: 39 occurrences.
    • terminal_webgl_diagnostic: 5,375 occurrences.
    • mountedManagers reached 29, 33, 44, and in one launch 104.
    • One launch with 104 mounted managers reached about 456 MB renderer heap; another reached about 561 MB with 29 managers.
    • In the latest degraded launch, terminal_replay_guard_wedged_release was the final relevant terminal event immediately before the user restarted Orca. The fresh renderer restarted with one manager and low heap, and input became responsive again.

    Inspection of the bundled renderer shows:

    • A global liveManagers = new Set() populated by pane-manager registration/unregistration.
    • A 10-second REPLAY_GUARD_STALL_CHECK_MS.
    • terminal_replay_guard_wedged_release is emitted only when the xterm replay write rejects or a probe makes no parser progress for the stall interval; it then reports an undeliverable replay-wedged pipeline.
    • WebGL atlas recovery iterates all recovery managers and reports both managers and mountedManagers; it resets/refreshes all panes.

    This fits the user-visible failure better than the create/attach timeout itself: old/inactive pane managers and recovery/refresh fan-out accumulate, terminal output/replay wedges, rendering and input degrade, and new session attach then times out. Cmd+Shift+R invokes webContents.reloadIgnoringCache() and is a much less destructive workaround than quitting the whole app because the runtime/PTYS remain outside the renderer.

    Requested additions:

    1. Persist/report the live manager count, pane count, scrollback bytes, replay backlog, and manager age in diagnostics.
    2. Assert that every unmounted/removed worktree pane unregisters and disposes its manager.
    3. Recover only the wedged pane/manager instead of refreshing every live manager.
    4. Add a regression that repeatedly mounts/unmounts hundreds of worktree terminals and asserts the manager set returns to the live-pane count.

    2. Exact offline persistent-state audit

    A read-only, authoritative Git/path-based dry run against the current state file found:

    • worktreeMeta: 2,755 before, 47 retained after classification (2,708 stale metadata records).
    • Total stale owner IDs, including session-only owners not present in worktreeMeta: 2,738.
    • workspaceSession.tabsByWorktree: 53 -> 21.
    • Terminal layouts: 27 -> 26.
    • Sleeping agent records: 23 -> 22.
    • Removed tab IDs: 1.

    Every removable local ID was absent from the owning repository's authoritative git worktree list, its exact path did not exist, and it was not a non-local host record. The large gap between 2,755 persisted records and 47 real/present worktrees is machine-specific and likely explains why most users do not reproduce this quickly.

    The safe local mitigation is currently offline only: back up orca-data.json, remove the confirmed-missing owners and dependent state in memory, fsync a temporary file, and atomically rename it while Orca is stopped. A supported batch reconciliation RPC would be much safer than requiring this workaround.

    3. Codex history scanner: real historical amplifier, zero spans in today's trace

    The default Codex session tree on this host contains 6,218 rollout files and about 63.1 GB of logical history. A 3-day retention inventory found:

    • 5,522 unique old files / 52.22 GiB older than three days.
    • 702 recent entries / about 7.01 GiB retained.
    • 342 old Orca-runtime aliases are hardlinks to the default tree (21.66 GiB logical alias size, no additional physical bytes).
    • Individual rollout files reach roughly 447-608 MB.

    Historical aiVault.scan spans show:

    • Up to about 25.5 minutes for one scan.
    • Up to about 2.97 GB read in one scan.
    • Roughly 3,030 candidate files in affected scans.

    Bundled scanner inspection shows the default source resolves to CODEX_HOME || ~/.codex, recursively walks/stats/sorts the tree, keeps up to 2,000 newest candidates, and parses up to 1,000. Results are cached, but resumable byte offsets are not persisted across process restart, and invalidation deletes the path cache.

    However, the current main.trace.ndjson and its latest rotations contain zero aiVault.scan spans. Therefore this scanner has caused or amplified past stalls but does not explain today's renderer replay wedge by itself. A supported per-source exclusion and size/byte budget would still prevent independently managed Agent Bridge sessions from being imported merely because they use the operator's default Codex home.

    4. Controlled confounders

    The host also had unrelated security/indexing load and 20 orphaned CRM test embedded-postgres postmasters. The Postgres processes were idle (approximately 0% CPU) and are independently attributable to timed-out Go tests. These can amplify host resource usage but do not explain why reloading/restarting only Orca immediately restores input while the external processes remain.

    Current working model

    The evidence now supports three distinct layers:

    1. Primary current failure path: stale workspace/session topology -> excess terminal pane managers -> replay/WebGL recovery fan-out -> wedged renderer/input/output -> create/attach timeouts.
    2. Historical/recurrent amplifier: very large default Codex history scans and invalidation/reparse work.
    3. External amplifiers: unrelated host CPU load and test-process leaks.

    The local mitigations are intentionally outside the live Orca main process: offline atomic stale-state pruning, moving old rollout files outside scanner roots, and isolating future Agent Bridge Codex history under a separate CODEX_HOME. None of those substitutes for lifecycle disposal and bounded reconciliation in Orca itself.

  3. seanssoh commented on Aug 19, 2026

    @seanssoh
    Author

    Correction and stronger reproduction evidence for 1.4.184: the current failure is in the Electron main process, not the renderer. The renderer/replay evidence in my previous comment may describe a separate historical failure mode, but it does not explain this captured incident.

    Exact main-process timeline

    Old main PID 99750 was launched at 10:48:11 KST.

    • 12:11:10: main about 13% CPU.
    • 12:11:20: main 98.7% CPU, about 761 MiB RSS.
    • From then until quit at 12:38: main remained roughly 100-120% CPU and RSS repeatedly climbed/cycled, reaching about 1.5 GiB.
    • The renderer was generally 1-8% during the initial incident and remained far below the main process.
    • Input, terminal output, and create/attach became unusable.
    • Restarting only Orca immediately reset the condition; the new main stayed mostly around 8-15% and existing daemon-backed sessions survived.

    Two independent 5-second macOS samples, taken about 20 minutes apart while PID 99750 was wedged, show the same main-thread path:

    uv__async_io
      uv__work_done
        node::MakeLibuvRequestCallback<uv_fs_s, ...>
          node::fs::AfterInteger
            node::fs::FSReqCallback::Resolve
              node::InternalMakeCallback
                V8/JIT JavaScript frames
    

    At 12:11:46, 101 of 107 main-thread samples were in this path. At 12:31:50, 102 of 105 were in the same path, including the same JIT addresses. This looks like a main-process JS continuation triggered by an async filesystem integer result that does not return or is continuously re-entered. The standard macOS sample cannot recover the bundled JS function name.

    Confounders ruled down

    • The external maintenance GC did not execute during this incident. It checks for the Orca main executable and returned skipped-app-running every minute.
    • Main-process trace from 12:00-12:38 contains 537 git.exec spans and five worktree.remove spans, but the high-CPU transition occurred at 12:11:20, about seven minutes after the preceding removal at 12:04. Later removals amplified an already wedged main process; they did not initiate this reproduction.
    • A 10-minute external supervisor began read-only Orca queries at 12:11:00, shortly before the transition, but the same supervisor ran again after restart without reproducing the wedge. Its query volume may be a trigger under accumulated state, but it is not sufficient by itself.
    • The security scanner PIAutoscan was also near 100% during the captured incidents and can amplify filesystem latency. It is now near idle while Orca is normal, but this still does not explain why the Orca main process independently remains at 100% after the external load changes.

    Machine-specific accumulated state

    Current local state is unusually large:

    • orca-data.json: about 4.0 MB, including 2,757 worktreeMeta entries.
    • orchestration.db: about 93 MB.
    • 2,566 tasks, 2,537 worker dispatches, 2,014 worker terminal resources, 1,360 worker terminal archives, 11,781 messages, and 9,989 mutation receipts.
    • The largest tables are worker terminal archives (~36.7 MB), mutation receipts (~17.3 MB), messages (~13.8 MB), and tasks (~10.3 MB).

    The task-list --brief implementation still performs SELECT t.* for every task, including full spec and result, then abbreviates in main-process JavaScript. Large read/list operations therefore materialize much more data than the brief output suggests.

    The bundled worktree watcher also contains a possible self-amplifier in both base and git-common polling:

    const nextDelay = Math.max(
      0,
      Math.min(pollIntervalMs, pollIntervalMs - (Date.now() - startedAt)),
    );

    If one 2-second poll takes at least two seconds under I/O pressure, the next tick is scheduled with zero delay. On macOS, a watcher-process failure can switch git-common watching to this polling fallback. I do not yet have a log proving fallback activation in this incident, so this remains a code-supported hypothesis rather than the confirmed JS function.

    Requested diagnostic/fix direction

    1. Add a main-process CPU profile or inspector capture on event-loop lag/high CPU so bundled JS function names survive.
    2. Add counters for outstanding fs operations, persistence save generations, worktree poll duration/next delay, watcher fallback state, Git refresh queue depth, and orchestration response row/byte counts.
    3. Add a nonzero backoff when a filesystem poll overruns its interval; do not run catch-up polls at 0ms.
    4. Make task-list --brief project only brief columns in SQL instead of loading full spec/result.
    5. Bound/prune settled orchestration history and terminal archives through a supported API, while preserving active Runs and live PTYs.
    6. Batch/coalesce worktree refresh and persistence notifications after lifecycle changes.

    I now have two redacted main-process sample files and timestamped 10-second CPU/RSS/process/state samples for this incident if maintainers want them.

  4. yzxcj797 commented on Aug 19, 2026

    @yzxcj797
    Contributor

    One concrete gap stands out from the report's persistence numbers, and it explains the ~2,000-record accumulation with the existing GC in place:

    gcStaleWorktreeMeta gates on a 30-day idle grace BEFORE it stats the path (worktree-metadata-normalization.ts:68-71, deliberately so active entries skip the stat fan-out). But multi-agent churn creates exactly the shape that gate keeps forever: a Claude/scratch worktree created and removed within one session has a newestTouch minutes old, so the grace never elapses — and the record survives every startup scan indefinitely while its /tmp path is long gone. The grace is right for entries that might be recreated; it is the wrong gate for entries an authoritative worktree.detectedList scan has already proven absent.

    The minimal, well-scoped fix matching your item 1: let a proven-absent local path bypass the idle grace the same way SSH already does via forgetRemovedForExecutionHost — authoritative absence is stronger evidence than timestamp age. The batch-scan coalescing (one git worktree list per repo, then remove all confirmed-missing IDs without rescanning per ID) is the natural second step and is what fixes the 100%-CPU worktree.rm loop you measured.

    I have the repo checked out and the loading-store/GC path mapped; the authoritative-absence bypass looks containable to the normalization module plus the detected-list reconciliation reporting its retirements. If a maintainer confirms this is the intended direction (rather than a broader persistence rework), I'll take the minimal first step.

  5. seanssoh commented on Aug 19, 2026

    @seanssoh
    Author

    Additional controlled comparison for the terminal-history path:

    While the restarted main process was healthy, four active Orca terminals produced a combined 350-400 KB of terminal-history output every 10 seconds. The bundled main process flushes dirty sessions every 5 seconds, permits four concurrent checkpoints, and resets each incremental output.log at the 5 MiB boundary.

    Two sessions crossed that boundary during 2-second monitoring:

    • 13:07:22 KST: crm-hrjangcosmax-i1673-restack output.log fell from about 5.23 MB to 9 bytes and checkpoint.json changed. Main CPU was 13.0%, then 16.5%, and returned to baseline.
    • 13:07:48 KST: crm-sankyul-i1876-psql-guard-repair output.log fell by 5,240,811 bytes to 9 bytes and checkpoint.json changed. Main CPU briefly reached 33.9%, then returned to 13.9% and 12.2%.

    Therefore normal 5 MiB rollover/full-checkpoint work is not sufficient to produce the permanent 100% main-process wedge. It does establish a useful control: the hot incident samples are in the same Node fs completion family used by this high-rate persistence path, but the failure requires additional accumulated state, backlog, or I/O pressure.

    The current strongest model is a positive-feedback failure: continuous terminal output plus other main-process filesystem/Git/orchestration work causes pending output to outpace processing; each fs completion immediately drains/encodes/writes more work, and the main event loop never becomes idle. Restart clears or reseeds the backlog and restores responsiveness. Exact confirmation still requires a V8 main-process profile because native sampling cannot name the JIT JavaScript continuation.

  6. seanssoh commented on Aug 19, 2026

    @seanssoh
    Author

    Live confirmation from the affected 1.4.184 profile strongly supports this direction.

    A read-only recount of the current worktreeMeta map found:

    • 2,758 total records
    • 49 paths currently exist
    • 2,709 paths are already absent
    • 2,339 absent records have newestTouch == 0
    • 370 absent records have a nonzero touch but are younger than the 30-day grace
    • 1,032 absent paths are under temporary-directory roots
    • 810 absent paths are under the separately managed Agent Bridge tree

    The newestTouch == 0 cohort is especially important: the current gcStaleWorktreeMeta branch explicitly continues when the value is zero, so those 2,339 records do not merely wait for the grace period; they never become eligible through this GC path. The current local detected-list reconciliation prunes missing lineage after one authoritative git worktree list, but it does not retire the corresponding local worktreeMeta records. That is the missing local analogue of the SSH forget path described above.

    This makes authoritative-absence retirement plus one-scan-per-repo batch reconciliation the right minimal fix and a very high-value test on this machine. One boundary remains: replaying the large read-only orchestration query set once after restart did not reproduce the permanent main-process wedge, and normal 5 MiB terminal-history checkpoints also recovered. So the stale metadata is now a confirmed persistence defect and credible repeated-work amplifier, but I would not yet label it the sole cause of every 100% incident without the V8 main-process profile.

    I can test a maintainer-approved patch against this exact 2,709-missing-record profile and report before/after counts, detected-list latency, git.exec volume, and main CPU.

  7. seanssoh commented on Aug 19, 2026

    @seanssoh
    Author

    Applied the bounded offline mitigation on the affected 1.4.184 profile and verified live-session continuity.

    Exact offline state transition:

    • worktreeMeta: 2,757 -> 49
    • stale owner IDs removed: 2,739, including metadata owners plus session-only owners
    • workspaceSession.tabsByWorktree owners: 56 -> 23
    • terminal layouts: 25 -> 24
    • stale tab IDs removed: 1
    • a timestamped pre-mutation backup was created
    • atomic rewrite completed, JSON validation passed
    • a second authoritative dry run reported 0 stale owners

    The scheduled broader maintenance GC was temporarily unloaded during this operation, so no orchestration DB pruning, Codex-history archival, Postgres cleanup, worktree removal, or terminal stop ran concurrently.

    Session continuity was preserved:

    • the daemon process and launch identity remained alive across the desktop-main restart
    • all 11 pre-restart PTYs returned after restart
    • every PTY retained the same ptyId and incarnationId
    • all 11 reported connected=true and writable=true
    • the scheduled maintenance GC was then restored

    Immediate post-restart control:

    • runtime and graph both reached ready
    • orca-data.json is now about 2.45 MB
    • worktreeMeta remains 49 after startup and a live re-scan still reports 0 stale owners
    • main CPU sampled at 6.2-12.8% during the first minute, with roughly 430-500 MiB RSS
    • the existing 2-second incident monitor is following the new main PID

    This establishes that authoritative-absence pruning can reduce the affected state by two orders of magnitude without terminating the daemon-backed working sessions. It does not yet prove that the permanent 100% main-process wedge is eliminated; the next comparison is whether the same workload survives beyond the previous roughly 83-minute time-to-failure, with automatic capture if main CPU again remains above threshold.

  8. seanssoh commented on Aug 19, 2026

    @seanssoh
    Author

    Follow-up correction with the fatal incident captured after the offline stale-state prune:

    • The prior offline prune (2,757 worktreeMeta entries -> 49) fixed a real accumulation problem, but it did not prevent the main-process failure. After the 13:29:42 KST relaunch, the first sustained main hot segment began at 13:41:59. The final fatal segment ran from 14:49:32 through the last monitor sample at 15:01:47 (~12m15s), mostly ~99-103% main CPU (observed max 233%) with roughly 2.36-2.86 GiB RSS.
    • macOS wrote Orca-2026-08-19-150211.ips for the old main PID 70752: EXC_BREAKPOINT / SIGTRAP, faulting thread 0 (CrBrowserMain). The native stack is in the same V8/Node async-filesystem family seen in the earlier samples, including node::fs::FSReqCallback::Resolve and node::fs::AfterInteger. We still cannot identify the exact bundled JS continuation from native symbols alone.
    • The UI did not relaunch itself via the updater, and the user did not relaunch it. A concurrently active Codex coordination turn checked orca status --json at 15:02:12, observed app.running=false / stale_bootstrap, then explicitly ran orca open --json at 15:02:17 to preserve an active worker flow. That command spawned macOS /usr/bin/open PID 97616; CoreServicesUIAgent/LaunchServices then launched Orca PID 97637. This auto-open masked the crash from the operator. App version remained 1.4.184 and updater artifacts were unchanged.
    • During the final hot interval, terminal-history data continued changing (about 16.1 MiB at incident capture, about 20.3 MiB at the last pre-crash sample). Between 14:48 and the crash there were 231 traced git.exec spans (16.6s aggregate) and 3 successful worktree.remove spans (7.9s aggregate). Those are plausible triggers/amplifiers but their traced duration does not explain the 12-minute CPU loop.
    • The incident sampler's sample(1) of the wedged main process timed out at 14:49, but the macOS crash report preserved the fatal stack. Renderer CPU was not the driver.
    • Active terminal processes survived because the PTY daemon is separate from the GUI/main process.

    Updated conclusion: authoritative-absence GC and batching remain valid fixes for stale worktree amplification, but they are insufficient as the root fix. The remaining evidence points to a main-process filesystem/terminal-history continuation or backlog loop, likely amplified by concurrent Git/worktree churn.

  9. nwparker commented on Aug 19, 2026

    @nwparker
    Contributor

    This is alot of text to read. @seanssoh could you consolidate it down to a simplier message? We're happy to help but that's alot!

  10. seanssoh commented on Aug 19, 2026

    @seanssoh
    Author

    Additional longitudinal evidence from the same post-crash PID 97637 (launched 15:02:17 KST):

    • The app/runtime remained reachable and the PID did not change, but the main process entered five later sustained high-CPU episode groups before 21:05. Grouping samples at >=80% with a 2s cadence gives 13 sustained segments (>=3 samples), ~4,688s total. The longest were 18m27s (20:08:55-20:27:20 KST), 18m17s (20:46:16-21:04:31), 13m41s (18:42:11-18:55:50), and 12m52s (19:47:27-20:00:17). Observed main CPU peaked at 323.6%; RSS peaked at 4,475,232 KiB (~4.27 GiB). These episodes self-recovered without a process restart.
    • A sixth episode began at 21:25:06 KST and was still active at 21:26:33: monitor samples held ~100-102% main CPU while renderer stayed ~1-6%. Main RSS rose from ~1.89 GiB to ~2.00 GiB over the latest samples. A fresh sample(1) again captured the same dominant main-thread path: libuv work completion -> node::MakeLibuvRequestCallback<uv_fs_s> -> node::fs::AfterInteger -> node::fs::FSReqCallback::Resolve -> V8/JIT continuation.
    • Every one of the six incident samples captured since 18:35 contains node::fs::FSReqCallback::Resolve.
    • Important symptom distinction: during the current sixth episode the operator reports no perceptible typing or screen-render delay yet, despite the main process being saturated. This suggests main saturation is an early/internal phase and not by itself sufficient for the visible freeze; the user-visible latency may require additional backlog or memory growth. Renderer CPU remaining low is consistent with that distinction.
    • At 21:24, immediately before the sixth episode, the runtime and graph were both ready, main CPU was ~8%, and the app had been up 6h22m with no additional crash report.

    This makes the issue recurrent rather than a one-off crash, but also shows that episodes can recover and can remain temporarily invisible to the operator.

  11. seanssoh commented on Aug 19, 2026

    @seanssoh
    Author

    Overnight longitudinal update from the same PID 97637, covering 22:25 KST through 04:44 KST:

    • No restart and no additional macOS crash report. The app/runtime/graph remained reachable and ready.
    • Seven more main-process high-CPU episodes were captured. The striking new signal is their near-fixed duration:
      • 22:37:00-22:53:51 (~16m51s)
      • 23:05:30-23:22:29 (~16m59s)
      • 23:44:32-00:01:18 (~16m46s)
      • 01:30:59-01:47:51 (~16m52s)
      • 02:48:48-03:05:38 (~16m50s)
      • 03:47:47-04:04:34 (~16m47s)
      • 04:13:41-04:30:39 (~16m58s)
    • The small ~13s break immediately after each 3-sample trigger is the monitor synchronously taking main+renderer samples; the high condition is present on both sides of that capture gap.
    • Strict >=80% samples account for 7,014s (~1h56m54s) in this 6h19m window. Main CPU peaked at 228.7%, p95 was 102.5%, and RSS peaked at 2,690,608 KiB (~2.57 GiB). Current state at 04:44 was recovered: main ~11-14%, renderer low, RSS ~1.8 GiB.
    • Trigger intervals vary, but the hot-phase duration is remarkably stable at ~16m50s. That makes a deterministic timer, retry/backoff, bounded queue drain, or timeout-driven processing path more plausible than random load.
    • These remain main-process episodes; the previous incident samples consistently showed the Node fs completion -> V8 continuation path.

    This strengthens the case for instrumenting the JS continuation around filesystem completion and correlating it with timer/retry boundaries.

  12. seanssoh commented on Aug 20, 2026

    @seanssoh
    Author

    Version 1.4.185 update: the same issue is still reproducible.

    • The current Orca main PID is 97412, launched 2026-08-20 05:45:46 KST, running app version 1.4.185. Runtime and graph remain ready.
    • At 20:31 KST, six consecutive external measurements held the main process at 94.8-103.4% CPU; monitor samples remained ~100-103% with brief peaks above 200%. Renderer was mostly ~8-16%, so main remains the dominant consumer.
    • RSS during the live recurrence was roughly 2.3-2.6 GiB.
    • The current sequence includes a sustained run from approximately 19:50:01-20:08:38, then another recurrence beginning 20:15:14 and continuing through at least 20:31:44, with only short low-CPU gaps. Monitor incidents were captured at 20:04:44 and 20:24:45.
    • No restart or mitigation was performed during this check.

    This confirms that updating from 1.4.184 to 1.4.185 did not resolve the main-process high-CPU loop.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions