Stop OpenCode probes from creating empty sessions (#1079)

* Avoid empty OpenCode sessions during metadata probes

* Stabilize supervised restart regression test
This commit is contained in:
Mohamed Boudra
2026-05-18 09:58:34 +08:00
committed by GitHub
parent 721f1ee8d3
commit a2d8ce07d6
6 changed files with 185 additions and 23 deletions
+2
View File
@@ -16,6 +16,8 @@ Implement the `AgentClient` and `AgentSession` interfaces from `agent-sdk-types.
Existing direct providers: `claude` (in `providers/claude/agent.ts`), `codex` (`codex-app-server-agent.ts`), `opencode` (`opencode-agent.ts`), `pi` (`pi-direct-agent.ts`). The dev-only `mock` provider (`mock-load-test-agent.ts`) is also direct.
Draft metadata lookups should avoid creating provider sessions when the upstream provider has top-level APIs for that metadata. Prefer `AgentClient.listModels`, `listModes`, `listCommands`, or `listFeatures` over creating a scratch `AgentSession`; scratch sessions can show up as empty native sessions in provider import/history UIs.
---
## Provider Snapshot Refresh Contract