Bug Report: File-based custom agents don't appear in the /agents list

First off - thank you for Antigravity. It’s a genuinely good tool to work with, and the custom-agent system is a big part of why. I hit one small rough edge and wanted to write it up

TL;DR

A custom agent saved at the exact path the Create New Agents → Global screen advertises - ~/.gemini/antigravity-cli/agents/{name}/agent.json - never shows up in the /agents picker.

The agent still works (it’s invokable by name), so this is a visibility gap, not a functional one. The likely cause is that the /agents list and the “create agent” flow point at different directories.

Component Antigravity CLI - /agents TUI command
Version 1.0.7
Platform Linux x86-64
Severity Low (cosmetic / discoverability) - agents remain fully functional
Regression? Unknown

Steps to Reproduce

  1. Create a custom agent at the global location the UI shows:
    ~/.gemini/antigravity-cli/agents/my-agent/agent.json

Minimal valid contents:
{
“name”: “my-agent”,
“description”: “Repro agent for the /agents visibility issue.”,
“hidden”: false,
“config”: {
“customAgent”: {
“systemPromptSections”: [
{ “title”: “Agent System Instructions”, “content”: “You are a test agent. Reply ‘ok’.\n” }
],
“toolNames”: [“send_message”, “view_file”, “list_dir”],
“systemPromptConfig”: { “includeSections”: [“user_information”, “messaging”] }
}
}
}

  1. Launch the CLI, run /agents, and expand Available Agents.

Expected vs. Actual Behavior

Expected Actual
my-agent appears under Available Agents Only /default appears - my-agent is missing

Note: The same agent is invokable by name in a conversation, confirming the configuration itself is valid and loaded successfully elsewhere.

The Likely Cause

There appears to be a directory scanning mismatch between two components:

  • Create path - The Create New Agents → Global screen writes/expects agents at:
    ~/.gemini/antigravity-cli/agents/{name}/agent.json
  • Discover path - The /agents list is populated from a different set of directories that does not scan this global agents folder.

Because of this, an agent saved exactly where the UI instructs is never enumerated for the list.

Tracing file access across the entire /agents flow:

strace -f -e trace=openat,getdents64 agy

…then run /agents and expand “Available Agents”

Across the whole session, the CLI never opens or lists ~/.gemini/antigravity-cli/agents/ (nor the workspace .agents/agents/).

The only agents/ directories it actively scans are plugin-bundled ones (/agents/). The global agents directory is simply bypassed when the TUI list is being built.

Confirmation

Moving the same agent.json file under a plugin’s agents folder:

~/.gemini/antigravity-cli/plugins//agents/my-agent/agent.json

makes it appear in the /agents list immediately. The schema parses and renders perfectly, isolating this issue purely to which directories the TUI scanner targets, rather than any syntax/parsing error.

Suggested Fix

Update the /agents discovery mechanism to include:

  1. The global agents directory ({appDataDir}/agents/)
  2. The workspace agents directory (.agents/agents/)

This ensures complete alignment between the creation directories advertised by the UI and the paths scanned by the list command.

Workarounds

For anyone experiencing this issue in the meantime:

  • Option A: Place the agent configuration under a custom plugin’s agents/ folder to force-list it. (Caution: A plugin folder may be overwritten during plugin updates; creating a tiny dedicated local plugin is safer than borrowing an existing one.)
  • Option B: Invoke the agent directly by name. It remains fully functional despite not appearing in the interactive picker.

Environment

  • Tool: Antigravity CLI v1.0.7
  • OS: Linux x86-64
  • Path Tested: ~/.gemini/antigravity-cli/agents/