Skip to content
Source
Sign inSign up
pingdotgg/t3code

[codex] Make background VCS fetch non-interactive #3133

MergedAndrew-Forster(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/3133/headmerged by juliusmarminge View on GitHub

What Changed

Background upstream status fetches now run with non-interactive Git auth env vars, not just the SSH askpass guard. The status-refresh fetch already had SSH_ASKPASS_REQUIRE=never; this adds GCM_INTERACTIVE=never, GIT_TERMINAL_PROMPT=0, and empty GIT_ASKPASS/SSH_ASKPASS for that same passive fetch path.

Why

This keeps passive VCS polling from opening credential UI. The earlier fetch interval work helps users slow down or disable background fetches, but Windows HTTPS remotes can still go through Git Credential Manager. If GCM doesn't have a cached credential, it can open a GitHub auth window from a background status refresh. That window can then get killed by the short fetch timeout and reopen on the next poll. For background status checks, failing quietly is better than stealing focus. Explicit user actions like pull, push, and manual fetch still use the normal environment.

Refs #1418 and #2605.

User Workaround

Users can usually fix their local GitHub HTTPS setup by authenticating Git directly, for example with gh auth setup-git if they already use GitHub CLI, or by logging into Git Credential Manager outside T3 Code. That still leaves an app-side problem though: passive polling should not be the thing that starts an interactive auth flow. If credentials are missing, the background refresh should fail quietly and let an explicit Git action handle authentication.

Tradeoff

When credentials are not already available, passive remote status may fail quietly and ahead/behind counts can stay stale until the user authenticates through an explicit Git action or disables/re-enables background fetching. That is intentional here: background polling should not steal focus or spawn short-lived auth windows.

UI Changes

None.

Checklist

  • This PR is small and focused
  • I explained what changed and why

Validation

  • pnpm --filter t3 exec vp test run src/vcs/GitVcsDriverCore.test.ts --reporter=dot
  • pnpm exec vp check
  • pnpm exec vp run typecheck

Note

Make background VCS fetch non-interactive by setting additional environment variables

Adds GCM_INTERACTIVE=never, GIT_ASKPASS="", GIT_TERMINAL_PROMPT=0, and SSH_ASKPASS="" to GitVcsDriverCore.STATUS_UPSTREAM_REFRESH_ENV alongside the existing SSH_ASKPASS_REQUIRE=never. The test in GitVcsDriverCore.test.ts is updated to verify all five variables are set to non-interactive values and to restore them after execution.

Macroscope summarized c405d30.

Note

Low Risk Scoped to cached background status fetches only; user-initiated pull/push/fetch paths are unchanged.

Overview Background upstream status refreshes now run Git with a fuller non-interactive env overlay, not only SSH_ASKPASS_REQUIRE=never. The passive fetchRemoteForStatus path sets GCM_INTERACTIVE=never, GIT_TERMINAL_PROMPT=0, and clears GIT_ASKPASS / SSH_ASKPASS so polling does not open GCM or terminal credential UI (e.g. on Windows HTTPS).

Explicit user Git actions still use the normal process environment. If credentials are missing, background refresh is expected to fail quietly and ahead/behind may stay stale until the user authenticates via an explicit action.

The integration test was broadened to assert all of these vars reach the child Git/SSH process when statusDetails triggers upstream refresh.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c405d3042bbcc90bd22398a16317adc15a3c7298. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro

      Run ID: df35b7a2-ef53-440f-a476-ebc6811eb182

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests

      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 and usage tips.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. This is the window I was seeing from passive status polling. Because the background fetch times out, the auth window opens for a few seconds, closes, then reopens on the next poll.

      Screenshot 2026-06-17 124549
    4. Approvability

      Verdict: Approved

      Adds standard git environment variables to disable interactive prompts during background VCS fetch operations. The change is additive to an existing configuration object, with clear intent and minimal risk.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. juliusmarminge merged this75b3b3c

    6. juliusmarminge closed this

Sign in to join this conversation.