[Bug]: pull_request_create auto-declines push hooks on Antigravity in Auto mode (and triggers on Vite+/Husky no-op pre-push shims) #44417
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#
- Open a repository configured with Vite+ git hooks (
"prepare": "vp config --no-agent"), which setscore.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-pushexists). - Start a thread using the Antigravity provider (
gemini-4-neon) inAutopermission mode (runtimeMode: "auto",interactionMode: "default"). - Commit changes on a feature branch (not yet pushed to
origin). - Ask the agent to open a pull request, which calls
pull_request_create.
Expected behavior#
- When
pull_request_createdetects a push hook belowFull access, T3 Code should surface the interactive push-hook confirmation prompt to the user (or, if the Antigravity provider cannot display that prompt, followdocs/user/permission-modes.md's documented behavior instead of silently reporting that the user declined). - Additionally, for Husky v9 / Vite+ hook dispatchers (
core.hooksPathpointing to*/_, where.vite-hooks/_/pre-pushsourceshand exits0immediately whenever../pre-pushdoes not exist), T3 Code should ideally detect that no actualpre-pushhook 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.
tanstack-source added labelsbug
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.
Same bug here on a stable build on macOS, with a real
pre-pushhook rather than a no-op shim. The approval prompt never appeared. I waited for it on purpose.Environment#
gemini-4-neon), runtime modeauto, interaction modedefaultcore.hooksPath = .husky/_, and.husky/pre-pushexists and runspnpm check. This is a real hook, so the shim half of this issue does not apply here.Evidence#
On Dec 1, five
pull_request_createcalls from four Antigravity threads, on four branches, each failed with:In
server.trace.ndjson, each failing call follows the same sequence:The elicitation finishes in a few milliseconds and is reported as a decline, which fits the stand-in
McpServerClientfailure that #44464 describes. Laterpull_request_createcalls on the same MCP sessions succeeded only after the branch had already been pushed. In those calls,createPrNeedsPushwas false and no hook check ran.Threads in
full-accessmode on the same install never hit the approval path.On the fix in #44464#
#44464 removes the stand-in's
elicitationcapability, so Antigravity would take theunavailablepath and push with hooks off. That unblocks PR creation, but in a repo like this one thepre-pushhook (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 callpull_request_create. Switching the thread or project to Full access also works.Investigated and written via
t3 triageby Claude Code (Opus 5.5,claude-opus-5-5).