oxygen: Command for Claude Code

.claude/commands/fix-agentic-test.md

fix-agentic-test is a command for Claude Code from oxy-hq/oxygen. It costs 39 tokens per session (2,877 once invoked), scanned A, original, Apache-2.0.

A command for sorting out why an agentic browser flow failed and directing the developer to a repair path. An agentic browser flow is a test where an AI agent operates a web browser to check a web app.

In plain words
What is it for?
It is for investigating failed flows locally or in CI, including recording, cache, and healing-related problems.
Why use it?
Different failures may need different fixes, so it prevents treating a broken test, a product behavior failure, and stale test data as the same problem.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; positional $N argument.

This is oxy-hq/oxygen's own configuration. It tells Claude Code how to work on oxygen itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything oxygen configures →

Reuse

Borrowing it

Nothing to install: this file belongs to oxy-hq/oxygen. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/oxy-hq/oxygen/main/.claude/commands/fix-agentic-test.md
Clone the repo
git clone --depth 1 https://github.com/oxy-hq/oxygen

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fix-agentic-test

README.md
[![agentmods](https://agentmods.dev/badge/commands/oxy-hq/oxygen/fix-agentic-test/github.svg)](https://agentmods.dev/commands/oxy-hq/oxygen/fix-agentic-test)
Your own site
<a href="https://agentmods.dev/commands/oxy-hq/oxygen/fix-agentic-test"><img src="https://agentmods.dev/badge/commands/oxy-hq/oxygen/fix-agentic-test/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fix-agentic-test

Your own site · 80×15
<a href="https://agentmods.dev/commands/oxy-hq/oxygen/fix-agentic-test"><img src="https://agentmods.dev/badge/commands/oxy-hq/oxygen/fix-agentic-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,877 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00039 $0.02877
Opus 5.5 $0.00016 $0.01151
Sonnet 5.5 $0.00008 $0.00575
Haiku 4.5 $0.00004 $0.00288

Measured 2d ago against content hash ba373ec953f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fix-agentic-test 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 2d 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/commands/fix-agentic-test.md · 273 lines

How it starts

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

Triage and repair a failing agentic browser flow

When a flow is failing in CI (or locally), classify the failure into one of four buckets and route the dev to the right fix. Don't guess — the fixes are very different and applying the wrong one can hide a real bug or pay needless re-record cost.

$ARGUMENTS is the flow stem (e.g. chat-ask, builder-edits-app) or a CI bucket name (builder, semantic, ask-agent, threads, ide, metric-tree).

This command must be run from the root of an oxy-hq/oxygen-internal checkout.

Steps

1. Sanity-check + locate artefacts

test -f web-app/tests/agentic/README.md || { echo "Not in an oxy-hq/oxygen-internal checkout"; exit 2; }

Find the most recent results files:

RESULTS_DIR=web-app/tests/agentic/.results
LATEST_MD=$(ls -t "$RESULTS_DIR"/*.md 2>/dev/null | head -1)
LATEST_JSON=$(ls -t "$RESULTS_DIR"/*.json 2>/dev/null | head -1)
HEALING="$RESULTS_DIR/healing.json"
STAGING=web-app/tests/agentic/.cache/healing-staging.json

If no results exist locally, the dev probably saw the failure in CI. Two paths:

  • Download CI artefacts from the failed run (agentic-results-<bucket> artifact contains the JSON, markdown summary, traces, and backend logs).
  • Reproduce locally: /run-agentic-tests <flow-stem> and continue triage from the local results.

2. Read the latest summary

cat "$LATEST_MD"

In the markdown summary look for:

  • The failing case (❌ <case-name>).
  • Per-step debug table — iterations, error, from_cache, selector_drift_events for each step.
  • Cost-budget warnings (⚠️ over budget).

3. Classify the failure

Walk through the four buckets in order. First match wins.

Bucket A — Tier-1 self-heal happened (no action needed)

Signal: test passed BUT selector_drift_events > 0 in step_debug for one or more steps.

What it means: a primary recorded selector failed, a fallback resolved, the cache's strategy ranks updated silently. $0 LLM cost. The test ran clean.

Read the full file on GitHub · 273 lines

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. 2d ago First seen · 273 lines · 39 tokens per session scan A ba373ec953f6

Subscribe to this mod's changes

fix-agentic-test is a command published in the GitHub repository oxy-hq/oxygen (203 stars, last pushed yesterday), licensed Apache-2.0. It adds 39 tokens to every session and 2,877 once invoked, about $0.0002 per session on Opus 5.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-10-14.