[FEATURE REQUEST] Context tracking & decision registry to prevent approved-feature regression in long sessions

Resolved 💬 5 comments Opened Mar 30, 2026 by aleapc Closed May 3, 2026

Problem

During a multi-day production development session for a healthcare platform, Claude Code repeatedly lost track of user-approved decisions and regressed working features when making fixes. This resulted in:

  • 10+ unnecessary APK rebuilds to fix what was a single-line bug (wrong JSON key name)
  • ~6 hours of wasted developer time going back and forth
  • Features that were explicitly approved being removed when Claude rewrote files from scratch instead of making incremental edits
  • Significant user frustration and loss of trust in the tool

Root Cause

Claude Code does not maintain a persistent decision registry across long conversations. When context grows large:

  1. Earlier approvals get "forgotten" or deprioritized
  2. Claude defaults to rewriting entire files instead of surgical edits
  3. Bug fixes inadvertently remove approved features
  4. The user has to re-explain and re-approve the same decisions multiple times

Real Example (anonymized)

  1. User approved a screen (ScreenA v1.2.0) with Feature X (multi-item focus with timed rotation)
  2. A crash bug appeared (caused by heavy SDKs, not by ScreenA code)
  3. Instead of just removing the problematic SDKs, Claude rewrote the entire ScreenA from scratch — losing Feature X and 5 other approved features
  4. User pointed out all features were missing
  5. Claude rewrote it again — still wrong
  6. Finally had to git-restore the original commit verbatim
  7. 5 versions wasted on unnecessary rewrites

Proposed Solution

1. Decision Registry

Claude should maintain a machine-readable file tracking:

  • What the user approved (with commit hash reference)
  • What needs to be changed (specific issues only)
  • What must never be modified without explicit re-approval

2. Incremental-Only Edit Mode for Approved Code

When a file has been marked as approved:

  • Default to surgical edits (Edit tool), never full rewrites (Write tool)
  • Show a diff preview before modifying approved files
  • Warn: "This file was approved at commit X. Making targeted fix to line Y only."

3. Regression Detection

Before committing, Claude should:

  • Compare new version against approved version
  • Flag any removed functionality (deleted functions, removed imports, reduced line count)
  • Ask: "I removed [Feature X] which was previously approved. Should I keep it?"

4. Session Continuity Metadata

Store approved decisions in a format that survives context compaction:

  • .claude/decisions.json or similar
  • Read automatically at session start
  • Never overridden by conversation context

Impact

  • Cost: Each unnecessary rebuild = ~5 min compute + 10 min developer time
  • Trust: Users lose confidence when approved work disappears
  • Scale: Problem gets worse as projects grow larger
  • Revenue risk: Enterprise customers will not tolerate this level of rework

Environment

  • Claude Code (Opus, 1M context)
  • Multi-day session with context compaction
  • ~30 commits across 3 repos
  • Production system

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗