You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
on submidule-heavy repos, worktree create hangs ~30s → runtime_unavailable and orphans a git worktree on submodule-heavy repos under load (macOS 1.4.121) #7410
orca worktree create intermittently fails on a repository that contains many git submodules: it hangs for ~30s, then returns runtime_unavailable (runtimeId: null), and leaves behind a git-level worktree that Orca never registers (an orphan). The identical operation on a repository with no submodules succeeds in under a second.
Environment
Orca 1.4.121, macOS
Invoked via the CLI: orca worktree create … --json
However, a git worktree + branch were created on disk and are not listed by orca worktree list (orphaned — they must be cleaned up manually with git worktree remove --force + git branch -D).
Plain repo (no submodules) — the same command against a submodule-free repo, at the same moment under the same load, succeeds in ~0.7s and is registered cleanly.
The only variable that differs between the two arms is the target repo (submodule-heavy vs. plain), so the failure correlates with submodule handling during worktree creation, not with generic runtime load.
Impact
The CLI reports failure while a real git worktree is left behind → orphan worktrees accumulate and need manual cleanup.
Scripts/agents that create child worktrees on submodule repos cannot rely on the create call succeeding under load.
Notes
No blockedReason field appears in the failure response.
Not yet isolated to a specific submodule step (e.g. submodule init/checkout during create). Happy to provide additional detail or logs.
min ≈ <1 MB, median ≈ 6 MB, max ≈ 227 MB, total checkout ≈ 646 MB
The two largest are ≈227 MB and ≈167 MB; the rest are mostly under ~10 MB.
Combined submodule git histories (.git/modules — i.e. what a fresh worktree's submodule init/checkout has to materialize): ≈2.5 GB. Main-repo object store (.git/objects): ≈589 MB.
The submodule-free control repo (which succeeded in ~0.7 s under the same load) had 0 submodules and only a few KB of content. So the failure appears to scale with submodule count / combined submodule git-history size, consistent with worktree create blocking on submodule init/checkout rather than on generic runtime load.
changed the title [-]worktree create hangs ~30s → runtime_unavailable and orphans a git worktree on submodule-heavy repos under load (macOS 1.4.121)[/-][+]on submidule-heavy repos, worktree create hangs ~30s → runtime_unavailable and orphans a git worktree on submodule-heavy repos under load (macOS 1.4.121)[/+]on Jul 5, 2026
Same failure mode on Windows, but with two data points that argue against submodules being the necessary cause — and that widen the scope beyond worktree create.
1. Reproduced with zero submodules
Orca app running, runtime ready/reachable before and after each attempt.
git submodule status on the affected repo returns 0 entries.
Single repo, single worktree registered, no heavy concurrent load (2 agent sessions).
So the submodule-heavy + under-load combination reproduces it, but is not required.
2. It is not limited to worktree create — it hits anything that touches the UI/browser layer
Measured across 8 CLI calls on the same runtime, back to back:
That split was stable — metadata calls kept succeeding immediately after each failure.
3. The work completes; only the response is lost
This is the part that costs users the most. tab create returned:
{"ok": false, "error": {"code": "runtime_unavailable",
"message": "The Orca runtime closed the connection before responding."}}
…and the very next tab list showed the tab created and live (correct URL and title). Same for worktree create: the git worktree and branch existed on disk every time.
Because the error text describes a dropped connection rather than the outcome, it reads as "nothing
happened". Retrying with different arguments produced four worktrees and four branches before I
checked actual state — one per "failure". For non-idempotent operations this turns a transient
transport error into repeated real side effects.
Suggestions
Consider making the CLI re-query state on runtime_unavailable for create-style commands, or at
minimum change the message to say the operation may have completed — e.g. runtime_unavailable: response lost; verify state before retrying.
worktree rm --worktree name:<name> worked reliably for cleanup, including for entries created
during failed calls — worth mentioning in the error hint.
Minor, possibly separate: the error suggests a flag that does not exist
Calling worktree create without a base ref returns:
Could not resolve a default base ref for this repo. Pass an explicit --base and try again.
But the parser rejects it:
Unknown flag --base for command: worktree create — with base-branch listed among valid flags.
Environment
Windows 11, Orca desktop app, CLI via resources/bin/orca.cmd
Runtime stayed ready and reachable throughout; the app never needed restarting to answer
metadata calls
One residual empty directory from a failed worktree create kept an open handle (removable only
after restarting the app)
Came looking for this - this also occurs for us. We use a monorepo so it is quite large, but zero git submodules - I consistently have this issue where I get "runtime_unavailable" after a period of time waiting for the worktree to create. It always successfully does, but the spawning terminal doesn't see it and instead gets the runtime available error.
I think the PR open against this issue will resolve it - would love to see it come in!
Fixed by #29262: the socket no longer times out while a long worktree create is still running, which caused the runtime_unavailable error and the orphaned worktree.
Activity
soichisumi commentedon Jul 5, 2026
Additional context: submodule count and sizes (reproduction environment)
The affected repo has 19 git submodules (Orca 1.4.121, macOS).
Per-submodule checked-out sizes (MB), sorted ascending:
0, 1, 1, 1, 2, 3, 4, 5, 6, 6, 8, 10, 19, 34, 37, 44, 71, 167, 227Combined submodule git histories (
.git/modules— i.e. what a fresh worktree's submodule init/checkout has to materialize): ≈2.5 GB. Main-repo object store (.git/objects): ≈589 MB.The submodule-free control repo (which succeeded in ~0.7 s under the same load) had 0 submodules and only a few KB of content. So the failure appears to scale with submodule count / combined submodule git-history size, consistent with
worktree createblocking on submodule init/checkout rather than on generic runtime load.[-]worktree create hangs ~30s → runtime_unavailable and orphans a git worktree on submodule-heavy repos under load (macOS 1.4.121)[/-][+]on submidule-heavy repos, worktree create hangs ~30s → runtime_unavailable and orphans a git worktree on submodule-heavy repos under load (macOS 1.4.121)[/+]AmethystLiang commentedon Jul 5, 2026
thx for reporting. will get this resolved soon
andromeda-vinicius commentedon Jul 26, 2026
Same failure mode on Windows, but with two data points that argue against submodules being the necessary cause — and that widen the scope beyond
worktree create.1. Reproduced with zero submodules
running, runtimeready/reachablebefore and after each attempt.git submodule statuson the affected repo returns 0 entries.So the submodule-heavy + under-load combination reproduces it, but is not required.
2. It is not limited to
worktree create— it hits anything that touches the UI/browser layerMeasured across 8 CLI calls on the same runtime, back to back:
status,tab list,tab close,worktree list,worktree rm,repo set-base-refok: trueworktree create,tab create,snapshotruntime_unavailable,runtimeId: nullThat split was stable — metadata calls kept succeeding immediately after each failure.
3. The work completes; only the response is lost
This is the part that costs users the most.
tab createreturned:{"ok": false, "error": {"code": "runtime_unavailable", "message": "The Orca runtime closed the connection before responding."}}…and the very next
tab listshowed the tab created and live (correct URL and title). Same forworktree create: the git worktree and branch existed on disk every time.Because the error text describes a dropped connection rather than the outcome, it reads as "nothing
happened". Retrying with different arguments produced four worktrees and four branches before I
checked actual state — one per "failure". For non-idempotent operations this turns a transient
transport error into repeated real side effects.
Suggestions
runtime_unavailablefor create-style commands, or atminimum change the message to say the operation may have completed — e.g.
runtime_unavailable: response lost; verify state before retrying.worktree rm --worktree name:<name>worked reliably for cleanup, including for entries createdduring failed calls — worth mentioning in the error hint.
Minor, possibly separate: the error suggests a flag that does not exist
Calling
worktree createwithout a base ref returns:But the parser rejects it:
Environment
resources/bin/orca.cmdreadyandreachablethroughout; the app never needed restarting to answermetadata calls
worktree createkept an open handle (removable onlyafter restarting the app)
codinronan commentedon Sep 23, 2026
Came looking for this - this also occurs for us. We use a monorepo so it is quite large, but zero git submodules - I consistently have this issue where I get "runtime_unavailable" after a period of time waiting for the worktree to create. It always successfully does, but the spawning terminal doesn't see it and instead gets the runtime available error.
I think the PR open against this issue will resolve it - would love to see it come in!
AmoabaKelvin commentedon Nov 17, 2026
Fixed by #29262: the socket no longer times out while a long worktree create is still running, which caused the runtime_unavailable error and the orphaned worktree.