Skip to content

Commit 8ba1549

Browse files
committed
docs: fix serve mode warmup — use /session/status endpoint, explain K8s probe
Corrected the warmup endpoint from /session to /session/status (matches KubeOpenCode's StartupProbe). Clarified that in KubeOpenCode production, the K8s StartupProbe triggers lazy plugin loading automatically — local testing requires a manual curl. Signed-off-by: xuezhaojun <xuezhaokeepgoing@gmail.com>
1 parent a5864bb commit 8ba1549

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

opencode-slack-plugin/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,17 @@ opencode
9797

9898
**Serve mode** (headless server — plugin loads on first request):
9999

100+
`opencode serve` uses lazy instance loading — plugins only initialize when
101+
the first HTTP request arrives for a project directory. In KubeOpenCode,
102+
the Kubernetes StartupProbe (`GET /session/status`) triggers this automatically.
103+
For local testing, send a warmup request manually:
104+
100105
```bash
101106
# Start the server
102107
opencode serve &
103108

104-
# Send a warmup request to trigger plugin loading.
105-
# opencode serve uses lazy instance loading — plugins only initialize
106-
# when the first request arrives for a project directory.
107-
# This curl triggers that initialization so Slack Socket Mode connects.
108-
sleep 1 && curl -s http://127.0.0.1:4096/session?directory=$(pwd) > /dev/null
109+
# Send a warmup request to trigger plugin loading
110+
sleep 1 && curl -s "http://127.0.0.1:4096/session/status?directory=$(pwd)" > /dev/null
109111

110112
# The server is now running with Slack connected.
111113
# Look for "[slack-plugin] Slack Socket Mode connected" in the output.

0 commit comments

Comments
 (0)