Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: pull_request_create auto-declines push hooks on Antigravity in Auto mode (and triggers on Vite+/Husky no-op pre-push shims) #44417

OpenMouadBNL(GitHub profile, opens in a new tab) opened this issue 2 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Open a repository configured with Vite+ git hooks ("prepare": "vp config --no-agent"), which sets core.hooksPath = .vite-hooks/_ and generates the standard Husky-style shims in .vite-hooks/_/ (including .vite-hooks/_/pre-push), while only defining .vite-hooks/pre-commit (no .vite-hooks/pre-push exists).
  2. Start a thread using the Antigravity provider (gemini-4-neon) in Auto permission mode (runtimeMode: "auto", interactionMode: "default").
  3. Commit changes on a feature branch (not yet pushed to origin).
  4. Ask the agent to open a pull request, which calls pull_request_create.

Expected behavior

  1. When pull_request_create detects a push hook below Full access, T3 Code should surface the interactive push-hook confirmation prompt to the user (or, if the Antigravity provider cannot display that prompt, follow docs/user/permission-modes.md's documented behavior instead of silently reporting that the user declined).
  2. Additionally, for Husky v9 / Vite+ hook dispatchers (core.hooksPath pointing to */_, where .vite-hooks/_/pre-push sources h and exits 0 immediately whenever ../pre-push does not exist), T3 Code should ideally detect that no actual pre-push hook script exists rather than treating the empty dispatcher shim as an active push hook.

Actual behavior

pull_request_create fails immediately without ever showing an approval prompt in the UI:

The person declined to run this repository's push hooks. Nothing was pushed and no PR was opened.

Calling pull_request_create a second time fails immediately in the same way.

Impact

Major degradation or frequent failure

Version or commit

0.1.13-nightly.20261126.5305

Environment

Linux (x64), T3 Code server 0.1.13-nightly.20261126.5305, Antigravity ACP provider (gemini-4-neon), runtimeMode: "auto", interactionMode: "default", Vite+ 1.5.1 (core.hooksPath = .vite-hooks/_).

Logs or stack traces

# Tool error returned immediately by pull_request_create (no prompt shown in UI):
Encountered error in tool execution: The person declined to run this repository's push hooks. Nothing was pushed and no PR was opened.

# Thread configuration:
{"modelSelection":{"instanceId":"antigravity","model":"gemini-4-neon"},"runtimeMode":"auto","interactionMode":"default"}

# Git hook configuration in the repo:
$ git config --show-origin --get-all core.hooksPath
file:/path/to/repo/.git/config	.vite-hooks/_

# Only .vite-hooks/pre-commit exists; .vite-hooks/_/pre-push is Vite+'s generated no-op shim:
$ cat .vite-hooks/_/pre-push
#!/usr/bin/env sh
. "$(dirname "$0")/h"

$ sed -n '3,6p' .vite-hooks/_/h
n=$(basename "$0")
s=$(dirname "$(dirname "$0")")/$n

[ ! -f "$s" ] && exit 0

Workaround

Switch the thread from Auto (runtimeMode: "auto") to Full access (runtimeMode: "full-access"), or push the branch manually via git push before creating the PR.

  1. tanstack-source added labelsbug

  2. Same bug here on a stable build on macOS, with a real pre-push hook rather than a no-op shim. The approval prompt never appeared. I waited for it on purpose.

    Environment

    • T3 Code (Beta) desktop app 0.1.13 with a local server, on macOS 27.2 (arm64)
    • Provider: Antigravity (gemini-4-neon), runtime mode auto, interaction mode default
    • Repo uses husky 9: core.hooksPath = .husky/_, and .husky/pre-push exists and runs pnpm check. This is a real hook, so the shim half of this issue does not apply here.

    Evidence

    On Dec 1, five pull_request_create calls from four Antigravity threads, on four branches, each failed with:

    The person declined to run this repository's push hooks. Nothing was pushed and no PR was opened.

    In server.trace.ndjson, each failing call follows the same sequence:

    GitManager.requireApprovedPushHooks   Failure  GitPushHooksUnapprovedError: Pushing <branch> would run repository hooks that were not approved.
    McpClientInput.askApproval            Success  2-7 ms
    McpProviderSessions.recordApprovalRequest
    McpServer/Client.elicitation/create   Success  2-5 ms
    tools/call pull_request_create        error.type=tool_error

    The elicitation finishes in a few milliseconds and is reported as a decline, which fits the stand-in McpServerClient failure that #44464 describes. Later pull_request_create calls on the same MCP sessions succeeded only after the branch had already been pushed. In those calls, createPrNeedsPush was false and no hook check ran.

    Threads in full-access mode on the same install never hit the approval path.

    On the fix in #44464

    #44464 removes the stand-in's elicitation capability, so Antigravity would take the unavailable path and push with hooks off. That unblocks PR creation, but in a repo like this one the pre-push hook (pnpm check) would be skipped without anyone being asked. The agent only gets a note about it.

    For real hooks I would much rather see the approval in T3 Code's UI, or have the push fail with a clear message that the hooks can't be approved from this provider, than have them skipped. Could the Antigravity path ask through T3 Code's own UI (for example, from the recorded approval request) instead of skipping?

    Workaround

    Push the branch with git push -u origin <branch> first, so the hooks run normally, then call pull_request_create. Switching the thread or project to Full access also works.


    Investigated and written via t3 triage by Claude Code (Opus 5.5, claude-opus-5-5).

  3. For real hooks I would much rather see the approval in T3 Code's UI, or have the push fail with a clear message that the hooks can't be approved from this provider, than have them skipped. Could the Antigravity path ask through T3 Code's own UI (for example, from the recorded approval request) instead of skipping?

    Perhaps, and it sounds like a much cleaner way of approaching the issue, but that seems like a bigger change. It would require @juliusmarminge approval beforehand.

Sign in to join this conversation.