Anthropic via oh-my-pi (UH-27)
What this runbook covers
Section titled “What this runbook covers”Routing Claude models through Ultimate Harness without building a native
Anthropic adapter — by using the existing oh-my-pi adapter (shipped in
UH-25) and the new mission-level runtime_config_overrides (UH-27) to
select an Anthropic-tier model per mission.
# .harness/missions/<id>/mission.yamlruntime_config_overrides: model: anthropic/claude-opus-4-7 thinking: mediumAdapter manifest at .harness/adapters/oh-my-pi.yaml does NOT need to
change; the default model: "" stays empty so other missions keep their
own model choice.
Auth & ToS posture — read this before adopting
Section titled “Auth & ToS posture — read this before adopting”OMP’s anthropic provider authenticates against Claude Pro/Max via a
PKCE flow that uses Claude Code’s OAuth client_id (base64-decoded in
packages/ai/src/utils/oauth/anthropic.ts). On the wire, OMP additionally
applies a “stealth surface” so Anthropic’s server-side detection does not
reject the request:
- Claude Code system-prompt prefix:
"You are a Claude agent, built on Anthropic's Claude Agent SDK."(see OMPclaudeCodeSystemInstruction) proxy_*tool name prefix (matches Claude Code’s convention)User-Agent: claude-cli/<version>plusclaudeCodeHeadersand the Claude Code beta-feature header set- Node TLS ciphersuite ordering matching Claude Code’s binary
(
CLAUDE_CODE_TLS_CIPHERS = tls.DEFAULT_CIPHERS)
Anthropic Consumer ToS (Feb 20, 2026) explicitly prohibits using subscription OAuth tokens outside Claude Code. Server-side detection has been live since Jan 9, 2026 (it killed OpenCode, Roo Code, Cline). OMP’s stealth surface currently bypasses that detection — but this is a cat-and-mouse posture, not a stable contract:
- If Anthropic tightens detection (e.g. adds tool-name-pattern matching), every mission using this route fails together until OMP catches up.
- A ToS escalation by Anthropic against the
client_idwould invalidate every Claude Max user’s tokens. - Reputationally, UH’s posture inherits OMP’s posture; if that becomes a
problem, switch missions to a paid
ANTHROPIC_API_KEYroute (a future UH issue may add a native adapter).
You are responsible for accepting this risk on your Anthropic account. This runbook does not endorse the route — it documents it because UH-26 made the override path explicit and UH-27 chose to wire it.
Prerequisites
Section titled “Prerequisites”- OMP installed and on
PATH(omp --version≥15.1.3). - Claude Pro or Claude Max subscription, logged in via OMP:
This runs the PKCE flow onomp auth login anthropic
localhost:54545; on success OMP stores a refreshable OAuth token in its credential database. - UH
.harness/adapters/oh-my-pi.yamlpresent (created byuh init). The manifest’sconfig.runtime_config.model:may stay empty — the mission-level override fills it in per-mission.
Smoke test sequence
Section titled “Smoke test sequence”The reference mission lives at examples/missions/anthropic-via-omp-smoke.yaml.
Copy it under .harness/missions/<id>/mission.yaml in a host project to
exercise the path:
uh mission dry-run .harness/missions/anthropic-via-omp-smoke/mission.yaml \ --runtime oh-my-piThe dry-run output should include --model anthropic/claude-opus-4-7 in
the planned args. Then:
uh mission run .harness/missions/anthropic-via-omp-smoke/mission.yaml \ --runtime oh-my-piWatch .harness/missions/<id>/runtime.stdout.log for OMP’s NDJSON event
stream. A successful run produces:
runtime-final.txtcontaining the assistant’s last messageevents.ndjsonwithruntime.started→oh-my-pi.message* →runtime.finishedruntime-result.yamlwithstatus: passed
Failure modes & what to do
Section titled “Failure modes & what to do”| Symptom | Likely cause | Remediation |
|---|---|---|
401 Unauthorized in stderr |
OMP token expired or revoked | omp auth login anthropic to refresh |
runtime-result.yaml: status: blocked + “auth or quota error” |
Detected by detectOhMyPiQuotaError; usually a tightened Anthropic server-side block |
Check OMP release notes for stealth-surface updates; pin a known-good OMP version |
Mission runtime_config_overrides validation failed |
Typo or unknown key in mission override | Diff against OhMyPiRuntimeConfigSchema in src/adapters/oh-my-pi.ts |
| Hangs without final message | OMP exited before emitting an assistant event | runtime-result.yaml: status: blocked; inspect stderr; common cause is upstream rate-limit |
Mission override schema
Section titled “Mission override schema”Mission-level runtime_config_overrides is validated by the same strict
OhMyPiRuntimeConfigSchema as the adapter manifest, after merging.
Valid keys:
mode:json | text | rpc | rpc-ui(defaultjson;rpc-uiis rejected for headless runs)thinking:"" | minimal | low | medium | high | xhighallow_extensions: booleanallow_skills: booleanmodel: arbitrary string; OMP routesanthropic/...,openai/...,openrouter/..., etc.
Unknown keys raise a load-time Zod error — same typo safety as the adapter manifest after UH-26.
Out of scope for UH-27
Section titled “Out of scope for UH-27”- Per-runtime override merging for
hermesandcodexadapters (parity follow-up: file UH-31 when needed). - Native Anthropic adapter using
ANTHROPIC_API_KEY(the ToS-clean alternative; file as UH-29 when desired). - OpenRouter/Vercel AI Gateway routing (file as UH-30).
v0.8.0 graduation (2026-05-25 — #156)
Section titled “v0.8.0 graduation (2026-05-25 — #156)”oh-my-pi graduated from status: experimental to status: active in
Ultimate Harness v0.8.0 (GitHub issue #156). The graduation
inherits the ToS posture documented above (§ “Auth & ToS posture — read
this before adopting”) rather than restating it. Mirrors the v0.7.0
pi adapter graduation: the runbook is authoritative; users opt in.
Graduation evidence (local, 2026-05-25):
- Adapter probe:
uh adapter check oh-my-pi→[PASS]againstomp/15.2.4(the current released OMP build at graduation time). - Reference mission
examples/missions/anthropic-via-omp-smoke.yamlremains the canonical live smoke; running it consumes Anthropic tokens and is left to the operator’s local environment, since the smoke outcome reflects the OMP stealth surface plus the operator’s Pro/Max subscription status (both outside this repo). - No adapter behavior change. The
runtime_config_overrides.model:override path documented above is unchanged.
What changed in the repo for graduation:
.harness/adapters/oh-my-pi.yaml—status: active.src/harness/adapter-add.ts—uh adapter add oh-my-piscaffold template flipped tostatus: active; header comment in sync.README.md— capability summary, adapter table row, and CLI example list reflectoh-my-pias active.docs/ROADMAP.md—Adapters consideredtable row updated.apps/docs/content/docs/index.mdx— docs-site adapter mirror updated.CHANGELOG.md—[0.8.0]entry covers the graduation in the v0.8.0 release notes.
If OMP’s stealth surface gets tightened (Anthropic detection adds a
pattern OMP doesn’t yet bypass), every mission using this route fails
together with runtime-result.yaml: status: blocked until OMP catches
up. Pin a known-good OMP version in your local env (see § “Failure
modes & what to do” above) or switch to the native ANTHROPIC_API_KEY
adapter (planned v0.9.0). The graduation does not change UH’s
responsibility model: this is still an opt-in route documented for
adopters who have accepted the ToS posture.