Skip to content

open-picker: model.default is undefined when read immediately after script-server ready #74

Description

@kitlangton

Drive 464f9a3, OpenCode V2 0b771030ed (clean) and e73fa5f476 — identical on both, so not a regression in the checkout under test.

OPENCODE_DRIVE_OPEN_CASE=cold fails at open-picker.ts:64 (assert(model)) with the bare error: undefined == true, ~3–4 s after start, before any TUI launches. opencode.model.default({ location }) returns no data (and agent.list has no build) when called right after "script server ready".

Likely cause: the script reads the catalog before plugin activation for that Location has finished, so the model/agent registries are still empty — the same window anomalyco/opencode#46682 closes for ACP with a plugin.awaitActivation barrier. Drive scripts that create sessions from the SDK before the frontend launches need the same barrier (poll model.default until present, or call plugin.awaitActivation once #46682 lands and the pinned client exposes it).

Also: assert(model) with no message produces undefined == true; give these asserts messages like the archive one two lines above.

Logs: .drive-output/state-prefix-gauntlet/open-picker-{candidate,baseline}.log.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions