Claude System Prompt Compliance Degrades in Long Conversations

A Reddit user reports that Claude's system prompt compliance degrades significantly in long conversations, particularly affecting AI coding agents with specific formatting rules and constraints.
Problem Details
The user runs multiple Claude-based agents for internal tooling, each with system prompts containing specific rules about output format, topics to avoid, and edge case handling. While these work perfectly for the first 20-30 exchanges, compliance begins slipping around message 40-50.
Specific issues observed:
- Agents stop following formatting rules
- They become "helpful" in ways the system prompt explicitly prohibits
- They forget constraints that were clear at the start
The user notes this isn't a bug but rather how context windows work under pressure, with system prompts competing with 40+ messages of conversation history for attention weight.
Workarounds and Solutions
The user shares several practical approaches that have worked:
- Restate critical rules: Every 15-20 messages, restate the top 3 rules you can't afford to lose in condensed form (not the full system prompt)
- Keep conversations shorter: If a task requires more than 30 exchanges, start a new session with a summary of what happened
- Strategic prompt placement: Put your most important constraints at both the beginning AND end of the system prompt, as models pay more attention to both positions
- Test at scale: Test your agents at message 50, not just message 5, since happy path demos don't reveal this issue
The user emphasizes that this problem isn't discussed enough and invites others to share reliable patterns for maintaining instruction adherence in long-running sessions.
📖 Read the full source: r/ClaudeAI
👀 See Also

State Flow Machine: Non-Transformer Architecture Maintains 62% Accuracy on Long Sequences Where Transformers Drop to 2%
A researcher has developed State Flow Machine (SFM), an alternative architecture using explicit memory slots instead of attention heads, achieving 62% accuracy on a synthetic program state tracking task at 4× training length where transformers drop to 1.9-3.1%. The model runs on a single Huawei Ascend 910 ProA NPU.

Claude Code v2.1.116: Performance improvements, terminal fixes, and security updates
Claude Code v2.1.116 delivers significant performance improvements including up to 67% faster /resume on 40MB+ sessions, smoother terminal scrolling, and faster MCP startup. The release also fixes terminal rendering issues, adds security protections for dangerous path operations, and resolves multiple bugs affecting slash commands and plugin management.

DeepSeek Makes Permanent 75% Discount on Flagship AI Model
DeepSeek is making permanent a 75% discount on its flagship AI model. The price cut applies to API access and was originally a temporary promotion.
The Mundane Risk: Why AI Safety's Biggest Threats Are Boring, Not Dramatic
An essay argues that mundane AI failures are already causing damage at scale, current alignment approaches depend too heavily on sandboxed environments, and capability convergence makes accidental open-world exposure increasingly plausible.