Repository navigation
Run the agent under Harbor task benchmarks, optionally on a ChatGPT plan - #7
Conversation
bench/harbor_agent.py is a Harbor installed agent: it uploads a static Linux build, runs each task as one `agent run` bot, and reports daemon-wide tokens, LiteLLM cost, and provider failures as Harbor's retryable error types. It installs a CA bundle when the image has none, because the HTTP client needs platform roots to start. docs/HARBOR.md records what Strands and Unreal report, the local validation, the commands to run, and the gaps before a comparison is publishable. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013RhkQCvP5uTYjUeMBnFzDp
…n/sh Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013RhkQCvP5uTYjUeMBnFzDp
`--provider chatgpt` sends Responses requests to the ChatGPT backend Codex uses, with the access token and ChatGPT-Account-ID read from Codex's auth.json at daemon start. The token is redacted from tool output like a key and never refreshed here. The Harbor adapter copies that login into each task container for chatgpt/MODEL runs, so benchmark tests can use a ChatGPT plan instead of API tokens. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013RhkQCvP5uTYjUeMBnFzDp
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f435f253c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…atGPT login to its endpoint Review findings on the Harbor adapter and the chatgpt provider: - The ChatGPT login goes only to https://chatgpt.com/backend-api/codex. A chatgpt spec naming another URL authenticates with its key variable or nothing, so a local or synthetic endpoint never receives the real token. - The adapter uploads only the access token and account id, not Codex's whole auth.json with its refresh and ID tokens. - Bookkeeping runs after the turn and also when Harbor's agent timeout cancels it: every bot's turns and stats are saved, then shutdown cancels any running turn so nothing bills past the deadline. - `agent shutdown` returns once the daemon process has exited (the ready line now carries its pid), so the store copy is taken after the final commit and checkpoint. - Tokens are grouped by model across every bot's turn records and priced at each model's rates; an unpriced model leaves the cost empty. - provider_stream_failed, truncated_sse_frame and provider_admission_timeout map to NetworkConnectionError, like the other transient transport codes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013RhkQCvP5uTYjUeMBnFzDp
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb1054c6d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…n only when used - Accounting reads every bot's turns from the store copied after shutdown, not from the running daemon, so a delegated bot's last call or a bot created at the end is counted. The finish step no longer lists bots. - The adapter uploads Codex's login only when a spec makes the daemon read it: chatgpt at its own endpoint with no key variable. A keyed or custom chatgpt endpoint gets nothing and needs no Codex login. - The module docstring uses `-a module:Class`, as Harbor 0.23 documents; `--agent-import-path` is its deprecated alias. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013RhkQCvP5uTYjUeMBnFzDp
Before: this harness had no way to run the task benchmarks other harnesses report, such as Terminal-Bench 2.1, SWE-bench or tau-bench. So it could not be compared with Strands, Claude Code or Codex on the same model and the same tasks.
After:
harbor run -a bench.harbor_agent:Agent -m PROVIDER/MODELruns one bot per task inside Harbor's task containers and reports tokens and cost back to Harbor. If the model is namedchatgpt/MODEL, the runtime signs in with the ChatGPT login Codex saved, so test runs are billed to a ChatGPT plan instead of API tokens.How:
bench/harbor_agent.pyis a Harbor installed agent. It works in four steps:agent run --new --bot task --agents.stats. It then runsagent shutdown, which cancels any turn still running and now returns only once the daemon has exited. The store is copied after that.The runtime gets a new
chatgptprovider name. It targetshttps://chatgpt.com/backend-api/codexwith the Responses family and readsaccess_tokenandaccount_idfrom$CODEX_HOME/auth.json. It sends theChatGPT-Account-IDheader, and startup fails withprovider_login_unavailablewhen there is no login. The login is used only at that exact URL, and the token is never refreshed. The adapter uploads only those two fields into containers.docs/HARBOR.mdrecords the vendor claims, the run commands and the gaps that remain before a comparison can be published.Validation:
hello-worldtask against a scripted Responses endpoint. Reward was 1.0, tokens were recorded, and the store was copied after the daemon exited cleanly. An endpoint returning 401 gave reward 0 andAgentAuthenticationError.sleep 120. The trial ended inAgentTimeoutErrorabout 15.4 seconds after it started, and the copied store shows the turn asinterrupted.tests/test_cli.pychecks thatshutdownreturns only after the daemon has exited; this test fails without the change.tests/test_harbor_agent.pyruns under Harbor's Python and covers the minimized login, per-model pricing, the finishing command and cleanup after a timeout.cargo test,cargo clippy -D warningsand all 226 Python tests pass.🤖 Generated with Claude Code