diff --git a/assets/oh-my-opencode.schema.json b/assets/oh-my-opencode.schema.json index 308b177c3..2743f924f 100644 --- a/assets/oh-my-opencode.schema.json +++ b/assets/oh-my-opencode.schema.json @@ -72,12 +72,11 @@ "empty-message-sanitizer", "thinking-block-validator", "ralph-loop", - "preemptive-compaction", "compaction-context-injector", "claude-code-hooks", "auto-slash-command", "edit-error-recovery", - "sisyphus-task-retry", + "delegate-task-retry", "prometheus-md-only", "start-work", "sisyphus-orchestrator" @@ -2134,14 +2133,6 @@ "auto_resume": { "type": "boolean" }, - "preemptive_compaction": { - "type": "boolean" - }, - "preemptive_compaction_threshold": { - "type": "number", - "minimum": 0.5, - "maximum": 0.95 - }, "truncate_all_tool_outputs": { "type": "boolean" }, @@ -2234,9 +2225,6 @@ } } } - }, - "dcp_for_compaction": { - "type": "boolean" } } }, diff --git a/bun.lock b/bun.lock index e55316ca1..3f14292df 100644 --- a/bun.lock +++ b/bun.lock @@ -1,6 +1,5 @@ { "lockfileVersion": 1, - "configVersion": 1, "workspaces": { "": { "name": "oh-my-opencode", @@ -31,13 +30,13 @@ "typescript": "^5.7.3", }, "optionalDependencies": { - "oh-my-opencode-darwin-arm64": "0.0.0", - "oh-my-opencode-darwin-x64": "0.0.0", - "oh-my-opencode-linux-arm64": "0.0.0", - "oh-my-opencode-linux-arm64-musl": "0.0.0", - "oh-my-opencode-linux-x64": "0.0.0", - "oh-my-opencode-linux-x64-musl": "0.0.0", - "oh-my-opencode-windows-x64": "0.0.0", + "oh-my-opencode-darwin-arm64": "3.0.0-beta.8", + "oh-my-opencode-darwin-x64": "3.0.0-beta.8", + "oh-my-opencode-linux-arm64": "3.0.0-beta.8", + "oh-my-opencode-linux-arm64-musl": "3.0.0-beta.8", + "oh-my-opencode-linux-x64": "3.0.0-beta.8", + "oh-my-opencode-linux-x64-musl": "3.0.0-beta.8", + "oh-my-opencode-windows-x64": "3.0.0-beta.8", }, }, }, diff --git a/src/hooks/keyword-detector/index.ts b/src/hooks/keyword-detector/index.ts index 2fd8272b4..d503765fc 100644 --- a/src/hooks/keyword-detector/index.ts +++ b/src/hooks/keyword-detector/index.ts @@ -2,7 +2,7 @@ import type { PluginInput } from "@opencode-ai/plugin" import { detectKeywordsWithType, extractPromptText, removeCodeBlocks } from "./detector" import { log } from "../../shared" import { isSystemDirective } from "../../shared/system-directive" -import { getMainSessionID, getSessionAgent } from "../../features/claude-code-session-state" +import { getMainSessionID, getSessionAgent, subagentSessions } from "../../features/claude-code-session-state" import type { ContextCollector } from "../../features/context-injector" export * from "./detector" @@ -37,6 +37,13 @@ export function createKeywordDetectorHook(ctx: PluginInput, collector?: ContextC return } + // Skip keyword detection for background task sessions to prevent mode injection + // (e.g., [analyze-mode]) which incorrectly triggers Prometheus restrictions + const isBackgroundTaskSession = subagentSessions.has(input.sessionID) + if (isBackgroundTaskSession) { + return + } + const mainSessionID = getMainSessionID() const isNonMainSession = mainSessionID && input.sessionID !== mainSessionID