Claude, Nutshell Series

Claude Exam Quick Revision 2: Context & Session Management

Important Commands

  • /compact: Summarise conversation and reclaim context.
  • /clear: Start with an empty conversation context.
  • /resume: Continue a previous session.
  • /context: Inspect context-window usage.
  • /branch: Explore an alternative path from the current conversation.
  • –fork-session: Inherit context but create an independent session.
  • /rewind: Return to an earlier checkpoint.

Preserving Critical Information

  • Immutable facts: Account ID, agreed price, transaction ID.
  • Mutable facts: Status, progress, next action.
  • Derived facts: Conclusions based on evidence.
  • Unverified facts: Claims still requiring confirmation.

Do not repeatedly summarise critical transactional facts. Keep them in a structured case-facts block or external state.

Long-Running Tasks

Persist important discoveries to external scratchpad/state files so they survive compaction, context resets and session boundaries.

Resuming Multi-Agent Work

Best pattern: each agent persists structured output, while a coordinator maintains a manifest/checkpoint and restores only relevant state.

Memory: Compact history. Persist facts. Rehydrate only what is needed.

Leave a comment