orca icon indicating copy to clipboard operation
orca copied to clipboard

Suppress Git Credential Manager OAuth popup loop in Orca-run git — clone, terminals/agents, setup hooks (fixes #7652)

Open brennanb2025 opened this issue 4 months ago • 7 comments

Summary

Fixes #7652 — the GitHub "OAuth popup" that repeatedly triggers in network-restricted (intranet) environments on Windows.

The popup in the report is Git Credential Manager's "Connect to GitHub" window (the Browser/Device + Token tabs), not Orca UI. GCM pops it whenever a git process needs GitHub credentials and interactive prompting isn't suppressed; in a network that can't reach github.com the sign-in can never complete, git's credential retry re-invokes the helper, and the window loops.

An audit confirmed Orca has no code path of its own that opens a GitHub sign-in window (the embedded browser denies all popups, gh auth login is never spawned, the only auto-run auth probe is a read-only gh auth status). Every popup therefore comes from a git subprocess, and the fix is to guard every environment Orca constructs in which git runs.

The short version

On Windows, Git Credential Manager (GCM) is git's default credential helper. When a git process needs GitHub credentials and has no cached token, GCM opens its "Connect to GitHub" sign-in window. On a machine that can't reach github.com, that sign-in can never complete — and git's credential retry invokes the helper again, so the window reopens in a loop.

Orca runs git in many places: its own clone/fetch/push calls, setup/archive hook scripts, and — most importantly — the terminals where coding agents run git fetch / git pull --rebase / push retries on Orca's own instruction. Most app-run git was already non-interactive; the two clone spawns, the hook scripts, and every terminal environment were not.

The fix is environment-level: GIT_TERMINAL_PROMPT=0 (git errors out instead of prompting), plus GCM_INTERACTIVE=never and credential.interactive=false via the GIT_CONFIG_* env protocol (GCM still serves cached credentials but never shows UI). The credential helper itself stays configured, so anyone with a working token notices nothing; without one, git fails fast with its normal error instead of looping a window. Scope: agent terminals on every platform (an agent can't interact with a prompt anyway); user terminals only on Windows hosts, default on, with a Settings toggle to opt out; clone/hook paths everywhere. For git running inside WSL, the guard vars are registered in WSLENV so wsl.exe imports them into the distro — Windows-side env doesn't cross that boundary on its own.

What this PR does

The guard is promptGuardGitEnv / nonInteractiveGitEnv (GIT_TERMINAL_PROMPT=0, GCM_INTERACTIVE=never, credential.interactive=false, credential.guiPrompt=false, empty askpass). The credential helper is always preserved — cached gh/GCM tokens keep working for clone/fetch/push; only the interactive fallback prompt is disabled, so git fails fast with a clear error instead of looping a window.

1. App-run git clones (repos:clone in src/main/ipc/repos.ts, serve/remote clone in src/main/runtime/orca-runtime.ts) These were the only two network git spawns not already routed through the guarded runner (gitExecFileAsync/gitStreamStdout guard unconditionally; interactive-prompt guard history: #7301, #5308). Both now pass nonInteractiveGitEnv().

2. Terminal environments (buildPtyHostEnv via src/main/ipc/terminal-git-credential-guard.ts) This is the likely primary trigger for the reported loop: Orca's agent prompts instruct agents to run git fetch / git pull --rebase and to retry failed pushes, and agents resume around startup — matching the issue's "popup on startup" symptom. Coverage spans all three PTY spawn paths (local provider hook, daemon-host spawn, and the runtime PTY controller that serves SSH/remote clients).

  • Agent terminals are guarded unconditionally on every platform — an agent can't answer a credential prompt, so failing fast beats hanging, and this matches how mature desktop dev tools treat tool-spawned terminals.
  • User terminals are guarded only on Windows terminal hosts (default on). The popup is a Windows credential-manager behavior; on macOS/Linux the guard would only remove working tty prompts from an interactive user, so those platforms are left untouched.
  • Users can opt out via Settings → Terminal → Advanced → "Block Git Credential Popups" (terminalSuppressGitCredentialPrompt, shown on Windows terminal hosts, searchable, localized). Agent terminals stay guarded regardless.

3. Setup / archive hook scripts (src/main/hooks.ts) Hooks run unattended on worktree create/archive; a git fetch/submodule update inside one could pop GCM. Both hook branches are guarded — the native one and the wsl.exe one (WSL repos are the likeliest to hit the popup, and the guard's WSLENV registration is what carries it into the distro). The shell-env guard variant is used, so a hook keeps the user's locale and ssh config.

4. WSL boundary forwarding (src/main/git/runner.ts) wsl.exe only imports env vars named in WSLENV, so WSL-routed git (WSL clone destinations, WSL shells in terminals) previously never saw the guard — and WSL setups commonly configure the Windows GCM as git's credential helper, which pops the same window. promptGuardGitEnv now registers GIT_TERMINAL_PROMPT, GCM_INTERACTIVE, and the GIT_CONFIG_* protocol vars in WSLENV on Windows (merge-preserving; a caller's existing WSLENV is kept byte-for-byte). Askpass vars are deliberately not forwarded — a Windows askpass path is meaningless inside a distro. nonInteractiveGitEnv forwards GIT_SSH_COMMAND only when it set the default (ssh -o BatchMode=yes) itself, so a caller's Windows-specific ssh command can't leak into Linux git.

5. Review hardening (two independent adversarial review passes over the final diff)

  • The guard no longer leaks the git-runner English locale pins (issue #7808's LC_ALL/LANG/LANGUAGE) into terminal or hook environments — a user's shell locale is preserved (promptGuardShellEnv).
  • Headless one-shot agent launches (e.g. claude -p …) are classified as agent terminals and guarded — they can answer a prompt even less than a TUI agent.
  • Daemon-backed terminals no longer have an inherited non-interactive askpass clobbered by a materialized empty value (preserve-when-set holds on both spawn paths).
  • The settings toggle is wired into the live settings-search index, and its search keywords are in the locale catalogs so they can actually be localized.
  • The clone regression test asserts the real guard env (vi.importActual) instead of a mock echoing itself.

User-visible behavior

Scenario Before After
Windows intranet, agent runs git needing auth GCM window loops git fails fast; existing "not authenticated" state stands
Clone of auth-required repo, no cached creds GCM window (Windows) or hang fails fast with git's stderr surfaced
Cached-credential clone/fetch/push (public or private) works works (helper preserved)
git push in a user terminal, macOS/Linux tty prompt unchanged — tty prompt still works
git push in a user terminal, Windows, no cached creds GCM window fails fast; opt-out toggle restores old behavior
gh auth login in any terminal works unchanged (gh's own flow is unaffected by the git guard)
WSL shell / WSL clone destination on Windows guard never crossed into the distro guard forwarded via WSLENV

Evidence

  • Regression tests: clone spawn carries the guard (repos-remote.test.ts); hook env carries the guard (hooks.test.ts); terminal guard platform/agent/opt-out matrix incl. WSLENV registration (terminal-git-credential-guard.test.ts); WSLENV forwarding semantics incl. caller-WSLENV preservation and the GIT_SSH_COMMAND no-leak rule (runner.test.ts).
  • Behavioral verification (PR comments): with the guard env, git clone of an auth-required repo fails fast (fatal: unable to get password from user) instead of invoking an interactive credential helper; a public clone still succeeds. A live user terminal reports GIT_TERMINAL_PROMPT=0 / GCM_INTERACTIVE=never; with the opt-out set, a fresh terminal has neither; agent terminals stay guarded regardless.
  • Note: the GCM GUI is Windows-only and can't be reproduced on the macOS validation host; the guard's effect is verified at the git-process level, which is exactly where GCM hooks in.

Trade-offs

  • On Windows, a user typing git push for an HTTPS remote with no cached credentials now gets a fast git error instead of a GCM sign-in window. Recovery paths are unaffected: gh auth login works in any terminal, cached helpers keep working, and the settings toggle restores interactive prompting.
  • macOS/Linux user terminals are deliberately untouched — there is no popup to suppress there.
  • The clone/hook/agent guards apply on all platforms: those contexts are non-interactive everywhere, and failing fast is strictly better than hanging.

Related: #7374, #2456, #7301, #5308.

Test plan

  • vitest run for the repos/runtime clone suites, hooks, terminal guard, runner, and settings-section suites — pass (289 tests across touched suites, incl. the new #7652 regression tests).
  • typecheck (node + cli + web), oxlint, check:max-lines-ratchet, verify:localization-catalog, verify:localization-coverage — pass. (lint:switch-exhaustiveness fails on notification-authorization-status.ts, pre-existing on the branch's base and already fixed on current main.)

brennanb2025 avatar Jul 09 '26 23:07 brennanb2025

Behavioral evidence

The popup being fixed — this is Git Credential Manager's dialog (from the issue report), not Orca UI. It fires when a git subprocess authenticates to github.com with the interactive prompt enabled:

Connect to GitHub → Browser/Device | Token tabs → "Sign in with your browser" / "Sign in with a code"

GCM is Windows-only, so it cannot be shown on the macOS validation host. The guard hooks in at the git-process level, so the fix is verified there — this is precisely the layer GCM plugs into.

1. With the guard env the fix now applies — auth-required clone fails fast, no interactive prompt/popup:

$ GIT_TERMINAL_PROMPT=0 GCM_INTERACTIVE=never GIT_ASKPASS= \
    git -c credential.interactive=false -c credential.guiPrompt=false \
    clone https://github.com/stablyai/orca-private-does-not-exist-7652.git ...
Cloning into '...'...
fatal: unable to get password from user      # <- refuses to prompt, exits immediately

On Windows the same env makes GCM skip its interactive "Connect to GitHub" OAuth window entirely, so there is no popup to loop.

2. Regression check — legitimate (public / cached-credential) clones still succeed with the same guard env:

$ GIT_TERMINAL_PROMPT=0 GCM_INTERACTIVE=never GIT_ASKPASS= \
    git -c credential.interactive=false \
    clone --depth 1 https://github.com/octocat/Hello-World.git ...
Cloning into '...'...            # exit 0 — README present

The credential helper is preserved, so authenticated clones for private repos keep working; only the interactive fallback popup is disabled.

3. Automated regression test (src/main/ipc/repos-remote.test.ts): asserts repos:clone spawns git clone with env containing GIT_TERMINAL_PROMPT=0 and GCM_INTERACTIVE=never. Full repos/runtime clone suites pass (221 tests).

brennanb2025 avatar Jul 09 '26 23:07 brennanb2025

Review Change Stack

[!NOTE]

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • [ ] ▶️ Resume reviews
  • [ ] 🔍 Trigger review
📝 Walkthrough

Walkthrough

Git clone, hook execution, and terminal PTY environment paths now apply Git credential prompt guards. Agent terminals remain guarded, while user-terminal suppression is controlled by a new default-enabled setting. Clone and hook tests verify the resulting non-interactive environment variables and terminal guard behavior.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning It has a good summary, but it omits required template sections like Screenshots, Testing, AI Review Report, Security Audit, and Notes. Add the missing template sections, including screenshots/no visual change, testing checklist or results, AI review report, security audit, and notes.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change stops repeated GCM OAuth prompts in managed Git contexts and preserves cached auth, matching the #7652 behavior goal.
Out of Scope Changes check ✅ Passed The added settings, UI, tests, and WSL forwarding all support the prompt-guard fix and don't appear unrelated to the issue.
Title check ✅ Passed The title is specific and matches the core change: suppressing GCM prompts across clone, terminals, and hooks.
✨ Finishing Touches
📝 Generate docstrings
  • [ ] Create stacked PR
  • [ ] Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot] avatar Jul 09 '26 23:07 coderabbitai[bot]

Terminal + setting verification (end-to-end, real Orca terminal)

Added a GitHub-backed repo, created a worktree, and inspected the spawned terminal's env. Two panes side by side:

Default (setting on) — user terminal is guarded:

$ echo GUARD:$GIT_TERMINAL_PROMPT:$GCM_INTERACTIVE:$GIT_ASKPASS-end
GUARD:0:never:-end

GIT_TERMINAL_PROMPT=0, GCM_INTERACTIVE=never, GIT_ASKPASS empty → git can't pop GCM's OAuth window here.

Opt-out (terminalSuppressGitCredentialPrompt=false) — new user terminal is not guarded:

$ echo OPTOUT:$GIT_TERMINAL_PROMPT:$GCM_INTERACTIVE:end
OPTOUT::end

Both values empty → the interactive prompt is left intact for users who opt out.

Agent terminals stay guarded even with the opt-out set (unit-tested: applyTerminalGitCredentialPromptGuard guards when the launch command is recognized as an agent). Terminals spawned normally in both cases — no regression from the PTY env change.

Setup hooks: hooks.test.ts asserts the hook exec env carries GIT_TERMINAL_PROMPT=0 + GCM_INTERACTIVE=never, so a git fetch/submodule update in a setup script can't pop GCM on worktree creation.

(GCM's GUI is Windows-only, so it can't be shown on the macOS host; the env is the exact layer GCM plugs into.)

brennanb2025 avatar Jul 10 '26 00:07 brennanb2025

Independent merge-risk validation (2026-07-12)

Reviewed current head 976ef8c1 for correctness, cross-platform behavior, performance, and resource risk.

Validated

  • PR checks are green.
  • 328 targeted tests passed across the Git runner, hooks, clone path, terminal credential guard, relay PTY, agent recognition, settings search, and Windows-terminal settings.
  • Built and exercised a real Git 2.25.5 binary. The new GIT_CONFIG_COUNT/KEY/VALUE entries are safely ignored by that version rather than causing failures. On Git 2.25 the guard therefore relies on GIT_TERMINAL_PROMPT=0 and GCM_INTERACTIVE=never.
  • Launched the PR in an isolated Electron profile and attached to the exact worktree instance.
  • Verified visible macOS behavior in the real app:
    • the Windows-only setting is not rendered;
    • a real user terminal visibly reported both guard variables absent (VISIBLE_USER_GUARD=:), preserving interactive macOS terminal behavior.
  • Performance audit found no material hot-path concern: the added work occurs only during PTY creation and adds no polling, recurring subprocesses, listeners, timers, or unbounded state.

Merge blockers found

  1. Default-on behavior changes ordinary Windows user terminals. Existing profiles inherit terminalSuppressGitCredentialPrompt: true. A user intentionally running git push without cached credentials will get a fast failure instead of the expected GCM sign-in UI. The automated clone, hook, and agent paths can be fixed without changing interactive user shells. Recommend making the user-terminal setting opt-in/default-off.

  2. SSH PTYs bypass the guard. Remote spawns skip buildPtyHostEnv; SshPtyProvider forwards the unguarded env and the relay spawns it unchanged. This leaves SSH agent terminals unguarded on every remote platform and Windows SSH user terminals unguarded. The settings UI can still show the control for a detected Windows terminal host even though it has no effect on SSH PTYs. Recommend sending an explicit suppression policy in pty.spawn and applying it on the relay using the relay platform and launch command, including fresh spawn and revive/reconnect coverage.

Still requires Windows-host validation

  • Real Git Credential Manager UI suppression and opt-out recovery.
  • Native PowerShell, CMD, and Git Bash user terminals.
  • Windows to WSL environment propagation and Git 2.25 behavior inside WSL.
  • Windows SSH relay behavior after the SSH gap is fixed.

I would resolve the default-on user-terminal behavior and SSH relay coverage before merging.

brennanb2025 avatar Jul 12 '26 21:07 brennanb2025

Windows re-review and local blocker fixes (2026-07-12)

Confirmed the checked-out branch matched PR head 976ef8c1dae92df1bb362686670254cb33f722c2 before review, and re-read the prior macOS review at #issuecomment-4952897445.

I applied and validated a local worktree patch on top of that head. These changes are currently uncommitted/unpushed, so this comment is evidence for the patch in the review worktree, not a claim that the remote PR head already contains it.

Fixes applied

  • Ordinary Windows user terminals now default to off/opt-in for credential-popup suppression. Missing keys in upgraded profiles also hydrate to false. Clone, hook, and recognized agent paths remain independently guarded.
  • pty.spawn now carries an explicit user-terminal policy. SshPtyProvider forwards it, and the relay applies the guard using the relay's own platform plus the resolved launch command.
  • Relay fresh spawn, reconnect/attach, and revive are covered. Revive persists only the derived guard decision, not the full launch command/agent prompt.
  • Windows relay-to-WSL uses WSLENV for the guard/config tuple while preserving existing entries/flags and keeping Windows askpass paths and a custom Windows GIT_SSH_COMMAND out of the distro.
  • The real Git compatibility contract now exercises the credential config environment and documents the Git 2.25 degradation (GIT_CONFIG_* ignored; GIT_TERMINAL_PROMPT=0 + GCM_INTERACTIVE=never remain effective).

Real Electron evidence (visible, isolated profile, rebuilt from final source)

A headful Electron E2E launched the real app and passed:

  • Settings visibly rendered Block Git Credential Popups unchecked on the fresh profile.
  • New PowerShell 7, Windows PowerShell 5.1, CMD, and Git Bash terminals visibly reported GIT_TERMINAL_PROMPT, GCM_INTERACTIVE, and GIT_CONFIG_COUNT absent with the default/off policy.
  • All four preserved caller-supplied GIT_ASKPASS and SSH_ASKPASS paths.
  • A newly created opt-in PowerShell terminal visibly reported GIT_TERMINAL_PROMPT=0, GCM_INTERACTIVE=never, GIT_CONFIG_COUNT=2, and credential.interactive=false.
  • A real Ubuntu WSL terminal visibly reported the same guard/config values. Existing E2E_KEEP_PATH/p:E2E_FLAG/u entries survived, /p translated to /mnt/c/Users/orca-e2e, and GIT_ASKPASS, SSH_ASKPASS, and the custom Windows GIT_SSH_COMMAND were all unset inside the distro.

Fresh and upgraded defaults also have direct persistence/UI tests: a profile missing terminalSuppressGitCredentialPrompt hydrates to false, and the rendered switch is unchecked for a missing key.

GCM / auth evidence

  • GCM 2.8.0 is installed and a cached GitHub credential is present (checked without printing the credential).
  • A real missing-credential request with the guard exited 128 in 1180 ms with Cannot prompt because user interactivity has been disabled; no popup loop occurred.
  • In the visible Electron run, the same unique missing-credential request failed fast when opted in. With suppression off, it remained in GCM's interactive path for four seconds instead of failing fast, then the test terminated and cleaned up that process tree.
  • gh auth status still succeeded under the full guard environment (exit 0), confirming the guard does not disturb the existing gh keyring session.

I could not prove a cached private-repository fetch: the active account has no accessible private repository in gh repo list or the organization-membership query. I also did not execute gh auth login, because completing/canceling it would mutate or disrupt the user's auth state. Those remain explicit live gaps.

WSL / Git compatibility

  • Live Ubuntu WSL Git is 2.53.0 and honored both config entries.
  • Downloaded the official temporary PortableGit 2.25.1.windows.1 and ran the real-binary contract: 3/3 passed. This proves the guard environment is accepted and the config entries are safely ignored on Git 2.25.
  • Git 2.25 was not available inside the Ubuntu distro, so the exact WSL+2.25 combination remains unverified live.

Automated validation

  • Focused guard/relay/provider/defaults/persistence/UI/compat suite: 539 passed, 7 skipped.
  • Clone/hooks/Git runner/relay-protocol/agent-recognition follow-up suite: 333 passed, 4 skipped.
  • Final relay/guard/provider suite after privacy hardening: 116 passed, 7 skipped.
  • Real Git 2.25.1 compatibility contract: 3 passed.
  • Final visible Electron Windows + WSL E2E: passed.
  • Full TypeScript typecheck: passed.
  • Relay bundle: passed for linux-x64/arm64, darwin-x64/arm64, win32-x64/arm64, plus WSL hook relay.
  • Full lint, switch exhaustiveness, reliability gates, max-lines ratchet: passed. Lint printed only existing warnings outside this change.
  • Localization catalog parity and coverage: passed (0 allowlisted coverage candidates).
  • git diff --check: passed.

One full src/main/ipc/pty.test.ts run on Windows encountered an unrelated existing Linux-simulation assertion: that test overrides process.platform to Linux but still uses the Windows-loaded path.join/path.delimiter. The changed SSH policy handoff test in that file passes directly; I did not alter the unrelated test contract.

SSH status / conclusion

No SSH aliases are configured, localhost port 22 is closed, and there is no live SSH target available. Deterministic relay tests cover Linux/Windows relay classification, Windows relay-to-WSL, user opt-in/out, one-shot agents always guarded, fresh spawn, reconnect/attach, serialization, and revive.

The two reported code blockers are addressed by the local patch, but I am not claiming merge safety until the patch is committed/pushed and the remaining live SSH/private-repo gaps are either exercised or explicitly accepted.

OrcaWin avatar Jul 12 '26 22:07 OrcaWin

Follow-up fixes now pushed

Since the Windows re-review comment above, the reviewed local patch and the subsequent hardening fixes have been committed and pushed. The PR now points at c924cca870ab6b394551e5accc82594bfc2cbbe3.

What changed

  • Hardened credential-guard ownership and inheritance (dad513d6d): Orca now records the exact scalar, indexed Git config, and WSLENV state it owns. Opt-out and non-Windows user-terminal paths remove only Orca-owned guard entries, preserving caller values and avoiding guard leakage from a parent Orca/agent terminal.
  • Applied the guard after authoritative environment merges on local daemon and SSH relay paths, including fresh spawn, attach/revive, Windows-to-WSL forwarding, and inherited/ambiguous GIT_CONFIG_* protocols.
  • Kept recognized TUI and one-shot agents guarded on every platform while preserving caller-provided GIT_ASKPASS / SSH_ASKPASS and cached credential helpers.
  • Added the missing SSH provider regression assertion for the user-terminal credential setting (5b4a19006).
  • Synced the branch with current main without conflicts (929f9d60c).
  • Guarded SSH relay clones (c924cca87): remote git.clone now disables terminal, GCM, and GUI credential prompts while preserving caller askpass and the relay PATH/locale contract.
  • Marked setup and issue-command runner PTYs as always-on automation guard paths, so the ordinary user-terminal opt-out cannot re-enable credential UI inside unattended setup commands. The marker is consumed at the final local, daemon, or SSH host boundary and works through Windows/WSL routing.
  • Added regression coverage for explicit automation policy forwarding, remote clone environments, inherited guard restoration, SSH setting propagation, and setup-runner behavior.

Final validation

  • Fresh independent post-fix review: CLEAN — no actionable findings.
  • Expanded focused validation: 914 tests passed across 13 suites.
  • Full typecheck, lint, switch exhaustiveness, reliability gates, max-lines ratchet, localization catalog/coverage, and git diff --check: passed.
  • GitHub PR verify passed, including the full test suite, Git binary compatibility matrix, unpacked app build, and packaged CLI smoke test.
  • Native smoke passed on Ubuntu and Windows.
  • GitHub currently reports the PR CLEAN and MERGEABLE.

brennanb2025 avatar Jul 14 '26 02:07 brennanb2025

Final follow-up — supersedes the previous toggle and ownership notes

The implementation has been simplified since the last comment, and the PR now points at b88dc3b6b0b1f8ce23583e7e2e83c4d4b13de3ff. The earlier description of a default-on Windows user-terminal setting and Orca-owned restoration metadata is no longer accurate.

What changed since the last comment

  • Removed the user-terminal credential-guard setting entirely, including its default, settings UI/search entries, localization, provider plumbing, and SSH propagation. Ordinary user terminals are not modified.
  • Removed the custom ownership/restoration protocol and its state and WSLENV bookkeeping. Guarding is now scoped only to recognized unattended execution boundaries.
  • Kept recognized agent launches, trusted unattended launch metadata, explicit automation markers, and unattended Git RPCs noninteractive across local, current and legacy daemon, SSH, relay, Windows, and WSL paths.
  • Fixed daemon merge ordering so current protocol hosts apply the guard after the final environment merge while legacy hosts receive the complete guarded environment before transport.
  • Hardened relay clone and fork-sync Git operations with terminal/GCM/GUI prompt suppression and SSH BatchMode=yes, while preserving explicit caller SSH policy and merging indexed Git config atomically.
  • Made synthesized GIT_SSH_COMMAND forwarding follow the actual resolved WSL route, covering both explicit distros and WSL UNC working directories without mutating native Windows WSLENV.
  • Tightened agent recognition so ordinary generic Orca commands remain unguarded even through interpreter wrappers, while the dedicated claude-teams agent subcommand is still recognized.
  • Added real-Git compatibility coverage at the Git 2.25 / 2.31 indexed-config boundary and retained baseline-compatible prompt suppression.

This is now the conventional design: unattended operations opt into noninteractive credential behavior; normal terminals retain normal environment inheritance. There is no user-facing toggle and no environment-ownership protocol.

Final validation

  • Multiple independent final reviews: CLEAN — no actionable findings.
  • Local complete suite clean run: 29,399 tests passed, 43 skipped; affected post-format suites also passed.
  • Full lint, switch exhaustiveness, reliability gates, max-lines ratchet, localization catalog/coverage, typecheck, and git diff --check: passed.
  • GitHub verify passed on rerun, including the full test suite, Git binary compatibility matrix, unpacked app build, and packaged CLI smoke. The first attempt hit an untouched renderer timing flake that passed in isolation and on rerun.
  • Native smoke passed on Ubuntu and Windows.
  • GitHub reports the current head mergeable with all required checks green.

brennanb2025 avatar Jul 14 '26 06:07 brennanb2025