Your team is training internal developers to use Claude Code effectively. You want to ensure they maintain good context hygiene to prevent confusing the model or wasting tokens. Which TWO of the following practices should you emphasize in your training materials?
Periodic compaction of the conversation history is a best practice for long-running agentic sessions, as it allows the model to condense previous interactions into a structured summary, thereby maintaining a cleaner context and ensuring better performance over extended periods of complex development work.
Why this answer
Maintaining context hygiene is critical for agent performance. Using the /clear command between unrelated tasks ensures that the model starts with a clean slate, preventing artifacts from previous tasks from leaking into new ones. Additionally, using /compact periodically allows the model to summarize the current conversation and reclaim context space, which is essential for long-running sessions where the context window might otherwise become cluttered with irrelevant tool results or outdated reasoning traces that degrade output quality.
Exam trap
Recommending that developers manually edit the context window or delete files to manage state, rather than using the built-in commands designed for context management.