Zimon 在 【学习笔记】Claude Code源码分析(一) 中发帖
/compact命令解读
文件所在:src/services/compact/prompt.ts
prompt解读
CRITICAL: Respond with TEXT ONLY. Do NOT call any tools.
Do NOT use Read, Bash, Grep, Glob, Edit, Write, or ANY other tool.
You already have all the context you need in the conversation above.
Tool calls will be REJECTED and will waste your only turn — you will fail the task.
Your entire response must be plain text: an block followed...