Real-World Dilemmas of AI-Assisted Programming
Claude Code, an AI programming tool launched by Anthropic, has become an essential assistant for many developers in their daily work due to its powerful code understanding and generation capabilities. However, as usage time increases, users have gradually discovered some "Failure Modes" in long autonomous coding sessions:
Context Loss
When Claude Code's context window is full and triggers compaction, the model "forgets" what it was doing earlier, leading to repeated work or actions that contradict previous decisions. This results in hours of wasted computing resources and inconsistent outputs.
Work Deferral
Claude often writes comments like "TODO: Implement later" or "Will add in the next step" but never returns to handle them. As a result, features are marked as "completed" but are actually unimplemented.
False Completion
Claude claims tasks are completed without sufficient verification, leading to bugs being found in production rather than during development.
Governance Drift
Claude edits its own rule files (e.g., CLAUDE.md or configuration files) during sessions, causing guardrails to be quietly disabled.
Silent Compaction
The context window fills up without warning, and state is lost before it can be saved, resulting in irrecoverable task interruptions.
Commit Quality Issues
Large code differences are submitted without review, tests are skipped, formatting is inconsistent, and technical debt accumulates in each session.
Agent Amnesia
Sub-agents start with no knowledge of project conventions or current task status, producing work that contradicts the main session.
cc-sentinel is a governance infrastructure designed to address these practical issues.
What is cc-sentinel?
cc-sentinel is a modular collection of Claude Code hooks, skills, reference documents, agents, and templates. It enforces rules through automatically executed hooks instead of relying on Claude to choose to comply.
Core philosophy: Governance should be automated, not optional.
The installation process of cc-sentinel is interactive—Claude Code reads your project and recommends modules to install. After installation, these modules run automatically in the background to prevent the above failure modes.
Core Modules Detailed Explanation
Core Module: Preventing the Three Most Common Failure Modes
The core module addresses three major issues: context loss, work deferral, and agent amnesia:
| Hook | Event | Function |