SkillSpector icon indicating copy to clipboard operation
SkillSpector copied to clipboard

CLI providers: antigravity_cli is disabled on an agy version we could not reproduce it on, and gemini_cli is closed to most individuals; claude_cli works end to end

Open HetCreep opened this issue 4 weeks ago • 4 comments

Thanks for SkillSpector and for the careful notes in the provider code: they made it quick to check each claim below against its source. This is a second report, separate from #1006 (hard-coded default model ids). It is about the CLI providers: what we measured, what we did not, and a few directions for you to weigh.

Summary

  1. antigravity_cli is registered but disabled, and the stated reason (agy's print mode returns nothing on a pipe) did not reproduce on agy 1.4.12.
  2. The route the code points to instead, gemini_cli, now depends on a Gemini CLI that Google has scoped to enterprise Code Assist licences since 2026-06-18.
  3. claude_cli ran a full scan end to end on Claude Code 2.1.317 with SKILLSPECTOR_MODEL=haiku, which we are reporting as a positive data point.
  4. On that run the haiku alias reached a model with a 1,000,000-token window, while SkillSpector budgeted 128,000 tokens per slot.

1. antigravity_cli: the stated reason did not reproduce on agy 1.4.12

At main 38884bd (2026-11-04), the module docstring in providers/antigravity_cli/provider.py and the note in providers/_agent_cli.py say agy was verified on agy 1.0.10: --print renders to the TTY, returns empty stdout on a pipe, did not honour --print-timeout, and showed no headless JSON mode in --help. The note ends by saying that if agy gains a structured stdout mode (for example --output-format json written to a pipe), _build_agy_argv can be wired to it.

What we measured, agy 1.4.12 on Windows 11, called from a Node spawnSync with stdio pipes and a working directory outside any git tree:

Command Exit Time Stdout
agy -p "Reply with exactly the single word: ok" --print-timeout 120s 0 15 s ok
the same with --output-format json 0 10 s a JSON object with "status":"SUCCESS" and "response":"ok\n"

Stderr was empty in both runs.

Not measured: macOS or Linux, any other agy version, and a prompt near the Windows command-line limit (about 32,767 characters), which matters because agy takes the prompt as an argv value and a scan prompt could reach it. We make no claim that the provider is ready to enable, only that the stated blocker did not hold on this version and platform.

For reference, a scan with SKILLSPECTOR_PROVIDER=antigravity_cli on a throwaway one-file skill (see section 3 for the setup) failed closed as designed: exit 2, llm_available false, 3 of 3 LLM calls failed with AgentCLIError, and the report fell back to static analysis.

2. gemini_cli: the recommended route is closed to most individuals

The same docstring and error messages tell users to use SKILLSPECTOR_PROVIDER=gemini_cli instead. The Gemini CLI README (google-gemini/gemini-cli main, last changed 2026-10-28, commit b8fa817) now opens with a notice:

No free tier or Google AI plans: Free individual access and Google AI Pro / Ultra (Google One) moved to [Antigravity CLI] on June 18, 2026

Its tool table keeps gemini for "Organizations with Gemini Code Assist Standard / Enterprise or Code Assist for GitHub on Google Cloud (plus legacy paid API / Vertex keys)". Google's migration page is https://antigravity.google/docs/cli/gcli-migration.

Reading the code at 38884bd (we did not run gemini_cli):

  • _gemini_auth_check returns available whenever the binary is on PATH, so a user who cannot sign in finds out at the first LLM call.
  • _scrub_env keeps only an allowlist of names (PR #738), and it has no GEMINI_* or GOOGLE_* names, so an API key or Vertex setting in the environment does not reach the gemini child. Whether a key stored in the Gemini CLI's own config files would be picked up was not checked.
  • The flags are documented as verified against gemini 0.46.0.

So a free or Google AI Pro/Ultra individual who wants the Gemini backend is sent to gemini_cli, which they can no longer sign in to, while the CLI they were moved to, antigravity_cli, is the one that is disabled.

Meanwhile the gemini API provider is a working route: its default gemini-3.8-flash was in the Gemini API model list on 2026-11-03.

3. claude_cli: measured working end to end

Setup: SkillSpector 2.12.0 at commit 5cb9385 (installed with uvx --from git+https://github.com/NVIDIA/skillspector.git@5cb9385...), Claude Code 2.1.317, Windows 11, a working directory outside any git tree, and a throwaway one-file skill (a JSON-formatter description, 8 lines). Command:

SKILLSPECTOR_PROVIDER=claude_cli SKILLSPECTOR_MODEL=haiku skillspector scan ./skill --format json

Result: exit 0 in 44 s; llm_available true; llm_calls_attempted 3 and llm_calls_succeeded 3; analysis_completeness.status "complete" with coverage 100%; the semantic analyzers "completed"; llm_provenance names claude_cli and model haiku. The antigravity_cli scan quoted in section 1 was the same setup with the provider swapped.

This run used the pin above, not main 38884bd, and we did not re-run on main. GitHub's compare of the two (95 commits, 70 files) shows no change to any file under providers/_agent_cli*, providers/claude_cli, providers/antigravity_cli or providers/gemini_cli, nor to model_info.py or constants.py. One small thing we hit: passing --output <file> stopped both providers with "Safe file output is unsupported on this platform", which the code documents for Windows, so the report was taken from stdout.

4. The haiku alias and the 128,000-token budget

Every analyzer slot logged:

WARNING [skillspector.constants] Model 'haiku' (slot: default) not found in model_registry.yaml. Using fallback context length (128000). Token budgeting may be inaccurate — add the model to the registry or verify the model ID.

To see what the alias reached, we made one call: claude -p "Reply with the single word: ok" --model haiku --output-format json --no-session-persistence --tools "" on the same Claude Code 2.1.317. Exit 0; the modelUsage key was claude-haiku-5-5 and its contextWindow was 1,000,000. So this scan ran on a model with a 1,000,000-token window while the budget was one eighth of that. The cost is conservative batching (more, smaller LLM calls, each a separate session on the user's own plan, which #808 shows is not free), not a failure.

What the code already does about this:

  • CLI providers carry no bundled registry on purpose (_agent_cli_base.py), and a row keyed on an alias such as haiku would go stale when the CLI moves the alias.
  • SKILLSPECTOR_MODEL_REGISTRY works for CLI providers since #463 (it closed #459). We did not test it with an alias key.
  • The claude provider requests --output-format text on purpose, documented as the most stable format; the real window is in the JSON envelope the provider avoids.

Directions (yours to weigh)

  1. agy: if you re-verify agy on a current version, the note's own condition (a structured stdout mode on a pipe) may now be met. A decision on prompt delivery by argv versus stdin would still be yours.
  2. gemini_cli: a line in the README provider table and in the error messages saying that gemini_cli needs a Gemini CLI login that Google now offers only with Code Assist Standard or Enterprise, and pointing individuals to the gemini API provider.
  3. CLI aliases and the budget: documenting SKILLSPECTOR_MODEL_REGISTRY for CLI aliases in the README, or reading the window from the CLI at the cost of one extra call per scan. Both are small, and the second trades against the text-format choice above.

Related

  • #1006: hard-coded default model ids (filed 2026-11-04).
  • #459 / #463 (registry override for CLI providers), #808 (per-call cost of CLI scans), #57 / #52 (the CLI providers' origin).

Happy to re-run any of these checks on a newer agy or Claude Code version.

HetCreep avatar Nov 04 '26 13:11 HetCreep

Adding measurements on a newer agy, for the two points this issue left open: long prompts (the argv limit) and keeping agy's tools away from the skill text. Same platform as above (Windows 11), different machine, agy 1.5.4, called from Python subprocess.run with pipes, in a fresh temporary working directory per run. Not measured: macOS, Linux, other agy versions, and a full SkillSpector scan (the provider is disabled, so nothing below went through SkillSpector's code).

1. Print mode on a pipe still works on 1.5.4

agy -p="Reply with exactly the word OK and nothing else." --output-format json: exit 0, 25 s, stdout a JSON object with "status":"SUCCESS" and "response":"OK\n", stderr empty. Its usage reported 37,958 input tokens for that one-word prompt, so agy's own agent context is large; worth knowing for #808.

2. The prompt can go over stdin, so the argv limit stops mattering

agy has --input-format stream-json (print mode, requires --output-format stream-json); its changelog lists it under 1.1.15, so 1.4.12 above should have it too (not checked on 1.4.12). The flag order matters: -p --input-format ... fails with -p took "--input-format" as its prompt; putting -p= last works:

agy --input-format stream-json --output-format stream-json -p=

One NDJSON line on stdin per turn. The shape it accepted, found by trying (the error messages name the missing field):

{"event":"user","message":{"content":"<prompt text>"}}

Rejected: {"event":"user","text":...} ("missing the "message" field"), "message":"<string>" (cannot unmarshal string), "message":{"text":...} ("has no content"); other event values are ignored with a warning. The output is NDJSON: an init event, then a result event with status, response, usage and, on an early stop, finished_reason.

A 39,215-character prompt sent this way (past the ~32,767-character command-line limit) completed: exit 0, 43 s, status SUCCESS.

3. agy is a full agent, and headless mode alone does not keep the skill text away from files

The init event lists 60 tools for the session, including run_command, view_file, write_to_file, read_url_content, search_web, send_message and the browser_* family, with "permission_mode":"request-review".

Canary test: a temporary directory holding canary.txt with a made-up word, prompt "read canary.txt and tell me the word":

Setup Result
no settings the word came back in response (file reads are allowed in headless mode)
prompt also asking to run echo the command was auto-denied: stderr says headless mode "cannot prompt for" the command permission, add an allow rule or use --dangerously-skip-permissions
--settings '{"permissions":{"deny":["*"]}}' not conclusive in my runs (that run asked for a command first, which was auto-denied anyway); I would not rely on it without a better test

So without more, a skill under review that contains instructions could get agy to read files in its working directory.

4. A workspace hook that denies every tool held in each run

agy reads lifecycle hooks from .agents/hooks.json in the workspace, and a PreToolUse matcher of "*" matches every tool (agy's built-in agy-customizations docs, hooks.md). In the temporary directory:

{"deny-all": {"PreToolUse": [{"matcher": "*", "hooks": [
  {"type": "command", "command": "<abs path>\\deny.cmd", "timeout": 10}]}]}}

where deny.cmd appends a line to a marker file and prints {"decision":"deny","reason":"text only: every tool is denied"}.

Run Hook fired Result
read canary.txt 1 word not returned; response quoted tool call denied by pre-tool hook: ...
39,215-char stdin prompt asking to fetch https://example.com and read canary.txt 1 neither done; the model said tool access was disabled and answered the page title from its own knowledge, saying so

In both runs the model stopped after the first denied call, so each run shows one tool family blocked (file read; then one of fetch or read). Not tested: every one of the 60 tools, MCP tools, whether a user-level hook or setting can override a workspace deny, and Linux or macOS hook commands.

One more observation: agy loaded my user-level rules and followed one of them in its answer (it appended a line my global rules ask for). A provider that parses the response may want an agent definition that names its rules explicitly (agy's changelog lists a rules: key in agent frontmatter for that), or to tolerate extra text.

What this suggests (yours to weigh)

The disabled provider's two stated blockers (empty stdout on a pipe, prompt as an argv value) do not hold on 1.5.4. A lockdown in the spirit of the OpenCode provider's deny-all policy looks possible with a per-run temporary workspace holding only a deny-all PreToolUse hook, a preflight that confirms the hook fires (the marker file), and the prompt over stdin. I have not written or tested that provider.

Happy to re-run any of this on request.

MJ0006 avatar Nov 10 '26 11:11 MJ0006

Thanks @MJ0006, this fills the two gaps the report left open, and the workspace hook is a neat way to get a lockdown.

We re-ran your checks today on another machine (Windows 11, agy 1.5.4, a .NET Process with redirected stdio, a fresh temporary working directory per run, made-up canary files):

Check Result here
prompt over stdin (--input-format stream-json --output-format stream-json -p=, one {"event":"user","message":{"content":...}} line) exit 0, 12 to 13 s, status SUCCESS; init listed 60 tools, permission_mode request-review (2 of 2 runs)
read a file in the working directory the canary word came back (2 of 2)
read a file outside the working directory, given its absolute path the canary word came back too (2 of 2)
workspace PreToolUse hook, matcher *, printing a deny decision fired once, the word did not come back (2 of 2)
the same hook, the file outside the working directory fired once, the word did not come back (1 of 1)

The third row is the one addition: a per-run temporary directory by itself does not bound what headless agy can read, so the hook (or something like it) is doing the work. The hook receives the call as JSON on stdin (toolCall.name, toolCall.args, workspacePaths), so it could allow by tool name and path rather than deny everything, if a provider ever needs one tool. Not tested here: every tool, MCP tools, a user-level setting overriding the workspace hook, macOS or Linux.

One trap for anyone reproducing from Windows PowerShell 5.1: both a pipe to agy and .NET's redirected stdin (console code page 65001) add a byte-order mark, and agy rejects the stream with invalid character '\ufeff'. A BOM-less UTF-8 encoding for the child's stdin fixes it.

Nothing here changes what the report asks; it is a second set of measurements that agrees with yours.

HetCreep avatar Nov 10 '26 11:11 HetCreep

A correction to the scope of the third row in my comment above.

The file "outside the working directory" in that run sat in a sibling folder under the system temp directory. I re-measured on the same machine (Windows 11, agy 1.5.4, headless, made-up canary files, small n):

Case Result
file tool, a path under the system temp directory, outside the working directory read (as reported)
file tool, a path elsewhere in the user profile, no grant not read: denied_actions: read_file, "headless mode cannot prompt for, so it was auto-denied"
file tool, a path under a folder the user's Antigravity config grants (read_file(...) / write_file(...)) read, and a new file written, with no prompt
terminal tool, default mode, a command outside the allow list auto-denied
terminal tool, "agentMode": "auto" in settings.json, a read command the sandbox refused run again outside the sandbox, the file came back (3 of 4 runs)
the same, a write command auto-denied (1 of 1)

So "a per-run temporary directory by itself does not bound what headless agy can read" was too broad. What bounds it is the user's permission configuration (grants, deny rules, the agent mode) together with the temp-directory allowance; a deny rule held in every run here, an ask rule did not hold in headless mode. The hook results stand as reported.

HetCreep avatar Nov 10 '26 17:11 HetCreep

Thanks for re-running these and for the correction. The temp-folder versus user-profile distinction and the deny versus ask result in headless mode are useful to know. We'll keep .NET/PowerShell stdin BOM-less too.

MJ0006 avatar Nov 10 '26 17:11 MJ0006