diff --git a/assets/oh-my-opencode.schema.json b/assets/oh-my-opencode.schema.json index 200889c..308d53a 100644 --- a/assets/oh-my-opencode.schema.json +++ b/assets/oh-my-opencode.schema.json @@ -1487,7 +1487,7 @@ } } }, - "dcp_on_compaction_failure": { + "dcp_for_compaction": { "type": "boolean" } } diff --git a/bun.lock b/bun.lock index ea24f0a..3b58071 100644 --- a/bun.lock +++ b/bun.lock @@ -8,7 +8,7 @@ "@ast-grep/cli": "^0.40.0", "@ast-grep/napi": "^0.40.0", "@clack/prompts": "^0.11.0", - "@code-yeongyu/comment-checker": "^0.6.0", + "@code-yeongyu/comment-checker": "^0.6.1", "@openauthjs/openauth": "^0.4.3", "@opencode-ai/plugin": "^1.0.162", "@opencode-ai/sdk": "^1.0.162", @@ -73,7 +73,7 @@ "@clack/prompts": ["@clack/prompts@0.11.0", "", { "dependencies": { "@clack/core": "0.5.0", "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-pMN5FcrEw9hUkZA4f+zLlzivQSeQf5dRGJjSUbvVYDLvpKCdQx5OaknvKzgbtXOizhP+SJJJjqEbOe55uKKfAw=="], - "@code-yeongyu/comment-checker": ["@code-yeongyu/comment-checker@0.6.0", "", { "os": [ "linux", "win32", "darwin", ], "cpu": [ "x64", "arm64", ], "bin": { "comment-checker": "bin/comment-checker" } }, "sha512-VtDPrhbUJcb5BIS18VMcY/N/xSLbMr6dpU9MO1NYQyEDhI4pSIx07K4gOlCutG/nHVCjO+HEarn8rttODP+5UA=="], + "@code-yeongyu/comment-checker": ["@code-yeongyu/comment-checker@0.6.1", "", { "os": [ "linux", "win32", "darwin", ], "cpu": [ "x64", "arm64", ], "bin": { "comment-checker": "bin/comment-checker" } }, "sha512-BBremX+Y5aW8sTzlhHrLsKParupYkPOVUYmq9STrlWvBvfAme6w5IWuZCLl6nHIQScRDdvGdrAjPycJC86EZFA=="], "@openauthjs/openauth": ["@openauthjs/openauth@0.4.3", "", { "dependencies": { "@standard-schema/spec": "1.0.0-beta.3", "aws4fetch": "1.0.20", "jose": "5.9.6" }, "peerDependencies": { "arctic": "^2.2.2", "hono": "^4.0.0" } }, "sha512-RlnjqvHzqcbFVymEwhlUEuac4utA5h4nhSK/i2szZuQmxTIqbGUxZ+nM+avM+VV4Ing+/ZaNLKILoXS3yrkOOw=="], diff --git a/src/hooks/todo-continuation-enforcer.ts b/src/hooks/todo-continuation-enforcer.ts index 2ab3245..b9c2abd 100644 --- a/src/hooks/todo-continuation-enforcer.ts +++ b/src/hooks/todo-continuation-enforcer.ts @@ -272,8 +272,19 @@ export function createTodoContinuationEnforcer( (prevMessage.tools.write !== false && prevMessage.tools.edit !== false) if (!agentHasWritePermission) { - log(`[${HOOK_NAME}] Skipped: agent lacks write permission`, { - sessionID, agent: prevMessage?.agent, tools: prevMessage?.tools + log(`[${HOOK_NAME}] Skipped: agent lacks write permission`, { + sessionID, agent: prevMessage?.agent, tools: prevMessage?.tools + }) + state.mode = "idle" + return + } + + // Plan mode agents only analyze and plan, not implement - skip todo continuation + const agentName = prevMessage?.agent?.toLowerCase() ?? "" + const isPlanModeAgent = agentName === "plan" || agentName === "planner-sisyphus" + if (isPlanModeAgent) { + log(`[${HOOK_NAME}] Skipped: plan mode agent detected`, { + sessionID, agent: prevMessage?.agent }) state.mode = "idle" return