Skip to content

Commit 49ff415

Browse files
wthrbtnclaude
andcommitted
freshen(opencode-ci-harness): diagnose row for the fresh-home catalog race on --credential runs
Classification: new-feature (known failure in scope: smoke-testing a stored-credential provider from a fresh home) Source: anomalyco/opencode#56119 (open, filed 2026-10-16): a fresh run --standalone --model fails with provider.no-route 'Model unavailable' while the startup catalog request is pending; reproduced by the project on 2.0.31 and dev by delaying the catalog endpoint; fix PR #57101 is open. Cross-check at v2.2.6: packages/core/src/session/runner/model.ts resolves an explicit model against one sample of the available models and returns ModelUnavailableError otherwise; packages/core/src/models-dev.ts forks the refresh. Before: no row for this symptom; a --credential run always starts from a fresh home After: one Diagnose row with cause and next step Co-Authored-By: Claude Fable 5.2 <[email protected]>
1 parent 810d8b2 commit 49ff415

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎.claude-plugin/marketplace.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@
765765
"name": "opencode-ci-harness",
766766
"source": "./",
767767
"description": "Run opencode (v2) CLI as a headless, fully-isolated test harness against any OpenAI-, Responses- or Messages-compatible endpoint (local inference engine or remote API), or against any provider…",
768-
"version": "0.20261109.17",
768+
"version": "0.20261109.18",
769769
"author": {
770770
"name": "Jörgen"
771771
},

‎.claude/skills/opencode-ci-harness/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ Before v2.2.3 the last step usually loses its `step_finish` and often its `step_
137137
| Correct round 1, garbage round 2 | Template drops prior `tool_calls` / tool results in the message loop | Inspect the template's history loop |
138138
| `error` event but the run finished with a correct answer (before v2.2.6) | A transient provider error was retried | Treat as pass if the final step completed; exit code is 1 regardless. From v2.2.6 a recovered error is a `retry` event with exit 0, so an `error` event there is a real failure |
139139
| Break only on the last step, and `step_start` count = `--max-turns` | That step is the cap request (trailing assistant message, `tool_choice: "none"`); a tool call there fails with `Tools are disabled after the maximum agent steps` | Raise `--max-turns` and re-run before blaming the tier; an engine or template that rejects a trailing assistant turn fails only here |
140+
| `--credential` run: one `error` `provider.no-route`, `Model unavailable: …`, for a model the provider does serve | The fresh home resolved the model before its first catalog download finished; only models missing from the catalog bundled in the binary are hit | Re-run. Still failing → list what the catalog has with `opencode models --standalone` in an injected home (`references/isolation.md`) |
140141
| Run hangs, zero events, `/v1/models` still answers | Wedged tunnel or proxy that serves short requests but stalls streams | Connect to the engine directly; restart the run |
141142
| Exit 124 after a `step_finish` with no errors | `--timeout` hit during final text | Raise `--timeout` |
142143

‎.claude/skills/opencode-ci-harness/references/sources.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Freshen mode probes these rows first.
2121
| OAuth refresh only within 5 min of expiry, result written back | https://github.com/anomalyco/opencode/blob/v2.0.28/packages/core/src/integration.ts (`connection.resolve`) | 2026-10-14 | v2.0.28 |
2222
| OAuth provider refresh stores the returned (rotated) refresh token | https://github.com/anomalyco/opencode/blob/v2.0.28/packages/core/src/plugin/provider/chatgpt.ts | 2026-10-14 | v2.0.28 |
2323
| Legacy `auth.json` not imported into a schema-bootstrapped DB; `auth import` reads an export array | local run (credential table empty after bootstrap) + https://github.com/anomalyco/opencode/blob/v2.0.28/packages/cli/src/commands/handlers/auth/import.ts | 2026-10-14 | v2.0.28 |
24+
| Fresh standalone run rejects an explicit model while the first catalog refresh is pending (open; reproduced by the project on 2.0.31 and `dev` with a delayed catalog endpoint; fix PR #57101 unmerged). At v2.2.6 `SessionRunnerModel.resolve` still samples the available models once and `ModelsDev.refresh` is forked at startup | https://github.com/anomalyco/opencode/issues/56119, https://github.com/anomalyco/opencode/blob/v2.2.6/packages/core/src/session/runner/model.ts | 2026-10-14 | — |
2425
| Killed standalone session resumed by background service sharing the data dir (open) | https://github.com/anomalyco/opencode/issues/55076 | 2026-10-14 | — |
2526
| Final `step_finish` dropped in `--format json`: closed 2026-10-30 by PR #60475 (reconcile emits the step boundaries the live stream missed), merge commit `dbd7202f52`, first tag v2.2.3. With a mock endpoint: v2.1.4 ends a tool run on `text` with neither `step_start` nor `step_finish` for the last step and emits only `text` for a text-only run; v2.2.6 emits both | https://github.com/anomalyco/opencode/issues/53207, https://github.com/anomalyco/opencode/pull/60475 | 2026-10-14 | fixed in v2.2.3 |
2627
| Exit 1 after a retried transient provider error: the issue is still open (its own PR #60508 is unmerged), but the non-interactive `run` rewrite in PR #61911 (merged 2026-11-05, merge commit `a950fa2741`, first tag v2.2.6) takes the exit code from the session's final outcome and adds the `retry` and `background_wait` events. With a mock endpoint that drops the first stream: v2.1.4 emits `error` and exits 1 after recovering; v2.2.6 emits `retry` and exits 0. First request answered HTTP 500: v2.1.4 shows nothing and exits 0; v2.2.6 emits `retry` | https://github.com/anomalyco/opencode/issues/50062, https://github.com/anomalyco/opencode/pull/61911, https://github.com/anomalyco/opencode/releases/tag/v2.2.6 | 2026-10-14 | changed in v2.2.6 |

0 commit comments

Comments
 (0)