A recent analysis of Claude Code's compaction behavior reveals inconsistencies in how it retains invoked skills. While the root CLAUDE.md file and its imports are consistently preserved, two out of eight compaction tests failed to re-inject the body of an invoked skill when using the `claude -p --resume` command. This contrasts with compactions run within a single process, which successfully re-attached skills. The study also confirmed that Claude Code preserves typed passphrases within chat summaries and correctly re-injects nested CLAUDE.md files under specific conditions. AI
IMPACT Investigating the reliability of AI agent memory and context retention during operations like compaction.
RANK_REASON Analysis of a specific software feature's behavior with detailed methodology and findings. [lever_c_demoted from research: ic=1 ai=1.0]
Read on dev.to — Claude Code tag →
- Agent SDK
- Claude Code
- Claude Code 2.1.285
- Claude Code Docs
- CLAUDE.md
- claude -p --resume
- Claude Pro
- claude --version
- /compact
- SessionStart
- Six CLAUDE.md files
- six codewords
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →