From 5fdeed271dda74833c3c0b6896d49967198e6002 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" <219766164+opencode-agent[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 20:23:58 -0500 Subject: [PATCH] docs(compaction): use authenticated API command (#52608) Co-authored-by: rekram1-node --- services/www/src/docs/content/compaction.mdx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/services/www/src/docs/content/compaction.mdx b/services/www/src/docs/content/compaction.mdx index ff76666a97f..a22c87e5080 100644 --- a/services/www/src/docs/content/compaction.mdx +++ b/services/www/src/docs/content/compaction.mdx @@ -42,13 +42,12 @@ or request compaction yourself before the automatic one. Request compaction at any time, even for a short history: ```sh -curl -X POST http://localhost:4096/api/session/ses_example/compact \ - -H 'content-type: application/json' \ - -d '{}' +opencode api post /api/session/ses_example/compact --data '{}' ``` -The response confirms the request was accepted; it does not wait for the -summary. Follow `session.compaction.*` events to learn when it finishes. See the +The `api` command discovers and authenticates with the background service. Its +response confirms the request was accepted; it does not wait for the summary. +Follow `session.compaction.*` events to learn when it finishes. See the [API reference](/api) for the full operation. | Rule | Behavior | @@ -61,9 +60,7 @@ Pass an `id` to make an exact retry idempotent. Reusing that ID for a different request returns a conflict. ```sh -curl -X POST http://localhost:4096/api/session/ses_example/compact \ - -H 'content-type: application/json' \ - -d '{"id":"msg_compact_once"}' +opencode api post /api/session/ses_example/compact --data '{"id":"msg_compact_once"}' ``` ## Settings