Skip to content

Feature request: Support for antigravity CLI (agy.exe) #70

Closed

Description

@mfujita47

Environment

  • System: Windows 11 and Linux (DGX Spark)
  • Setup: The antigravity CLI (agy) runs on both and is controlled via herdr.

Problem

  • herdr-annotate (plannotator-tui) currently lacks native support for agy.
  • Since plannotator-tui parses agent transcript files directly and there is no mapping for agy, the feature to "pick up the latest reply" does not function.
  • The current workaround—having the agent save the reply to /tmp/reply.md and clicking the file:// link to trigger plannotator-tui—adds friction to the workflow.

Request

  • Please add native transcript parsing support for the antigravity CLI (agy.exe) in plannotator-tui.
  • This would allow direct annotation of agy replies without relying on the document review workaround.

Activity

  1. backnotprop commented on Oct 27, 2026

    @backnotprop
    Contributor

    Thanks @mfujita47! Where does agy store its conversation transcripts (the path on Windows and on Linux)? A small sample transcript with anything private removed would let us add an Antigravity host.

  2. mfujita47 commented on Oct 28, 2026

    @mfujita47
    Author

    Thanks @backnotprop! Here are the paths and a sample transcript.

    Paths

    • Linux / macOS: ~/.gemini/antigravity-cli/brain/<conversation_id>/.system_generated/logs/transcript_full.jsonl
    • Windows: %USERPROFILE%\.gemini\antigravity-cli\brain\<conversation_id>\.system_generated\logs\transcript_full.jsonl
    • (Override env var: ANTIGRAVITY_CLI_HOME. transcript.jsonl in the same folder truncates long content fields; transcript_full.jsonl is untruncated.)

    Sample (transcript_full.jsonl)

    {"step_index":0,"source":"USER_EXPLICIT","type":"USER_INPUT","status":"DONE","created_at":"2026-10-21T06:00:34Z","content":"<USER_REQUEST>\nFix the video settings in retroarch.cfg.\n</USER_REQUEST>\n<ADDITIONAL_METADATA>\nThe current local time is: 2026-10-21T15:00:34+09:00.\n</ADDITIONAL_METADATA>"}
    {"step_index":1,"source":"MODEL","type":"PLANNER_RESPONSE","status":"DONE","created_at":"2026-10-21T06:00:36Z","input_tokens":10372,"cache_read_tokens":0,"output_tokens":114,"thinking":"Let's inspect retroarch.cfg first.","tool_calls":[{"name":"read_file","args":{"Path":"\"/home/user/.config/retroarch/retroarch.cfg\""}}]}
    {"step_index":2,"source":"MODEL","type":"GENERIC","status":"DONE","created_at":"2026-10-21T06:00:38Z","content":"Created At: 2026-10-21T15:00:38+09:00\nCompleted At: 2026-10-21T15:00:39+09:00\nShowing lines 1-20 of 20\n..."}
    {"step_index":3,"source":"MODEL","type":"PLANNER_RESPONSE","status":"DONE","created_at":"2026-10-21T06:00:45Z","input_tokens":4978,"cache_read_tokens":10373,"output_tokens":320,"content":"Here is the recommended configuration update:\n\n### Changes\n- Set `video_threaded = \"false\"`\n- Set `video_vsync = \"true\"`"}
    • User prompts: type == "USER_INPUT" (content string)
    • Assistant replies: type == "PLANNER_RESPONSE" where content is a non-empty string (tool-call-only steps omit content)

    Discovery Notes

    • Herdr: herdr:antigravity_cli already reports agent: "agy" and agent_session: { "kind": "id", "value": "<conversation_id>" }.
    • Active session lock: <app_data_dir>/presence/<conversation_id>.lock
    • CWD / recent index: <app_data_dir>/conversation_summaries.db (SQLite table conversation_summaries with conversation_id, workspace_uris as JSON ["file:///..."], and last_modified_time).
  3. backnotprop commented on Oct 28, 2026

    @backnotprop
    Contributor

    Thanks @mfujita47, the paths, sample transcript and discovery notes were exactly what we needed. Antigravity CLI support is now merged into plannotator-tui (plannotator/plannotator-tui#116):

    • When Herdr reports the conversation id, the review action reads that conversation's transcript_full.jsonl.
    • Without the id, it picks the conversation whose workspace matches the pane's folder, using conversation_summaries.db and history.jsonl.
    • It respects ANTIGRAVITY_CLI_HOME and works on Windows paths.

    It will be available in herdr-annotate after the next plannotator-tui release.

  4. backnotprop commented on Oct 28, 2026

    @backnotprop
    Contributor

    Antigravity CLI support is now live: plannotator-tui 0.9.6 is released and herdr-annotate 0.9.6 pins it. Update the plugin and last / annotate-last-reply will pick up agy conversations. Thanks again for the transcript sample, @mfujita47.

  5. mfujita47 commented on Oct 28, 2026

    @mfujita47
    Author

    Thanks @backnotprop! Updated to 0.9.6 and confirmed last works natively with agy.

    A few small things noticed while testing:

    1. parse_messages(jsonl, n) counts USER_INPUT toward n before locate() filters for Role::Assistant:

      • In newest_with_messages, !parse_messages(&text, 1).is_empty() matches a newly started conversation that only has a USER_INPUT step, causing locate() to fail with has no assistant messages yet instead of picking the previous conversation in that cwd.
      • Similarly, when the latest step is USER_INPUT, --pick 1 returns only that prompt and fails with has no assistant messages yet even if earlier replies exist.
    2. Subshell env vars (ANTIGRAVITY_AGENT=1, ANTIGRAVITY_CONVERSATION_ID=<uuid>):

      • agy exports these alongside ANTIGRAVITY_APP_DATA_DIR, so detect_host() and fallback::read could use them (like CODEX_THREAD_ID) when running plannotator-tui last inside an agy subshell.
    3. Process fallback (agy.exe on Windows / /proc/<pid>/fd on Linux):

      • known_host() in herdr/launch.rs only matches "agy" after /, missing "agy.exe" or \ paths on Windows.
      • On Linux, while presence/<id>.lock files on disk outlive sessions, a running agy process keeps an open fd to its active presence/<id>.lock in /proc/<pid>/fd.
  6. backnotprop commented on Oct 28, 2026

    @backnotprop
    Contributor

    Thanks @mfujita47, these were precise and easy to act on. All three are fixed in plannotator/plannotator-tui#119:

    1. n counted prompts. --pick now counts assistant replies only, and folder discovery passes over a conversation that has no reply yet. A just-started conversation falls back to the previous one in that cwd, and a waiting USER_INPUT no longer hides the reply before it. The same pattern was in the other readers (Claude Code, pi / OMP / Command Code, Copilot, Droid, Hermes, OpenCode), so they are fixed too.
    2. Subshell env vars. ANTIGRAVITY_AGENT or ANTIGRAVITY_CONVERSATION_ID now selects agy. The exported conversation id is read exactly, the same way CODEX_THREAD_ID is, so plannotator-tui last inside an agy shell opens that conversation. ANTIGRAVITY_APP_DATA_DIR was already honoured.
    3. Windows process names. The Herdr process fallback now matches agy.exe and \-separated paths, and the same applies to every other known agent.

    I did not add the /proc/<pid>/fd presence-lock scan. Herdr already reports the conversation id for agy panes, and agy shells now carry it too. That leaves only Linux panes where Herdr has no id, and the scan would need lock-file handling that we have not checked against a live agy. If that case turns out to be common, we can add it.

    These fixes ship in the next plannotator-tui release.

  7. mfujita47 commented on Oct 28, 2026

    @mfujita47
    Author

    Updated to herdr-annotate 0.9.7 (plannotator-tui 0.9.7) and confirmed all three fixes work out-of-the-box without any local wrapper patches.

    For reference on /proc/<pid>/fd against a live agy (in case it's ever needed):

    • Each running agy process holds exactly one open fd to <app_data_dir>/presence/<conversation_id>.lock (flock advisory write lock):
      /proc/619137/fd/38 -> /home/user/.gemini/antigravity-cli/presence/c15a7fae-0ba4-4488-a205-f0632e42d31e.lock
      # /proc/619137/fdinfo/38: lock: 1: FLOCK ADVISORY WRITE 619137 ... 0 EOF
      
    • Subagent conversations (parent_conversation_id != "") never create or open a presence/<id>.lock file, and exited sessions' descriptors are closed, so a plain read_link scan on /proc/<pid>/fd for presence/<uuid>.lock yields a single <conversation_id> without needing lock inspection.

    That said, with Herdr's agent_session and ANTIGRAVITY_CONVERSATION_ID both supported in 0.9.7, everything we use is already covered. Thanks again for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions