From 30468a636dffcc399cd583cd1a1cd800ad2a4ed8 Mon Sep 17 00:00:00 2001 From: Bryan Date: Fri, 12 Jun 2026 14:22:17 -0400 Subject: [PATCH 1/2] fix(processor): detect doom loops across messages instead of within current message --- packages/opencode/src/session/processor.ts | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/opencode/src/session/processor.ts b/packages/opencode/src/session/processor.ts index 2554315908ce..0af880769c80 100644 --- a/packages/opencode/src/session/processor.ts +++ b/packages/opencode/src/session/processor.ts @@ -516,21 +516,18 @@ export const layer = Layer.effect( : value.providerMetadata, })) - const parts = yield* MessageV2.parts(ctx.assistantMessage.id).pipe( + const msgs = yield* MessageV2.filterCompactedEffect(ctx.sessionID).pipe( Effect.provideService(Database.Service, database), ) - const recentParts = parts.slice(-DOOM_LOOP_THRESHOLD) + const matchingParts = msgs.flatMap((m) => m.parts).filter( + (part) => + part.type === "tool" && + part.tool === value.name && + part.state.status !== "pending" && + JSON.stringify(part.state.input) === JSON.stringify(input), + ) - if ( - recentParts.length !== DOOM_LOOP_THRESHOLD || - !recentParts.every( - (part) => - part.type === "tool" && - part.tool === value.name && - part.state.status !== "pending" && - JSON.stringify(part.state.input) === JSON.stringify(input), - ) - ) { + if (matchingParts.length < DOOM_LOOP_THRESHOLD) { return } From d49a4de8df8834a4d53771a0c27673de87af5fca Mon Sep 17 00:00:00 2001 From: Bryan Date: Fri, 12 Jun 2026 17:19:35 -0400 Subject: [PATCH 2/2] docs: remove references to deleted scout agent --- packages/web/src/content/docs/agents.mdx | 12 ++---------- packages/web/src/content/docs/cli.mdx | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/web/src/content/docs/agents.mdx b/packages/web/src/content/docs/agents.mdx index 53048b7927b9..916206f5916a 100644 --- a/packages/web/src/content/docs/agents.mdx +++ b/packages/web/src/content/docs/agents.mdx @@ -36,13 +36,13 @@ look at these below. Subagents are specialized assistants that primary agents can invoke for specific tasks. You can also manually invoke them by **@ mentioning** them in your messages. -OpenCode comes with three built-in subagents, **General**, **Explore**, and **Scout**. We'll look at this below. +OpenCode comes with two built-in subagents, **General** and **Explore**. We'll look at these below. --- ## Built-in -OpenCode comes with two built-in primary agents and three built-in subagents. +OpenCode comes with two built-in primary agents and two built-in subagents. --- @@ -84,14 +84,6 @@ A fast, read-only agent for exploring codebases. Cannot modify files. Use this w --- -### Use scout - -_Mode_: `subagent` - -A read-only agent for external docs and dependency research. Use this when you need to clone a dependency repository into OpenCode's managed cache, inspect library source, or cross-reference local code against upstream implementations without modifying your workspace. - ---- - ### Use compaction _Mode_: `primary` diff --git a/packages/web/src/content/docs/cli.mdx b/packages/web/src/content/docs/cli.mdx index 0f9e5e3b1f48..2536c405d0f9 100644 --- a/packages/web/src/content/docs/cli.mdx +++ b/packages/web/src/content/docs/cli.mdx @@ -728,5 +728,4 @@ These environment variables enable experimental features that may change or be r | `OPENCODE_EXPERIMENTAL_EVENT_SYSTEM` | boolean | Enable experimental event system | | `OPENCODE_EXPERIMENTAL_NATIVE_LLM` | boolean | Enable native LLM request path | | `OPENCODE_EXPERIMENTAL_PARALLEL` | boolean | Enable parallel web search execution | -| `OPENCODE_EXPERIMENTAL_SCOUT` | boolean | Enable Scout subagent | | `OPENCODE_EXPERIMENTAL_WORKSPACES` | boolean | Enable workspace support |