Skip to content

Lesson 23 of 24

Never Lose Your Progress! Master Claude AI --continue, --resume & /compact Commands

About this lesson

In this session of the Agentic AI Course, Abdul Wahab addresses a common frustration: losing your AI session progress due to power cuts, internet issues, or simply closing your laptop . You will learn how to use advanced Claude CLI commands to seamlessly pick up exactly where you left off and manage your context window for maximum performance . Key Topics Covered in This Video: The "Continue" Command: Learn how to use claude --continue to instantly resume your last session from the very last sentence generated, ensuring no project momentum is lost . The "Resume" Feature: Discover claude --resume, which allows you to view a history of all previous prompts and sessions in a project and select any specific one to restart . Managing Context Window "Rot": Understand when your context becomes "Poisoned" (conflicting decisions) or "Distracted" (unrelated topics) and how to fix it . The Black Zone: What to do when your context window (200k to 1M tokens) is 95% full, and why the /clear command is your best friend for a fresh start . Token Efficiency with /compact: Learn how to create a summary of your conversation to save tokens while keeping the AI informed of your essential project decisions . The Three-Day Rule: Why you should avoid bringing back session data older than three days to prevent errors and maintain project clarity . By the end of this tutorial, you will have a professional decision framework for when to clear, compact, or continue your AI sessions, making your development workflow much more resilient . Homework: Try the claude --continue command after closing a project folder. Then, use /compact to see how much of your token usage you can save while maintaining the same project quality .