You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
Parent: #131 (portability verdict — Claude Code adapter declared viable).
In long CC sessions, the agent forgets project-level skill guidance (e.g. /take-ownership) and back-delegates to the user prematurely. reflection-3.ts already solves the equivalent problem in OpenCode via session.idle hook. This issue tracks porting that pattern to Claude Code.
Goal
A CC plugin that, on the Stop event:
Grades whether the assistant actually finished the task (re-uses reflection-3 evaluator).
If incomplete, injects a follow-up prompt via decision: "block" + additionalContext to keep the agent driving.
Honors stop_hook_active to prevent infinite loops.
Detects planning/action loops and back-delegation to the user as failure modes.
Success Metric
Manual smoke: open a fresh CC session in this repo, give a multi-step coding task, observe at least one Stop→inject→continue cycle where the plugin successfully re-prompts the agent. Plugin must NOT loop more than 3 times on same failure mode, and must not fire when stop_hook_active=true.
Scope
New: claude/ directory containing the plugin (manifest + hook + bin script)
Reuse: import core grading/loop-detection from a shared module extracted from reflection-3.ts (or, speed path, copy + adapt)
Context
Parent: #131 (portability verdict — Claude Code adapter declared viable).
In long CC sessions, the agent forgets project-level skill guidance (e.g.
/take-ownership) and back-delegates to the user prematurely.reflection-3.tsalready solves the equivalent problem in OpenCode viasession.idlehook. This issue tracks porting that pattern to Claude Code.Goal
A CC plugin that, on the
Stopevent:reflection-3evaluator).decision: "block"+additionalContextto keep the agent driving.stop_hook_activeto prevent infinite loops.Success Metric
Manual smoke: open a fresh CC session in this repo, give a multi-step coding task, observe at least one Stop→inject→continue cycle where the plugin successfully re-prompts the agent. Plugin must NOT loop more than 3 times on same failure mode, and must not fire when
stop_hook_active=true.Scope
claude/directory containing the plugin (manifest + hook + bin script)reflection-3.ts(or, speed path, copy + adapt)Acceptance Criteria
.claude-plugin/plugin.jsonvalid, installable viaclaude --plugin-dirstop_hook_activeloop guard implemented.tasks/.../test-report.md)