You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: catch README/CHANGELOG up to MCP re-forwarding and ordering fix
- MCP section: live per-turn forwarding via chat.params (mcp.status +
config.get), OAuth client mapping to the Cursor auth block, the
unshareable-OAuth skip + one-time toast, and the session-reuse
interaction (changed set -> fresh agent; tools sit atop the
cache-prefix hierarchy).
- Session reuse table: add the MCP-set-changed row.
- Cache implications: MCP changes listed among prefix re-seeders.
- CHANGELOG: entries for MCP re-forwarding and the tool-block part
ordering fix.
Copy file name to clipboardExpand all lines: README.md
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,6 +175,7 @@ classifies each turn:
175
175
| First turn of the session |**new**| fresh agent, full transcript, pool it |
176
176
| System prompt differs (title gen and other side calls) |**side-call**| fresh ephemeral agent; the pooled agent is left untouched |
177
177
| Prior user sequence is an exact prefix + exactly one new user message |**continuation**|`Agent.resume` the pooled agent, send **only** the new message |
178
+
| Continuation, but the forwarded MCP server set changed |**continuation** (fresh agent) | fresh agent + full transcript, re-pool — a resumed agent keeps its original MCP servers, so a fresh one is needed for the new set |
178
179
| Earlier message edited/reverted, conversation compacted, or several messages queued |**divergence**| fresh agent, full transcript, re-pool |
179
180
180
181
The worst case on any misclassification is a single full-transcript replay that self-heals on the
@@ -193,7 +194,8 @@ checkpoint store, and the next turn resumes it instead of replaying the transcri
193
194
cache (Anthropic uses a ~5-minute sliding TTL) decides hits. `"auto"` keeps the prompt prefix stable
194
195
across turns, which is what lands cache reads instead of expensive re-seeds. Things that re-seed the
195
196
cache even mid-window: switching model/variant, changing the thinking level, toggling agent/plan
196
-
mode, or editing an earlier message (all change the exact token prefix). Tool outputs from earlier
197
+
mode, editing an earlier message, or changing the forwarded MCP server set (tool definitions sit at
198
+
the top of the provider's cache-prefix hierarchy, so they invalidate everything after them). Tool outputs from earlier
197
199
turns are included (truncated) in the replay paths so a fresh/diverged agent still sees what prior
198
200
tools produced. Set `OPENCODE_CURSOR_DEBUG=1` to log the per-turn classification and the
199
201
`cacheReadTokens`/`cacheWriteTokens` reported by Cursor.
@@ -236,20 +238,36 @@ To disable MCP forwarding, set `provider.cursor.options.forwardMcp: false` in yo
236
238
237
239
## MCP servers
238
240
239
-
The Cursor agent can use the **same MCP servers you've configured in opencode**. The plugin's
240
-
`config` hook reads opencode's `config.mcp`, translates each entry into the Cursor SDK's
241
-
`McpServerConfig` shape, and hands them to the agent via `Agent.create({ mcpServers })`:
241
+
The Cursor agent can use the **same MCP servers you've configured in opencode**. Forwarding is
242
+
**live, per turn**: the plugin's `chat.params` hook reads opencode's current MCP state
243
+
(`client.mcp.status()` for what's actually enabled right now, `client.config.get()` for the launch
244
+
specs), translates each entry into the Cursor SDK's `McpServerConfig` shape, and hands the set to
245
+
the agent — so enabling or disabling an MCP server mid-session takes effect on the next turn, not
246
+
the next restart. A startup snapshot from the `config` hook remains as the fallback when the live
0 commit comments