Repository navigation
Conversation
This was referenced Aug 17, 2026
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
from
August 30, 2026 00:50
4214d7d to
6ef707d
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 30, 2026 00:50
ef067ef to
25634e2
Compare
10 tasks done
Greptile SummaryThe PR consolidates packaged CLI launch redirection, shares command-boundary parsing, keeps direct serve launches in Electron, and adds Linux launcher and signal-handling support.
Confidence Score: 4/5The PR is not yet safe to merge because the previously reported command-named project selector can still be discarded and produce unfiltered results. The new scanner still selects the value in Files Needing Attention: src/shared/cli-argument-boundary.ts, src/cli/args.ts, src/cli/args.test.ts
|
| Filename | Overview |
|---|---|
| src/shared/cli-argument-boundary.ts | Introduces shared command-boundary detection, but the previously reported command-named selector case remains reachable. |
| src/cli/args.ts | Adopts the shared boundary helper; a selector immediately preceding a matching command can still be stored as boolean rather than as its string value. |
| src/main/startup/cli-launch-redirect.ts | Consolidates packaged entry-path and Linux command-form redirection with recursion fencing and environment sanitation. |
| src/cli/runtime/launch.ts | Adds extracted-AppImage sandbox fallback for open and serve child launches. |
| src/cli/args.test.ts | Adds selector regression coverage, but the split-token fixture differs from the exact outstanding three-token invocation. |
| src/main/index.ts | Installs the unified redirect before serve-mode argv normalization. |
| src/cli/runtime/serve-update-supervisor.ts | Extends Linux foreground serve signal forwarding to SIGHUP. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Packaged Electron invocation] --> B{CLI entry path or Linux command detected?}
B -->|Non-serve CLI| C[Restart Electron with ELECTRON_RUN_AS_NODE]
B -->|Direct serve| D[Normalize serve argv in main process]
B -->|Desktop launch| E[Continue Chromium startup]
C --> F[CLI parser and command handler]
D --> G[Serve lifecycle and signal ownership]
Reviews (22): Last reviewed commit: "fix(linux): strip injected Chromium swit..." | Re-trigger Greptile
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 30, 2026 02:09
25634e2 to
8152f54
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
from
August 30, 2026 02:14
6ef707d to
7e3a2ce
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 30, 2026 03:42
8152f54 to
8f709a4
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
from
August 30, 2026 03:42
7e3a2ce to
de05897
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 30, 2026 04:22
8f709a4 to
5b57909
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
2 times, most recently
from
August 30, 2026 04:57
3d9f13c to
ec38c08
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 30, 2026 05:09
ea9526a to
3b22569
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
2 times, most recently
from
August 30, 2026 05:15
3375af7 to
746490c
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
2 times, most recently
from
August 30, 2026 06:24
34926b9 to
bdf2c36
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
from
August 30, 2026 06:26
746490c to
a3d0e25
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 30, 2026 08:28
bdf2c36 to
c60eb21
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
2 times, most recently
from
August 30, 2026 08:35
7350a97 to
6f3166e
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 30, 2026 08:37
c60eb21 to
e00978c
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 30, 2026 08:58
e00978c to
9c8586f
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
from
August 30, 2026 08:58
6f3166e to
1e152b9
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 30, 2026 09:21
9c8586f to
77671b3
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
from
August 30, 2026 09:21
1e152b9 to
e40c806
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 31, 2026 03:13
3279a24 to
1cd8794
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
from
August 31, 2026 03:13
3618edc to
1e37307
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 31, 2026 03:27
1cd8794 to
fd9f582
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
2 times, most recently
from
August 31, 2026 05:19
2bc13e6 to
e7c373b
Compare
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
2 times, most recently
from
August 31, 2026 11:59
486d1a6 to
a1318ea
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
from
August 31, 2026 11:59
e7c373b to
aba62d5
Compare
This was referenced Aug 31, 2026
nwparker
force-pushed
the
nwparker/linux-cli-single-entrypoint
branch
from
August 31, 2026 13:02
a1318ea to
15e1388
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
from
August 31, 2026 13:03
aba62d5 to
000f798
Compare
9 tasks done
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
2 times, most recently
from
September 1, 2026 10:07
d06b724 to
5435a61
Compare
nwparker
force-pushed
the
nwparker/linux-cli-launch-redirect
branch
from
September 1, 2026 10:28
5435a61 to
4f90ecf
Compare
nwparker
merged commit Sep 1, 2026
b88f03f
into
nwparker/linux-cli-single-entrypoint
32 checks passed
This was referenced Sep 2, 2026
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Linux CLI commands are launched by an Electron binary. If Orca fails to recognize a command, the process continues into Chromium instead of running as Node; on a headless host that can crash before printing anything. This PR unifies the launch redirect, covers every current CLI command, and makes command-list drift fail CI.
What Changed
cli-launch-redirect.servein the Electron process so its signal handlers own the server, Xvfb, and daemon lifecycle; help still routes to the CLI.--environment statusare not mistaken for commands.COMMAND_SPECS.ELECTRON_RUN_AS_NODE=1unconditionally.SIGHUPthrough the serve supervisor.The consolidation reduces net production code while retaining the Windows entry-path behavior.
Why
Ten top-level commands were missing from the previous hand-maintained list, including
skills,diagnostics,project, andvm. The old redirect also required AppImage environment state, so extracted trees and deb/rpm installs could skip it. In either case a text command fell through to Chromium startup and could die during display initialization (#14229).Chromium sandbox failures that occur before JavaScript remain outside an in-process redirect. The bundled
resources/bin/orca-idelauncher is the supported boundary because Electron readsELECTRON_RUN_AS_NODEbefore Chromium initializes; #15081 gives AppImage installs a stable path to that launcher.Linked Issue
Fixes #14229
Fixes #13004
Refs #17412
Visual Proof
N/A — Linux CLI startup behavior only; no rendered UI changes.
Testing
pnpm tc:nodepnpm tc:cligit diff --checkStack readiness evidence on the published rebased stack (main@212c0e42): 56 changed test files, 785 tests passed, and 4 platform-gated skips. Typecheck, reliability/max-lines/runtime-Electron ratchets, changed-code quality/React Doctor, formatting, oxlint, shellcheck, and
git diff --checkpassed. The full-suite control run had 7 failures in 3 untouched files: the zsh non-ASCII wrapper rename collision, the SSH host-key mock's missingssh2.utils, and a renderer context-menu failure seen only in the full run (the isolated test passed). The zsh and SSH failures reproduce on pristineorigin/main; fresh CI is running on the published heads.Coverage includes both argv shapes, Linux/macOS/Windows gating, case-insensitive Windows paths, global flag values, help and direct serve, Chromium-switch placement, recursion, missing entrypoints, spawn failure, environment sanitation, extracted-tree sandbox fallback, signal forwarding, command-spec parity, command-named project selectors in both split and equals forms (
--project project project setupsand--project=project project setups),open-urlredirection, and the AUR serve wrapper injected desktop flags.The elegance pass removed a redundant command-membership check and uses the shared boundary result directly.
AI Disclosure
Review
PR 2 of 7, stacked on #15081.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
No wire, mobile, persistence, or provider contract changes; no mobile-facing RPC/protocol/pairing surface was touched.
Windows retains the trusted entry-path redirect; direct command matching remains Linux-only.
Folder workspaces and SSH targets are unaffected because redirection occurs in the local packaged process before workspace resolution.
Residual P2: an unknown split-token Chromium value flag whose value exactly matches a CLI command remains ambiguous; the equals form is unambiguous.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)User-facing regressions
None identified.
The redirect keeps its
isPackagedgate but no longer requires!env.APPIMAGE && !env.APPDIR, so it now also covers extracted-AppRun launches. That broadening is deliberate and is required by the extraction work in #15081 — without it, a CLI command run through the extracted launcher would fall through to a GUI launch. Review looked specifically for a case where a launch that previously opened the GUI is now redirected to the CLI and did not find one.Verified by the packaged-artifact contract in #15085: both direct-binary cases and both GUI cases pass on this stack and crash at status 133 against a stock release AppImage.