Repository navigation
Description
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
- Put a unique token in your global rules:
echo '- Canary: PURPLE-OTTER-42.' >> ~/.gemini/AGENTS.md - Start an Antigravity thread in T3 (any Gemini Flash model) and send:
Without tools: does any instruction text in your context (AGENTS.md, user instructions, anything) contain the word Canary? If so reply the token after it, else NONE.
- Do the same with a Claude and a Codex thread. In my setup
~/.claude/CLAUDE.mdand~/.codex/AGENTS.mdare symlinks to the same file as~/.gemini/AGENTS.md.
Expected behavior
Antigravity sessions get the same rule files that agy loads on its own (global ~/.gemini/AGENTS.md / GEMINI.md, workspace AGENTS.md / .agents/), the same way Claude and Codex sessions in T3 do.
Actual behavior
Antigravity answers NONE. Claude and Codex return the token. Here are all the runs (same canary, same prompt):
| Runner | Direct CLI | T3 delegate_task subagent |
T3 top-level thread |
|---|---|---|---|
Claude (claude-haiku-4-5) |
✅ claude -p |
✅ | ✅ |
Codex (gpt-6-luna, low) |
✅ codex exec |
✅ | ✅ |
| Antigravity (Gemini 3.8 Flash) | ✅ agy -p |
❌ NONE | ❌ NONE |
To isolate T3 from the ACP server, I ran the same prompt outside T3:
| Test | Result |
|---|---|
acpx antigravity exec (ACP, no T3) with the global ~/.gemini/AGENTS.md canary |
❌ NONE (2/2 runs) |
Workspace with AGENTS.md, .agents/AGENTS.md, .agents/rules/x.md (each a different canary), acpx --cwd <ws> antigravity exec |
❌ NONE |
Same workspace, agy -p |
✅ found AGENTS.md and .agents/AGENTS.md canaries |
acpx --append-system-prompt '- Canary: META-APPEND.' antigravity exec (sent as ACP _meta.systemPrompt.append) |
❌ NONE |
So the root cause is upstream. agy_acp_server loads no rule files at all (global or workspace) and ignores _meta.systemPrompt. But T3 is the integration point, and ACP has no standard instructions field, so T3 is the only place this can be fixed for users today.
Impact
Every Antigravity session in T3 runs with no user or project rules. That covers both threads and delegated subagents, and both global and repo AGENTS.md. Mixed-provider setups behave inconsistently: the same rules apply to Claude and Codex but are silently dropped for Gemini. It is especially painful when Gemini is used as the cheap default worker for delegation.
Version or commit
T3 Code 0.0.46-nightly.20261003.2632 (f391794), agy 1.2.16, acpx 0.19.4
Environment
macOS 26.6.2, Apple Silicon
Workaround
Paste the rule file contents into the prompt manually (or have an orchestrator prepend them when delegating). A possible T3-side fix: for the Antigravity driver, read ~/.gemini/AGENTS.md / GEMINI.md plus workspace AGENTS.md / .agents/ and prepend them to the first session/prompt. Related: #4490 (configurable per-provider instruction files, closed as completed, but I couldn't find a shipped setting).
Activity
juliusmarminge commentedon Oct 3, 2026
Note
Grok responding on behalf of Julius.
Triage
Thanks @ycmjason for the canary setup and the runs outside T3, which made this much easier to pin down. The no-T3
acpxresults match what the server does on currentmain(77823bd; yourf391794is an ancestor).What's happening
AGENTS.mdorGEMINI.mdfor any provider, and it doesn't strip them for Antigravity. Claude and Codex sessions see those files because their CLIs discover them.agy_acp_server. ACP has no system-prompt field, so the only text T3 adds is its own orchestration block, wrapped as<t3_code_instructions>on the first user prompt (t3AcpPromptWithInstructionsinapps/server/src/provider/T3OrchestrationInstructions.ts). T3 doesn't send_meta.systemPrompt; that's anacpxextension.acpx antigravity execreturningNONEfor global rules, workspaceAGENTS.md/.agents/, and_meta.systemPrompt.append, whileagy -pfinds the same files, meansagy_acp_serverisn't applying rule files. That part is upstream of T3.GEMINI_HOMEpointed at it (apps/server/src/provider/antigravityAuthSupport.ts). The profile links only~/.gemini/config/skillsand~/.gemini/antigravity-cli/skillsback to the real home.~/.gemini/AGENTS.md,GEMINI.md, andconfig/rulesaren't linked, so even if the ACP server started reading global rules fromGEMINI_HOME, it wouldn't see yours. Workspace rules live in the session cwd, so this doesn't explain the workspace canaries.Likely fix area
agy_acp_serverloading the same rule filesagydoes.AGENTS.md,GEMINI.md,config/rules) into the private Antigravity profile, so they'd be picked up once upstream loads them.GEMINI.mdvsAGENTS.mdprecedence,.agents/rulestriggers) is another option, but it could drift from the CLI and would apply rules twice once the ACP server loads them itself.Until then, pasting the rules into the prompt is the workaround. A maintainer will decide on the fix direction.
Ashkaan commentedon Oct 20, 2026
Same result on Linux with 0.1.1-nightly.20261019.3348 and agy_acp_server 1.1.1 (the version T3 reports as supported).
One data point for the T3-side fix above: I put rule files straight into the instance's private profile (
GEMINI_HOME/GEMINI.md,AGENTS.md,config/AGENTS.md,config/rules/r.md) and none loaded, so linking them in wouldn't help until the ACP server reads them. WorkspaceAGENTS.md,GEMINI.md,.agents/AGENTS.md,.agents/rules/and_agents/rules/didn't load either, with the folder listed intrusted_workspaces.json.The same instruction sent inline in the message was followed every time.
t3dotgg commentedon Oct 21, 2026
Note
🤖 Claude Opus 5.5 responding on behalf of Theo
Thanks for the report. This fault is outside T3 Code, so we cannot fix it here. Please report it to the project that owns that tool. If you find a fault in T3 Code itself, please open a new issue with steps to reproduce it.
Gamrix commentedon Oct 24, 2026
As a temporary workaround, one can make an antigravity wrapper that injects the system prompt. Here's a Claude description that you can copy paste to make your own:
Silent-wqh commentedon Oct 29, 2026
Root Cause Analysis (Reverse-Engineered from
agy_acp_server&localharness_externalv1.3.0)I traced the full call chain across T3 Code (
AntigravityInstallation/antigravityAuthSupport),agy_acp_server, and the Go harness binary (localharness_external) to see whyagy -ploadsAGENTS.md/GEMINI.mdwhileagy_acp_serverdoes not.1. Why
localharness_externalskipsAGENTS.mdandGEMINI.mdInside
localharness_external,localagent_executor.CreateAgentExecutorOptsinitializes the customization manager (customizations.NewManager) using field#28(rules_config) of theHarnessConfigprotobuf (antigravity.localharness.RulesConfig):In
customizations.(*Manager).getRulesanddiscoverRulesForDir, there are two distinct discovery paths:discoverPathsForScope): Scans<workspace>/.agents/rules/*.md(plus.agent/rules/*.md,_agents/rules/*.md) and$GEMINI_HOME/config/rules/*.md. This path does not depend onMarkdownRuleFilenames.visitParentCustomizationFiles&readGlobalRules): Walks fromcwdup to the git root looking for standalone rule files, and checks$GEMINI_HOME/<filename>for global rules. Both functions loop overm.opts.MarkdownRuleFilenames.2. The bug in
agy_acp_serverIn
agy_acp_server, bothLocalConnectionStrategy._build_harness_config()(google/antigravity/connections/local/local_connection.py) andProxyConnectionStrategy._build_harness_config()(google3/cloud/developer_experience/antigravity_extensions/acp_server/proxy_agent_config.py) buildlocalharness_pb2.HarnessConfigover the WebSocketInitializeConversationEvent, but neither populatesharness_config.rules_config.filenames.Because
rules_config.filenamesarrives atlocalharness_externalas an empty list[],visitParentCustomizationFilesandreadGlobalRulesare complete no-ops—so projectAGENTS.md/GEMINI.mdand global$GEMINI_HOME/{AGENTS,GEMINI}.mdare never read.How to Fix
agy_acp_serverDirectly (True<user_rules>System Prompt Injection)Instead of wrapping the binary to prepend rules into the first user message (which can get compacted away in long sessions and doesn't support subagents or native rule frontmatter/
@import), you can patch_build_harness_config()inagy_acp_serversolocalharness_externalloadsGEMINI.mdandAGENTS.mdnatively into the<user_rules>system prompt section:Adding those two lines in:
google3/cloud/developer_experience/antigravity_extensions/acp_server/proxy_agent_config.py(ProxyConnectionStrategy._build_harness_config, used foroauth-personal/oauth-business)google/antigravity/connections/local/local_connection.py(LocalConnectionStrategy._build_harness_config, used for API key / Vertex and base config)immediately restores native
AGENTS.mdandGEMINI.mddiscovery (including git-root parent traversal and subagent inheritance).Applying the patch without breaking T3 Code's managed runtime check
Note that T3 Code's
AntigravityInstallation.completedReleasechecks thatagy_acp_servermatches the exact byte size recorded in.install-complete.json(Number(info.value.size) === record.executable.bytes), though it does not re-verify SHA-256 after initial download:agy_acp_server.par):.paris a standard zipapp archive. After patchingproxy_agent_config.pyandlocal_connection.pyinside the zip, either updateexecutable.bytesin~/.t3/tools/antigravity-acp/<platform>-<arch>/versions/<sha256>/.install-complete.jsonor pad a comment/zip comment to keep the exact byte size.agy_acp_server.exe): It is a PyInstaller onefile binary wherePYZ.pyz(cflag=0) and the CArchive TOC are stored uncompressed. You can recompile both modules using the binary's own bundledpython310.dll, trim a docstring so thezlib-compressed entry fits inside the original slot, pad with\x00to the original slot length, and keep the.exeat the exact original byte size (81,437,336bytes on1.3.0win32-x64).Remaining T3-side improvement for Global Rules
As noted in the triage comment above, T3 Code isolates
GEMINI_HOMEto<userdata>/providers/antigravity/<hash>and currently only symlinksconfig/skillsandantigravity-cli/skillsinlinkAntigravityUserSkills(apps/server/src/provider/antigravityAuthSupport.ts). IflinkAntigravityUserSkillsalso links~/.gemini/AGENTS.md,~/.gemini/GEMINI.md, and~/.gemini/config/rulesinto the profile directory, global rules will work automatically as well.