1.8 KiB
Web interaction recovery
The OpenCode V2 pending-permission list is location-scoped. Chat must use
GET /api/session/{sessionID}/permission, not /api/permission/request,
otherwise a browser can miss a request from another directory. Merely attaching
to a chat starts permission polling: the web must not require a new prompt to
show a CLI-originated approval. Deduplication belongs to the current room, not
the retained turn's historical seen-id set.
Pending questions are reconciled from GET /api/session/{sessionID}/form.
Unknown readback capability is distinct from an authoritative empty list, so an
unsupported backend cannot clear a live question. The browser retains each
request independently; answering one must not hide another. Draft question
answers survive streaming updates. Full approval resource text is expandable.
The controlled browser regression reloads with two pending approvals and two questions, then checks that all four replies reach Go. It does not execute real commands, alter permission configuration, or approve a production request.
Typed interaction controls
Web form fields now preserve booleans and numbers (false/0 are answers),
integer/range and length constraints, defaults, conditional visibility,
multiselect/custom values, masked secret inputs and HTTP(S)-only external links.
Hidden conditional answers are omitted. OpenCode forms offer cancellation through
their documented DELETE endpoint, without answering or rerunning the tool.
Codex command/file/network/permission approvals and standard MCP elicitation are
brokered over their original JSON-RPC callbacks. Session grants are labelled as
such. Responses are acknowledged only after the transport write succeeds;
foreign-session answers are refused. Schemas were checked against generated
protocol source tagged rust-v0.163.0, matching the installed package manifest.