gigacode-api-sanity

A black-box test procedure for comparing GigaCode’s OpenCode-compatible HTTP/SSE API with native OpenCode in separate temporary workspaces. It checks model streaming, sessions, tool calls, permissions, file edits, cancellation, and reuse after cancellation.

In plain words
What is it for?
Use it to re-test or manually validate Claude Sonnet API behavior, including streaming responses, multi-turn conversations, tool use, permission handling, file changes, and cancellation.
Why use it?
It helps identify differences between the two API implementations without changing product source or interfering with an existing daemon. It also separates authentication or setup failures from actual API differences.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/rivet-dev/agentos/gigacode-api-sanity
Any agent
npx skills add rivet-dev/agentos --skill gigacode-api-sanity
Clone the repo
git clone --depth 1 https://github.com/rivet-dev/agentos

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 960 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00067 $0.00960
Opus 5 $0.00034 $0.00480
Sonnet 5 $0.00013 $0.00192
Haiku 4.5 $0.00007 $0.00096

Measured 3d ago against content hash 8c892f044c81, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gigacode-api-sanity scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/gigacode-api-sanity/SKILL.md · 53 lines

How it starts

The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GigaCode API Sanity

Run a black-box parity check. Do not modify product source or disturb an existing daemon.

Set up

  1. Run pwd and jj log -r @; record the revision and both runtime versions.
  2. Create one fresh temp root containing separate native and GigaCode workspaces, logs, and raw traces.
  3. Pick unused API/Rivet ports. Never reuse or stop the default ports 2468/2469.
  4. Start native opencode serve in its workspace. Start GigaCode in its workspace with unique state and port environment variables. Prefer the current checkout; disclose any installed-runtime fallback.
  5. Open /event before creating a session and preserve the unmodified SSE stream.
  6. Check /global/health and /provider. Require a working Claude Sonnet credential on both sides before judging model behavior. For GigaCode, pin Sonnet with GIGACODE_SESSION_ENV_JSON, for example {"ANTHROPIC_MODEL":"claude-sonnet-4-6"}.

Treat authentication failure as a setup limitation, not an API deviation. Do not claim full parity without a valid native Sonnet run.

Run the same scenario on each server

Use direct HTTP requests and save status, headers, body, timing, and SSE frames for every step:

  1. POST /session; record the complete response.
  2. Send two synchronous POST /session/{id}/message prompts in the same session. Make turn two depend on turn one.
  3. Prompt the agent to create api-edit.txt with exact contents using a tool. Poll GET /permission, reply once through POST /permission/{id}/reply, and verify both the tool-part lifecycle and host file contents.
  4. Start a long tool call with POST /session/{id}/prompt_async. Use a command such as touch <workspace>/sleep-started && sleep 20, poll permissions concurrently, and approve the tool if required. Wait for either the marker file or the tool part to be running before calling POST /session/{id}/abort. The marker proves the command actually began even when an implementation publishes tool events late. Merely observing the session as busy can mean the model is still deciding what tool to call and does not validate tool-process cancellation.
  5. Immediately send another synchronous prompt on that same session. Poll and resolve permissions concurrently while that request is in flight: an aborted tool instruction remains in model history and some models repeat it on the next turn. The follow-up must finish and return to idle.
  6. Fetch final messages, parts, permissions, and /session/status.

Read the full file on GitHub · 53 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 53 lines · 67 tokens per session scan A 8c892f044c81

Subscribe to this mod's changes

gigacode-api-sanity is a skill published in the GitHub repository rivet-dev/agentos (4,444 stars, last pushed 2d ago), licensed Apache-2.0. It adds 67 tokens to every session and 960 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories