fix(todo-continuation-enforcer): add plan agent to DEFAULT_SKIP_AGENTS to prevent infinite loop
The todo-continuation-enforcer injects continuation prompts when sessions go idle with pending todos. When Plan Mode agents (which are read-only) create todo items, the continuation prompt contradicts Plan Mode's STRICTLY FORBIDDEN directive, causing an infinite loop where the agent acknowledges the conflict then goes idle, triggering another injection. Adding 'plan' to DEFAULT_SKIP_AGENTS prevents continuation injection into Plan Mode sessions, matching the same exclusion pattern already used for prometheus and compaction agents. Fixes #2526
This commit is contained in:
@@ -2,7 +2,7 @@ import { createSystemDirective, SystemDirectiveTypes } from "../../shared/system
|
||||
|
||||
export const HOOK_NAME = "todo-continuation-enforcer"
|
||||
|
||||
export const DEFAULT_SKIP_AGENTS = ["prometheus", "compaction"]
|
||||
export const DEFAULT_SKIP_AGENTS = ["prometheus", "compaction", "plan"]
|
||||
|
||||
export const CONTINUATION_PROMPT = `${createSystemDirective(SystemDirectiveTypes.TODO_CONTINUATION)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user