/compact

The command that summarizes the long conversation so far, to free up room. You can say what to keep, for example “/compact keep the decisions about the API”.

How it appears in the course

Use /clear often. For long tasks, /compact. Write plans down in files.
Key takeaways · Module 04, The working method, step by step
In the middle of a long task, look at /context, then run /compact with a focus.
Try it yourself · Module 04, The working method, step by step
/compact — makes a summary of the conversation, so it takes up less room.
What are the main slash commands? · Module 00, Installation and first steps · free

Where you learn it

In module 04 · The working method, step by step, in the Claude Code for Beginners course.

Related terms

Learn Claude Code from zero, in plain English

12 modules with 1–2 minute lessons, which you can also do on your phone. The first two modules are free.