diff --git a/docs/opencode.md b/docs/opencode.md index cf5fb272..328efbfb 100644 --- a/docs/opencode.md +++ b/docs/opencode.md @@ -139,6 +139,8 @@ What the 2.x server is, measured on 2.3.0 on this box (the binary, its answers a - since 2.3.1, 2.x reads `CLAUDE.md` of every directory without an `AGENTS.md`, and `~/.claude/CLAUDE.md` as the global fallback, into every prompt (measured on 2.3.2 in a sandbox: both files land in the system message of each request). On a box that is the owner's private file leaving in every Agent tab prompt, so the 2.x unit and the 2.x `oc` launcher both set `OPENCODE_DISABLE_CLAUDE_CODE_PROMPT=1`, the documented switch read at server start (`packages/cli/src/server-process.ts` of 2.3.2; `0` is not truthy there, so it can be brought back by hand). The 1.x unit and launcher are unchanged. - the generated 2.x config carries the v2 compaction block, `"compaction": {"keep": {"tokens": N}, "background": true}`, sized by the same table (`oc-limits.sh --preserve`) and rewritten by every merge on a 2.x box (`OC_MAJOR`): `keep.tokens` is what the v1 `preserve_recent_tokens` mapped to, `prune` does not exist in 2.x, and `background` (the 2.3.2 default, pinned) precomputes the summary as the context nears the ceiling, reading the just-processed prefix from the prompt cache, so the auto compaction swaps it in at once. Auto compaction fires at the window minus 15% (at least 16,000 tokens above a 32K window) in 2.x, against the v1 `input - min(20,000, output)`. - the first boot migrates 1.x's session store (`GET /api/experimental/migration/v1` follows it); going back to 1.x after a 2.x session is possible but the newer sessions are then unreadable by the older server, which is why the choice is yours. +- a 2.x command run by hand starts OpenCode's managed background service (`opencode serve --service`, on 127.0.0.1 with a password of its own) when none runs, and leaves it running after the command ends (measured with `opencode models` on 2.3.2, 2026-11-22); `--standalone` runs a server that ends with the command instead. The Agent tab does not use it: its unit serves on port 4096. +- a box that chose `./install.sh --opencode 1` keeps 1.x at every update, while every other box serves OpenCode 2: the cockpit shows it an orange banner on every view, with `./install.sh --opencode 2`, the command that moves it (decision 1564, 2026-11-22). ## Opting out