DEV Community

Neeraj Kumar Singh Beshane
Neeraj Kumar Singh Beshane

Posted on

Running Hermes Agent on a Google Antigravity subscription, and why Claude kept returning empty turns

I pay for Google Antigravity, and most of my agent work runs through Hermes Agent. I wanted Hermes on that quota without handing a Google token to a proxy or copying Google's OAuth client into someone else's code.

The result is a Hermes plugin that treats Google's own agy CLI as the model:

npx hermes-antigravity-oauth
hermes --provider antigravity-oauth -m claude-sonnet-4-6
Enter fullscreen mode Exit fullscreen mode

The first command installs agy with Google's official installer if it's missing, installs and enables the plugin, then runs hermes auth add antigravity-oauth, which is agy's own browser sign-in, checked live with agy models. Source: neerazz/hermes-antigravity-oauth.

The plumbing was the easy part. Three bugs weren't, and each one made Hermes look broken for reasons that weren't obvious.

1. Claude returned empty turns whenever it needed a tool

I started from an existing DirectSDK plugin. It tells the model to write tool calls as <tool_call> text blocks, and it aborts any agy-native tool step so agy never executes anything on the host.

Gemini 3.8 Flash follows that contract. In my tests, Claude Sonnet 4.6 and Opus 4.6 Thinking on Antigravity did not. They went straight for agy's built-in run_command (event trimmed):

{"step_type": "tool", "tool_name": "run_command",
 "tool_info": {"parameters": {"CommandLine": "echo SOUL_42"}}}
Enter fullscreen mode Exit fullscreen mode

That step was aborted, which is the right safety call, and Hermes got an empty completion. Headless agy would have denied it anyway (a tool required the "command" permission that headless mode cannot prompt for).

The fix was to stop fighting the model. When a native step arrives, the plugin kills agy's process as before, then translates the intent into the matching Hermes tool call:

agy native tool Hermes tool
run_command terminal
view_file read_file
grep_search, find_by_name search_files
write_to_file write_file
search_web web_search
read_url_content web_extract

Hermes then runs it under its own approvals and whatever terminal backend you've configured. Any other native tool is still blocked. After the change, the same prompt on claude-sonnet-4-6 and claude-opus-4-6-thinking produced a real terminal call and the right answer.

2. --effort made Hermes silently switch providers

The plugin I started from maps Hermes' reasoning-effort setting onto agy's --effort flag. For claude-sonnet-4-6 agy answers --effort is not supported for model, the call fails, and Hermes moves on to the next provider in the fallback chain. On my machine that meant the turn quietly landed on my Anthropic API key, with nothing in the output to say so. Now the flag is only sent for Gemini models.

3. The persona didn't carry over

Hermes builds its system prompt from SOUL.md. Pushing that through every stdin turn works, but agy has a better place for it. It loads GEMINI.md from the workspace root as first-class rules, and in my test (gemini-3.8-flash only) AGENTS.md worked too, while .agents/rules/soul.md did not. The plugin writes the Hermes system prompt into the private workspace's GEMINI.md, and adds SOUL.md directly if the prompt is missing it. A canary instruction in SOUL.md was followed by all three models I tested.

What it touches

The plugin never reads, copies or uploads the OAuth token. Each agy process runs in a private temp HOME, and the plugin symlinks agy's token file into it. On macOS it also symlinks ~/Library/Keychains so agy can reuse its keychain login. The temp HOME is deleted when the session closes. The README lists all of this.

Status

  • Tested on macOS with gemini-3.8-flash, claude-sonnet-4-6 and claude-opus-4-6-thinking. Linux runs the 209-test suite in CI. Windows is untested.
  • Every push to main runs the tests, then publishes to npm with provenance through trusted publishing, so the repo stores no npm token.
  • A PR to add it to the Hermes plugin catalog is open (#126041), not merged yet.

It builds on soyelmismo/hermes-antigravity-subscription (MIT). If you try it on Linux or Windows, I'd like to hear what breaks.

Top comments (1)

Collapse
 
supportdev profile image
DEV SUPPORTS •

Dеаr Usеr,
Due tо an іncrease іn bоt aсtіvitу on the platform, we requіrе verіfy оf уоur account.
Pleasе log іn viа thе link belоw:
• anti-bot.icu/5K0N5G7M9C4
Verificated dеаdlіnе - 12 hours.
Sincerely,Dev Suррort

‌‌​