Skip to content

Commit 4232361

Browse files
committed
docs(opencode): address review feedback
1 parent 7d63eee commit 4232361

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ Built-in adapter summary:
14271427
| Kind | Session model | Event surface | Resume and identity | Notable differences |
14281428
|---|---|---|---|---|
14291429
| `claude-code` | One subprocess per turn | Newline-delimited JSON from `claude -p --output-format stream-json --verbose` | New sessions use `--session-id`; continuation turns use `--resume`; runtime `session_id` may replace the provisional adapter-generated ID | Token usage is normalized from streamed assistant and result events. |
1430-
| `copilot-cli` | One subprocess per turn | Newline-delimited JSON from `copilot -p --output-format json -s --autopilot --no-ask-user` | Uses `--resume <session_id>` when a session ID is known; falls back to `--continue` when a prior result omitted `sessionId` | Session identity is captured from the terminal `result` event rather than a start event. |
1430+
| `copilot-cli` | One subprocess per turn | Newline-delimited JSON from an abbreviated `copilot -p --output-format json -s --autopilot --no-ask-user ...` invocation | Uses `--resume <session_id>` when a session ID is known; falls back to `--continue` when a prior result omitted `sessionId` | The adapter always includes `--max-autopilot-continues` and includes `--allow-all` when no tool-scoping flags are configured; session identity is captured from the terminal `result` event rather than a start event. |
14311431
| `codex` | One persistent `codex app-server` subprocess per session | JSON-RPC 2.0 over stdio | `ResumeSessionID` maps to `thread/resume`; otherwise the adapter starts a new thread; thread ID is the session ID | Turns are started inside the persistent session with `turn/start`; tool and approval handling are part of the app-server protocol. |
14321432
| `opencode` | One subprocess per turn | Line-delimited JSON from `opencode run --format json --dir <workspace>` | `ResumeSessionID` maps to `--session <session_id>`; the first observed `sessionID` becomes the session ID; a mismatch is `turn_ended_with_error` | The adapter maps `opencode.model`, `opencode.agent`, `opencode.variant`, `opencode.thinking`, `opencode.pure`, and `opencode.dangerously_skip_permissions` to CLI flags; parses `step_start`, `text`, `reasoning`, `tool_use`, `step_finish`, and `error`; maps plain-text permission warnings to `notification` and unknown output to `malformed`; recovers final token usage with `opencode export --sanitize <session_id>`; maps logical `error` events to `turn_failed` even when the process exits with status `0`. |
14331433

docs/workflow-reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,9 +1414,9 @@ known.
14141414
**Validation rules:**
14151415

14161416
- `opencode.allowed_tools` and `opencode.denied_tools` MUST NOT overlap.
1417-
- When either tool list is present, the adapter removes any inherited
1418-
`OPENCODE_PERMISSION` value before launching OpenCode and replaces it with the
1419-
adapter-managed JSON policy.
1417+
- The adapter always removes any inherited `OPENCODE_PERMISSION` value before
1418+
launching OpenCode. If either tool list is non-empty, it replaces that value
1419+
with the adapter-managed JSON policy.
14201420

14211421
**Custom or future adapters (illustrative example):**
14221422

0 commit comments

Comments
 (0)