@khalilgharbaoui/opencode-claude-code-plugin 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -171,6 +171,7 @@ The account model IDs are internally suffixed, for example `claude-sonnet-4-6@wo
171
171
  | `mcpConfig` | string \| string[] | – | Extra `--mcp-config` paths/JSON passed alongside the bridged config. |
172
172
  | `strictMcpConfig` | boolean | `false` | Pass `--strict-mcp-config` so Claude loads **only** the configured servers and ignores `~/.claude/settings.json`. |
173
173
  | `webSearch` | `"claude"` \| `"disabled"` \| `<tool>` | `"claude"` | Routing for Claude's built-in `WebSearch`. See [WebSearch routing](#websearch-routing). |
174
+ | `multiStepContinuation` | boolean | `true` | Append a system-prompt hint nudging Claude to chain tool calls within one turn instead of pausing between subtasks. Each opencode turn boundary requires the user to manually press "continue", so for multi-step tasks this reduces friction. Set `false` to disable. |
174
175
 
175
176
  ### Overriding model metadata
176
177
 
package/dist/index.d.ts CHANGED
@@ -115,6 +115,7 @@ interface ClaudeCodeConfig {
115
115
  webSearch?: WebSearchRouting;
116
116
  hotReloadMcp?: boolean;
117
117
  proxyOpencodeMcpTools?: boolean;
118
+ multiStepContinuation?: boolean;
118
119
  }
119
120
  type WebSearchRouting = "claude" | "disabled" | (string & {});
120
121
  interface ClaudeCodeProviderSettings {
@@ -207,6 +208,17 @@ interface ClaudeCodeProviderSettings {
207
208
  * an opencode round-trip).
208
209
  */
209
210
  proxyOpencodeMcpTools?: boolean;
211
+ /**
212
+ * Append a short system-prompt hint that nudges Claude to chain
213
+ * multiple tool calls within a single turn instead of pausing for user
214
+ * confirmation between subtasks. Each turn boundary in opencode
215
+ * requires the user to manually press "continue" to resume, so for
216
+ * multi-step tasks this option reduces friction. Defaults to `true`.
217
+ *
218
+ * Set to `false` if you prefer the un-nudged model behavior (Claude
219
+ * decides when to end the turn entirely on its own).
220
+ */
221
+ multiStepContinuation?: boolean;
210
222
  }
211
223
  type PermissionMode = "acceptEdits" | "auto" | "bypassPermissions" | "default" | "dontAsk" | "plan";
212
224
  type ControlRequestBehavior = "allow" | "deny";
package/dist/index.js CHANGED
@@ -1501,13 +1501,22 @@ function nearestWorkspaceAgentsPrompt(cwd) {
1501
1501
  dir = parent;
1502
1502
  }
1503
1503
  }
1504
- function buildAppendedSystemPrompt(cwd) {
1504
+ var MULTI_STEP_TASK_HINT = `## Continuing through multi-step tasks
1505
+
1506
+ opencode requires the user to press "continue" after each turn ends. When a
1507
+ task has multiple steps, do them all in one turn \u2014 chain tool calls rather
1508
+ than pausing for user confirmation between subtasks. End the turn only
1509
+ when the task is done, you need clarification on intent, or you hit a real
1510
+ blocker. The user can interrupt or abort at any time; turn endings should
1511
+ mark meaningful checkpoints, not every completed substep.`;
1512
+ function buildAppendedSystemPrompt(cwd, includeMultiStepHint = true) {
1505
1513
  const parts = [];
1506
1514
  const configRoot = process.env.XDG_CONFIG_HOME ?? join4(homedir2(), ".config");
1507
1515
  const globalAgents = readPromptFileIfPresent(join4(configRoot, "opencode", "AGENTS.md"));
1508
1516
  const workspaceAgents = nearestWorkspaceAgentsPrompt(cwd);
1509
1517
  if (globalAgents) parts.push(globalAgents);
1510
1518
  if (workspaceAgents && workspaceAgents !== globalAgents) parts.push(workspaceAgents);
1519
+ if (includeMultiStepHint) parts.push(MULTI_STEP_TASK_HINT);
1511
1520
  const content = parts.join("\n\n");
1512
1521
  if (!content) return void 0;
1513
1522
  const path5 = join4(tmpdir2(), `opencode-cc-sys-${randomUUID2()}.md`);
@@ -1981,7 +1990,10 @@ var ClaudeCodeLanguageModel = class {
1981
1990
  reasoningEffort
1982
1991
  );
1983
1992
  const runtimeStatus = await getRuntimeMcpStatus();
1984
- const systemPromptFile = buildAppendedSystemPrompt(cwd);
1993
+ const systemPromptFile = buildAppendedSystemPrompt(
1994
+ cwd,
1995
+ this.config.multiStepContinuation !== false
1996
+ );
1985
1997
  const cliArgs = buildCliArgs({
1986
1998
  sessionKey: sk,
1987
1999
  skipPermissions: this.config.skipPermissions !== false,
@@ -2351,7 +2363,10 @@ ${plan}
2351
2363
  runtimeStatus,
2352
2364
  excludeServers
2353
2365
  );
2354
- const systemPromptFile = activeProcess ? void 0 : buildAppendedSystemPrompt(cwd);
2366
+ const systemPromptFile = activeProcess ? void 0 : buildAppendedSystemPrompt(
2367
+ cwd,
2368
+ self.config.multiStepContinuation !== false
2369
+ );
2355
2370
  const cliArgs = buildCliArgs({
2356
2371
  sessionKey: sk,
2357
2372
  skipPermissions,
@@ -3540,7 +3555,8 @@ function createClaudeCode(settings = {}) {
3540
3555
  proxyTools,
3541
3556
  webSearch: settings.webSearch,
3542
3557
  hotReloadMcp: settings.hotReloadMcp ?? true,
3543
- proxyOpencodeMcpTools: settings.proxyOpencodeMcpTools ?? true
3558
+ proxyOpencodeMcpTools: settings.proxyOpencodeMcpTools ?? true,
3559
+ multiStepContinuation: settings.multiStepContinuation ?? true
3544
3560
  });
3545
3561
  };
3546
3562
  const provider = function(modelId) {