npx skills add ...
npx skills add nvidia/openshell --skill launch-openshell-gator
Launch and supervise OpenShell gator agents. Use when starting gator on issues or PRs, checking gator sandboxes, building the gator sandbox image, restarting stuck gators, inspecting gator logs, or experimenting with gator harness/model overrides. Trigger keywords - launch gator, start gator, run gator, gator sandbox, supervised gator, gator logs, restart gator.
npx skills add nvidia/openshell --skill launch-openshell-gator
Launch and supervise the repository's headless gator sandbox agent through OpenShell. This skill covers the operator workflow around scripts/agents/run.sh; the in-sandbox review and state-machine policy remains the gator-gate skill baked into the gator payload.
For gator's PR/issue validation policy, load gator-gate inside the launched sandbox. For generic sandbox CLI usage, use openshell-cli. For unhealthy gateways or sandbox startup failures, use debug-openshell-cluster after the launch preflight identifies a gateway/runtime problem.
--watch and let the in-sandbox supervisor own sleeping and relaunching bounded cycles.sleep loops in the operator session to watch gator. Check logs or status once, then report the current state or launch a proper watcher outside the model session only when explicitly asked.scripts/agents/gator/agent.yaml for experiments. Use CODEX_MODEL=... and, if needed, a temporary --from Docker context or --codex-bin override./ok to test, or broaden gator scope unless the operator explicitly authorized that action..opencode/ artifacts and old gator logs unless the user asks for cleanup.| Path | Purpose |
|---|---|
scripts/agents/run.sh | Manifest-driven OpenShell agent launcher. |
scripts/agents/gator/agent.yaml | Gator manifest: immutable payload version, default gateway, harness, providers, runtime, skills, and subagents. |
scripts/agents/gator/Dockerfile | Gator sandbox image source. Local launches build it in gateway's Docker or Podman image store. |
scripts/agents/gator/policy.yaml | Sandbox policy for the gator agent. |
scripts/agents/gator/bin/gh | Gator-specific gh wrapper and same-SHA duplicate-post guard. |
scripts/agents/gator/bin/review-feedback-ledger | Builds tree-aware review scope, durable findings, convergence telemetry, and review-budget state. |
scripts/agents/gator/bin/resolve-gator-review-threads | Resolves addressed Gator-owned inline review threads by ledger finding ID. |
scripts/agents/gator/bin/validate-review-findings | Enforces the blocker evidence schema and downgrades unsupported hypotheses. |
scripts/agents/gator/prompts/gator.md | Rendered top-level prompt template baked into the payload. |
scripts/agents/gator/skills/gator-gate/SKILL.md | In-sandbox gator state-machine skill. |
Run these checks before launching unless the operator asks for a best-effort launch.
Use the repository root as the working directory for all commands. A dirty worktree is allowed, but do not stage or modify unrelated files.
The local openshell wrapper may recompile the CLI. If that fails, fix the local build or ask the operator before changing unrelated source.
Use gh api user as the health check. It works with provider-scoped tokens and matches gator's own auth guidance.
If this fails, refresh host gh auth before launching. Do not rely on gh auth status alone inside provider-backed sandboxes.
The default gator harness is Codex. Check that the host has usable Codex auth material:
If this fails, run the local Codex login flow outside the gator launch. If Codex was recently reauthenticated and gateway refresh fails later, relaunch with --reset-refresh once.
Use the target gateway from the operator request or current session context. Do not assume a gateway name. If the operator did not specify one, list registered gateways and ask before launching when the correct target is ambiguous.
Expected result: status returns successfully and sandbox listing completes. If the gateway is unreachable, the runtime cannot create sandboxes, or sandbox listing hangs, switch to debug-openshell-cluster and fix the gateway before launching gator.
Avoid duplicate gators for the same PR unless intentionally replacing a stuck or stale one.
Look for names like gator-pr-<number>-supervised. If one exists, inspect its log before deleting or relaunching.
Never paste raw operator text into shell arguments such as --gateway, --name, --from, issue numbers, or PR numbers. Normalize values before constructing launch commands.
Use the operator-specified gateway or a gateway selected from openshell gateway list:
Use digits only for issue and PR numbers:
Use the portable Kubernetes DNS-1123 sandbox-name format even when the selected gateway currently uses another driver:
For local image contexts passed to --from, use an agent-created path such as mktemp -d; do not pass raw user-supplied paths without validating that they are expected local Dockerfile contexts.
Use a stable, scoped name and a prompt that names exactly what gator should do.
The launcher queries the gateway's selected compute driver, builds the gator image in the matching Docker or Podman image store, stages the immutable payload, imports provider profiles, configures provider credentials and refresh, and starts the agent supervisor as the sandbox's canonical main process. The detached main process survives loss of the host CLI connection and reconnects to a restarted gateway. Unless --keep is set, the sandbox is marked ephemeral so the gateway deletes it after the supervisor exits. CONTAINER_ENGINE, when set, must match the gateway driver.
The launcher streams image-build and provisioning output until the detached workload is ready, then exits. Use openshell logs <sandbox-name> or the TUI for runtime output.
For a linked pair:
Only include authorization in the prompt when the operator explicitly gave it.
Use environment overrides. Do not edit agent.yaml for temporary experiments.
If the installed Codex CLI is too old for a model, create a temporary copy of scripts/agents/gator/, adjust only that temporary Dockerfile, and launch with that generated context. Keep the repo Dockerfile unchanged unless the version bump is the intended code change.
Example shape:
The launcher streams image-build and provisioning output to the terminal. Important markers:
Built image ... means the local image build completed.Created sandbox: <name> means OpenShell accepted the sandbox.openshell-agent: starting watch cycle means the in-sandbox supervisor began a bounded cycle.OpenAI Codex v... plus model: ... confirms the Codex CLI and model actually used.OPENSHELL_AGENT_RESULT {...} is the bounded-cycle sentinel. In watch mode, the supervisor sleeps and relaunches after this line./sandbox/.openshell-agent/status.json is the atomic current state snapshot. Its result.notes field is Gator's plain-language diagnosis and next action for that cycle./sandbox/.openshell-agent/history.jsonl contains the latest 100 supervisor transitions, including active-cycle starts and completed cycle results.openshell-agent: still running watch cycle ... is a heartbeat during long active model cycles.review_feedback_lookup_failed means Gator could not build the required cross-SHA feedback ledger and deliberately skipped a context-free review.If sandbox get is not supported by the local CLI shape, use openshell sandbox --help and follow the current command help.
| Sentinel | Meaning | Operator action |
|---|---|---|
status=waiting | Normal watch wait. | Leave sandbox running. |
status=blocked | Human/process blocker. | Read reason; decide whether a human action is needed. |
status=transient_failure | Retryable infrastructure/auth/transport issue. | Let supervisor retry unless repeated failures hit the configured cap. |
status=terminal_failure | Unrecoverable or stale immutable payload. | Inspect the reason; rebuild/relaunch for stale_gator_payload. |
status=complete | Target closed, merged, or one-shot complete. | Delete sandbox if no longer needed. |
Prefer the state snapshot over scraping transient /tmp cycle output. Use the
history file to tell whether a failure is repeating or whether the supervisor
has begun a fresh cycle. Runtime logs remain useful for full command output and
transport diagnostics.
Restart when the payload must change, the sandbox is wedged without a sentinel, the model/tooling version changed, or a transient failure repeats past the useful retry point.
Increment payload_version in scripts/agents/gator/agent.yaml whenever a
merged change alters the Gator prompt, gate skill, reviewer contract, write
guard, ledger, thread resolver, or bundled validator. Existing immutable
watchers cannot replace their own payload. New-version watchers detect later
published versions and stop with stale_gator_payload; relaunch every
still-active older watcher after the version bump is published.
Before deleting, check that the sandbox is truly stale or that the operator asked for a restart. If a bounded review cycle is actively running and still producing useful output, prefer leaving it alone.
When relaunching after a same-SHA infrastructure failure, say that the prior attempt failed before producing a valid review disposition. When relaunching after a draft-only blocker cleared, say that the prior same-SHA disposition was only a draft blocker and the PR is now ready for review.
Symptoms: openshell status fails, sandbox list fails, sandbox remains pending, image build never starts.
Action: load debug-openshell-cluster and diagnose the gateway/driver. Do not keep retrying gator launches against a dead gateway.
Symptoms: Dockerfile step failure, missing package, incompatible Codex CLI, registry pull failure.
Actions:
scripts/agents/gator/ or the intended temporary --from context.nvcr.io/nvidia/base/ubuntu:noble-20251013.Symptoms: host gh auth fails, Codex refresh fails, in-sandbox GitHub calls report auth failures, reviewer_subagent_failed repeats due Codex auth.
Actions:
--reset-refresh once.--reset-refresh removes the old refresh ownership before rediscovering host credentials, then configures and rotates the replacement refresh state.gh pr view --json FieldGator may recover by using supported gh pr view fields plus REST calls. If it does not, patch the gator prompt or skill to avoid the unsupported field, validate, commit, and relaunch with the updated payload.
The wrapper intentionally blocks duplicate same-head-SHA gator dispositions. A relaunch should not post again for the same SHA unless one of these applies:
Do not bypass with OPENSHELL_GATOR_ALLOW_SAME_SHA_COMMENT=1 unless the operator explicitly confirms a maintainer override.
When you launch or inspect gator, report:
Keep the report concise. Include exact commands only when they help the operator reproduce or continue the workflow.