Triage
Confirmed bug in OpenCode agent catalog discovery, not the picker UI.
T3 already filters correctly (!hidden and mode of primary or all). A project-local agent such as .opencode/agent/readonly.md with mode: all would appear if it were in the inventory. It never gets there.
Why
OpenCode agent options are baked into the provider-instance model snapshot during checkOpenCodeProviderStatus, using ServerConfig.cwd (the T3 process working directory), then written to ~/.t3/caches/opencode.json. That cache is one file per instance and does not include workspace snapshots.
Per-project refresh exists only for skills:
OpenCodeDriver.snapshotForCwdreloadsapp.skillswith the projectdirectoryServerProviderWorkspaceSnapshotstoresskills/slashCommandsonly- composers resolve skills per cwd, but read the agent selector from instance-level
models[].capabilities
Chat sessions already start with the correct project directory (adapter path). Catalog discovery does not follow that directory. That matches the report: opencode agent list shows readonly (all), while the cache only has build and plan.
This is the same class of cwd bug skills already fixed, left unfixed for agents after #8480 switched discovery to app.agents.
Not a duplicate
- #7853 / #8480 โ global custom agents /
app.agents. Built-ins are discovered; project.opencode/agent/is not. - #9833 โ client flag hiding built-in
plan. Unrelated to project-local discovery. - No open PR clearly fixes
.opencode/agent/listing.
Suggested fix
Reload agents in snapshotForCwd via app.agents with the project directory, persist cwd-scoped agent options (workspace snapshot / contracts), and have web + mobile composers resolve the agent picker from that cwd the same way they resolve skills. Changing only the initial probe cwd is not enough: T3 is multi-project and the instance cache would still be a single list.
Surfaces
Server snapshot + cache first. Agent pickers on web, desktop (wraps web), and mobile all consume that catalog.