Skip to content

Commit 14314cc

Browse files
committed
docs: tighten language to match project tone
1 parent 5aeb375 commit 14314cc

1 file changed

Lines changed: 14 additions & 28 deletions

File tree

README.md

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ docker compose exec proxy claude login
9797
curl http://127.0.0.1:3456/health
9898
```
9999

100-
> **Note:** On macOS, `claude login` must be run inside the container (keychain credentials can't be mounted). On Linux, volume-mounting `~/.claude` may work without re-login.
100+
> **Note:** On macOS, use `./bin/docker-auth.sh` to copy host credentials into the container (handles the keychain/scopes format difference). On Linux, volume-mounting `~/.claude` may work directly.
101101
102102
### Connect OpenCode
103103

@@ -107,9 +107,9 @@ curl http://127.0.0.1:3456/health
107107
./bin/oc.sh
108108
```
109109

110-
Each terminal gets its own proxy on a random port. No port conflicts, no concurrency crashes. The proxy starts automatically, connects OpenCode, and cleans up when you exit. Sessions resume across terminals via a shared session file.
110+
Each terminal gets its own proxy on a random port. Proxy starts automatically, connects OpenCode, and cleans up on exit. Sessions resume across terminals via a shared file store.
111111

112-
Add to your shell config for easy access:
112+
Shell alias:
113113

114114
```bash
115115
# ~/.zshrc or ~/.bashrc
@@ -118,7 +118,7 @@ alias oc='/path/to/opencode-claude-max-proxy/bin/oc.sh'
118118

119119
#### Shared Proxy
120120

121-
If you prefer a single long-running proxy:
121+
For a single long-running proxy:
122122

123123
```bash
124124
# Terminal 1: start the proxy
@@ -128,11 +128,11 @@ CLAUDE_PROXY_PASSTHROUGH=1 bun run proxy
128128
ANTHROPIC_API_KEY=dummy ANTHROPIC_BASE_URL=http://127.0.0.1:3456 opencode
129129
```
130130

131-
The `ANTHROPIC_API_KEY` can be any non-empty string — the proxy doesn't use it. Authentication is handled by your `claude login` session.
131+
`ANTHROPIC_API_KEY` can be any non-empty string. Authentication is handled by `claude login`.
132132

133133
#### OpenCode Desktop / Config File
134134

135-
For OpenCode Desktop (or to avoid env vars), add the proxy to `~/.config/opencode/opencode.json`. Start the shared proxy in the background and Desktop connects automatically.
135+
Set the proxy URL in `~/.config/opencode/opencode.json` to use with Desktop or avoid env vars.
136136

137137
```json
138138
{
@@ -147,7 +147,7 @@ For OpenCode Desktop (or to avoid env vars), add the proxy to `~/.config/opencod
147147
}
148148
```
149149

150-
> **Tip:** Use the shared proxy with the supervisor for Desktop: `CLAUDE_PROXY_PASSTHROUGH=1 bun run proxy`. Both Desktop and terminal instances share sessions via the file store.
150+
> Desktop requires the shared proxy on a fixed port. Run `CLAUDE_PROXY_PASSTHROUGH=1 bun run proxy` in the background. Sessions are shared between Desktop and terminal instances.
151151
152152
## Modes
153153

@@ -191,15 +191,11 @@ In internal mode, a `PreToolUse` hook fuzzy-matches agent names as a safety net
191191

192192
## Session Resume
193193

194-
The proxy tracks SDK session IDs and resumes conversations on follow-up requests:
194+
The proxy tracks SDK session IDs and resumes conversations on follow-up requests. Sessions are stored in `~/.cache/opencode-claude-max-proxy/sessions.json`, shared across all proxy instances (including per-terminal proxies).
195195

196-
- **Faster responses** — no re-processing of conversation history
197-
- **Better context** — the SDK remembers tool results from previous turns
198-
- **Works across terminals** — sessions are shared via a file store at `~/.cache/opencode-claude-max-proxy/sessions.json`
196+
Lookup order:
199197

200-
Session tracking works two ways:
201-
202-
1. **Header-based** (recommended) — Add the included OpenCode plugin:
198+
1. **Header-based** — add the included OpenCode plugin to inject session headers:
203199

204200
```json
205201
{
@@ -209,9 +205,9 @@ Session tracking works two ways:
209205
}
210206
```
211207

212-
2. **Fingerprint-based** (automatic fallback) — hashes the first user message to identify returning conversations
208+
2. **Fingerprint-based** (automatic fallback) — hashes the first user message to match returning conversations
213209

214-
Sessions are cached for 24 hours. When using per-terminal proxies (`oc.sh`), the shared file store ensures a session started in one terminal can be resumed from another.
210+
Sessions expire after 24 hours.
215211

216212
## Configuration
217213

@@ -226,19 +222,9 @@ Sessions are cached for 24 hours. When using per-terminal proxies (`oc.sh`), the
226222

227223
## Concurrency
228224

229-
**Per-terminal proxies (`oc.sh`)** are the recommended approach for multiple terminals. Each OpenCode instance gets its own proxy — no concurrency issues at all.
230-
231-
**Shared proxy** supports concurrent requests but has a known limitation:
225+
Per-terminal proxies (`oc.sh`) avoid concurrency issues entirely. Each terminal gets its own proxy.
232226

233-
> **⚠️ Known Issue: Bun SSE Crash ([oven-sh/bun#17947](https://github.com/oven-sh/bun/issues/17947))**
234-
>
235-
> The Claude Agent SDK's `cli.js` subprocess (compiled with Bun) has a known segfault during cleanup of concurrent streaming responses.
236-
>
237-
> - **All responses are delivered correctly** — the crash only occurs after responses complete
238-
> - **The supervisor auto-restarts** in ~1-3 seconds
239-
> - **Per-terminal proxies avoid this entirely** — no concurrency, no crash
240-
>
241-
> We are monitoring the upstream Bun issue for a fix.
227+
The shared proxy supports concurrent requests but the SDK's `cli.js` subprocess (compiled with Bun) can segfault during stream cleanup ([oven-sh/bun#17947](https://github.com/oven-sh/bun/issues/17947)). Responses are always delivered correctly; the crash occurs after completion. The supervisor auto-restarts within a few seconds.
242228

243229
## FAQ
244230

0 commit comments

Comments
 (0)