remove local user agent#1242
Conversation
The headless apps/local server is always launched by the executor CLI (executor mcp / web / daemon run / installed service) unless the desktop app spawns it with EXECUTOR_CLIENT=desktop. Report it as cli instead of local and narrow SurfaceClient to cli | desktop so the surface is only ever one of the two.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 1c83945 | Commit Preview URL Branch Preview URL |
Jul 01 2026, 08:19 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 1c83945 | Jul 01 2026, 08:19 PM |
Greptile SummaryThis PR removes the
Confidence Score: 5/5Safe to merge — the change is a clean rename/narrowing with no behavioural risk in normal launch paths. The env-var stamping uses No files require special attention. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Desktop as Desktop App
participant CLI as executor CLI (main.ts)
participant Env as process.env
participant Local as apps/local (installation.ts)
participant UA as User-Agent
Note over CLI: import "./native-bindings"
Note over CLI: import "./client-env"
CLI->>Env: "EXECUTOR_CLIENT ??= "cli""
alt Desktop launched CLI
Desktop->>Env: "EXECUTOR_CLIENT = "desktop" (pre-set)"
Note over Env: ??= preserves "desktop"
end
Note over Local: module init — resolveClient()
Local->>Env: read EXECUTOR_CLIENT
alt value in ["cli","desktop"]
Env-->>Local: "cli" or "desktop"
else missing / unknown value
Env-->>Local: fallback → "cli"
end
Local->>UA: "buildUserAgent({ client: "cli" | "desktop" })"
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Desktop as Desktop App
participant CLI as executor CLI (main.ts)
participant Env as process.env
participant Local as apps/local (installation.ts)
participant UA as User-Agent
Note over CLI: import "./native-bindings"
Note over CLI: import "./client-env"
CLI->>Env: "EXECUTOR_CLIENT ??= "cli""
alt Desktop launched CLI
Desktop->>Env: "EXECUTOR_CLIENT = "desktop" (pre-set)"
Note over Env: ??= preserves "desktop"
end
Note over Local: module init — resolveClient()
Local->>Env: read EXECUTOR_CLIENT
alt value in ["cli","desktop"]
Env-->>Local: "cli" or "desktop"
else missing / unknown value
Env-->>Local: fallback → "cli"
end
Local->>UA: "buildUserAgent({ client: "cli" | "desktop" })"
Reviews (2): Last reviewed commit: "always set EXECUTOR_CLIENT so the surfac..." | Re-trigger Greptile |
Cloudflare previewTorn down — the PR is closed. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
The CLI now stamps EXECUTOR_CLIENT=cli at startup (preserving desktop's own EXECUTOR_CLIENT=desktop), so the in-process apps/local server always sees an explicit surface. apps/local passes the value through, validated, instead of defaulting not-desktop to a guess.
The headless
apps/localserver is always launched by theexecutorCLI (executor mcp/web/daemon run/ the installed background service) unless the desktop app spawns it withEXECUTOR_CLIENT=desktop. Report it ascliinstead oflocal, and narrowSurfaceClienttocli | desktopso the User-Agent surface is only ever one of the two.apps/localclient resolver falls back tocli(desktop still wins whenEXECUTOR_CLIENT=desktop)SurfaceClienttype narrowed to"cli" | "desktop", compiler-enforcedlocal