Repository navigation
harbor: add Oh My Pi - #1787
harbor: add Oh My Pi#1787
Conversation
Oh My Pi (omp, @oh-my-pi/pi-coding-agent) is a fork of pi on Bun with no Harbor adapter. InterceptOhMyPi subclasses Harbor's Pi and keeps its session log, so OpenEnv's pi session reader and Harbor's trajectory converter work unchanged. It writes a models.yml routed to the capture proxy and a settings overlay that turns off omp's own model calls (titles, compaction, advisor). Settings found necessary in evals and GRPO training: - compat.replayReasoningContent: true. omp only replays past reasoning for a base URL that looks local; behind the proxy's public URL it dropped it, and the capture forked after every turn that thought (10-60% of turns). - compat.supportsReasoningEffort: false and --thinking off, so the engine's effort applies and omp sends no thinking probes. - input: ["text"], so a PNG read by a tool is not sent as an image. It installs from a sha256-checked prebuilt bundle (Bun + omp) on the Hub, falling back to Bun's release and bun install -g. The seam reads the tool set and output limit from OPENENV_OMP_TOOLS and OPENENV_OMP_MAX_TOKENS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The docs for this pull request are available at https://openenv.github.io/OpenEnv/pr-preview/pr-1787/ (commit 8ae0e04). The preview may take a minute to update and is removed when the pull request closes. |
| 'export BUN_INSTALL="$HOME/.bun"; export PATH="$BUN_INSTALL/bin:$PATH"; ' | ||
| f'if [ -w /tmp ]; then D={AGENT_DIR.as_posix()}; else D="$HOME/.openenv-omp-agent"; ' | ||
| 'export TMPDIR="$D/tmp"; mkdir -p "$TMPDIR"; fi; ' | ||
| ) |
There was a problem hiding this comment.
Bun still installs into read-only home
Medium Severity
PATH_PREFIX always sets BUN_INSTALL to $HOME/.bun, so bundle extract and bun install -g write there. Config was moved to /tmp because the agent home can be read-only, but install still targets home. When omp is not already on PATH, setup fails in that case even though /tmp is writable.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 175ccf3. Configure here.
Harbor's Pi defines _SESSIONS_DIRECTORY only from 0.24, so on 0.22 and 0.23 (both in the harbor extra's range) every InterceptOhMyPi.run() raised AttributeError. Set it on the subclass, and test the run command line. Co-authored-by: Cursor <cursoragent@cursor.com>
Harbor's BaseInstalledAgent already maps unzip, the same PackageSpec, in every version of the supported range. Co-authored-by: Cursor <cursoragent@cursor.com>
A re-upload on the dataset's main would fail the sha256 check and send every install to the GitHub + bun fallback; the commit URL keeps serving the file the hash names. Co-authored-by: Cursor <cursoragent@cursor.com>
The seam is untested, so it gets no row in the validated table; the totals below it move from 31 known and 16 untested to 32 and 17. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a5bd202. Configure here.
omp 19.3.0's argument parser reads an argument starting with - as an unrecognized flag and one starting with @ as a file to attach; after -- it takes every argument as the prompt. Co-authored-by: Cursor <cursoragent@cursor.com>


Summary
Adds Oh My Pi (
omp, MIT), a fork of pi on Bun, as anoh-my-piseam. Harbor has no adapter for it.InterceptOhMyPi: subclasses Harbor'sPiand keeps pi's session log, so OpenEnv's pi session reader and Harbor's trajectory converter work unchanged.models.ymlrouted to the capture proxy, plus a settings overlay that turns off omp's own model calls (titles, compaction, advisor), so each rollout contains the agent's calls only.Type of Change
Settings found necessary
Found in Terminal-Bench evals and GRPO training through the capture proxy (omp 19.3.0):
compat.replayReasoningContent: truefork_frac0.1–0.6, against pi's 0.01. With it: 0 forks in a trace-dump eval, andfork_frac0.008 / 0 / 0 over 3 training steps.compat.supportsReasoningEffort: falseand--thinking offreasoning_effort: "high"on every call, overriding the engine's default. For a model id its catalog doesn't know, it also first probes thinking support with up to 7 extra calls.input: ["text"]on the modelreadtool opens a PNG, a text-only engine rejects the next call (At most 0 image(s) may be provided).--no-tools --tools read,bash,edit,write,grep,globand a settings overlayTMPDIRfallback when/tmpisn't writable/tmpat mode 755, where apt's_aptuser can't write.Install
Many sandboxes start at once in training. Installing from GitHub (Bun) and npm in each one downloads ≈200 MB per rollout, risks rate limits, and with no lockfile the dependency versions can change during a run.
install()downloads a prebuilt bundle (Bun 1.4.4 baseline + omp 19.3.0 with itsbun.lock, 213 MB) fromharness-hub/agent-bundles, checks its SHA-256 and unpacks it.unzipneeded) and runsbun install -g.ompskips the install.Changes
openenv/harbor/oh_my_pi.py:InterceptOhMyPi,build_models_yml, andintercept_kwargs, which reads the tool set fromOPENENV_OMP_TOOLSand the per-call output limit fromOPENENV_OMP_MAX_TOKENS(default 32768; the proxy still applies its own cap).seams.py:oh-my-pi, statusuntested, model idintercept/{model}as for pi.test_harbor_qualification.pycompares againstlen(SEAMS), the same one-line change as the hermes and DeepSeek Harness PRs.Test Plan
tests/envs/test_harbor_oh_my_pi.py(7 tests):models.ymlcompat flags;ompisn't reinstalled;773 passed, 7 skipped.
ruff format --check,ruff checkandusort checkare clean.Tested locally against a stub server on a public-looking host name (so the local-URL default doesn't hide the reasoning replay), with an omp session run from the bundle. In production, the same class ran through a runtime-registered seam for Terminal-Bench evals and a 3-step GRPO smoke training run with HF Sandboxes and Harbor 0.25. The status stays
untesteduntil a rollout through this exact seam has been checked.RFC Status
🤖 Generated with Claude Code
Note
Medium Risk
New sandbox install path and proxy-facing model compat settings affect rollout capture correctness; changes are isolated to a new optional harness with unit tests but no full e2e validation yet (
untestedstatus).Overview
Adds Oh My Pi (
oh-my-pi) as a new Harbor harness by wiring a seam inseams.pyand implementingInterceptOhMyPiinoh_my_pi.py, which subclasses Harbor'sPiso rollout logs still land underagent/pi/sessions/for existing trajectory capture.The adapter routes omp through the capture proxy via a
models.ymlintercept provider, with compat flags for text-only models, disabled reasoning-effort probing, and reasoning replay behind public proxy URLs. It installs omp on Bun using a SHA-256-checked HF bundle on x64 glibc (npm/Bun fallback otherwise), writes overlays to silence non-rollout model calls, and limits tools viaOPENENV_OMP_TOOLS/OPENENV_OMP_MAX_TOKENS. Docs update the known-agent counts (32 total, 17 still untested).tests/envs/test_harbor_oh_my_pi.pycovers seam resolution, install paths, setup/run command shape, and proxy config generation.Reviewed by Cursor Bugbot for commit 8ae0e04. Bugbot is set up for automated code reviews on this repo. Configure here.