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
[Feature]: Automatically close successful workspace setup tabs #25071
Creating a fresh worktree with Pi leaves two tabs: the Pi conversation and a terminal showing the completed repository setup (pnpm install) at a shell prompt. I expected to continue with just the agent tab after setup succeeded, rather than close the setup terminal manually each time.
This happened during new worktree creation, not a session resume. The extra tab displayed a shell title instead of “Setup,” which initially made it look like an unexplained duplicate launch. The title is a separate concern; this request is about the successful setup terminal remaining open.
Observed sequence
Create a new worktree with Pi and repository setup enabled.
Setup runs in a separate terminal and completes successfully.
Pi remains available, but the completed setup terminal stays open at a shell prompt.
Read-only inspection of the affected Linux runtime (Orca 1.4.219, accessed from a macOS client) found two distinct terminals, not two Pi sessions. The daemon log records fresh terminal creation on 2026-10-03:
The labels in brackets come from matching the session IDs to the live terminal inventory, not from the log itself. The terminals were created 33 ms apart. The second terminal's retained output ends with:
Done in 4.5s using pnpm v12.0.0
<shell prompt>
Proposed solution
Offer an option to close the setup tab automatically when setup succeeds, while keeping it open on failure so errors can be inspected.
Existing PR #22611 would address this request. Its proposed “Close Setup Tab When It Succeeds” setting is the behavior I want. This issue records a real user case for that PR, not a request for a competing implementation.
Alternatives or additional context
Current workaround: close the completed setup tab manually.
Separate setup tabs are intentional today; this is a workflow improvement, not a claim that Pi launched twice.
Source checked at upstream/main752871bd678935e07a36e84b64a7a1ce944377e4: src/renderer/src/lib/worktree-setup-issue-command-queue.ts explicitly creates a separate setup tab in new-tab mode.
Same on macOS, Orca 1.4.248, with Claude Code as the agent. Repo setup is npm install (setupRunPolicy: run-by-default, setupAgentStartupPolicy: start-immediately). Each new worktree leaves a second tab showing the raw wrapper command (bash -lc '... setup-runner.sh; ... __ORCA_SETUP_COMPLETE__:<id>:0') at a shell prompt, which looked like a duplicate Claude launch until I traced it to the setup hook. +1 for #22611's close-on-success option.
Another data point for this request, from a headless setup, plus a consequence beyond tab clutter.
Setup: Orca 1.4.257 on Linux, running as orca serve. A repo setup script is configured (setupRunPolicy: run-by-default, setupAgentStartupPolicy: wait-for-setup). When a worktree is created, Orca opens an interactive shell terminal titled "Setup" and runs bash <git-common-dir>/orca/setup-runner.sh in it. When the script finishes, the shell stays open indefinitely.
Why this matters beyond the extra tab: the leftover shell is a live terminal. After a worktree's PR is merged and its agent is gone, orca worktree ps still reports it as status "active" with liveTerminalCount 1-2, only because of the leftover Setup shell (plus the initial startup shell). Finished worktrees therefore look in use and are not cleaned up. In our case the leftover agents and MCP servers in those worktrees accumulated memory and contributed to a host OOM that killed the Orca server.
So the opt-in "close the Setup tab when setup succeeds" behavior proposed in #22611 would also fix this. Two requirements from our side:
With wait-for-setup, the completion marker the waiting agent depends on must still be written before the shell exits. feat(setup): optionally close the setup tab when setup succeeds #22611's description says this is the case. Closing the shell from inside the setup script by hand (killing the parent shell) can race that marker, so a built-in option is much safer than a script-side workaround; exit inside the script only ends the child bash, so it does not help.
Happy to test a build of #22611 on a Linux orca serve host if that is useful.
Activity
xflykkk commentedon Nov 4, 2026
Same on macOS, Orca 1.4.248, with Claude Code as the agent. Repo setup is
npm install(setupRunPolicy: run-by-default,setupAgentStartupPolicy: start-immediately). Each new worktree leaves a second tab showing the raw wrapper command (bash -lc '... setup-runner.sh; ... __ORCA_SETUP_COMPLETE__:<id>:0') at a shell prompt, which looked like a duplicate Claude launch until I traced it to the setup hook. +1 for #22611's close-on-success option.unitea1992 commentedon Nov 13, 2026
Another data point for this request, from a headless setup, plus a consequence beyond tab clutter.
Setup: Orca 1.4.257 on Linux, running as
orca serve. A repo setup script is configured (setupRunPolicy: run-by-default,setupAgentStartupPolicy: wait-for-setup). When a worktree is created, Orca opens an interactive shell terminal titled "Setup" and runsbash <git-common-dir>/orca/setup-runner.shin it. When the script finishes, the shell stays open indefinitely.Why this matters beyond the extra tab: the leftover shell is a live terminal. After a worktree's PR is merged and its agent is gone,
orca worktree psstill reports it as status "active" withliveTerminalCount1-2, only because of the leftover Setup shell (plus the initial startup shell). Finished worktrees therefore look in use and are not cleaned up. In our case the leftover agents and MCP servers in those worktrees accumulated memory and contributed to a host OOM that killed the Orca server.So the opt-in "close the Setup tab when setup succeeds" behavior proposed in #22611 would also fix this. Two requirements from our side:
wait-for-setup, the completion marker the waiting agent depends on must still be written before the shell exits. feat(setup): optionally close the setup tab when setup succeeds #22611's description says this is the case. Closing the shell from inside the setup script by hand (killing the parent shell) can race that marker, so a built-in option is much safer than a script-side workaround;exitinside the script only ends the childbash, so it does not help.Happy to test a build of #22611 on a Linux
orca servehost if that is useful.Lamer217 commentedon Nov 13, 2026
I need this too! I'm tired of closing idle terminal tabs that have long done their job.