EmpezarEmpieza gratis

Measuring and compacting a session

After shipping the label fix from your last task, your tech lead asks you to take a fresh look at the session model in src/lib/auth.ts — the team is planning a refactor and wants a second pair of eyes. As you dig in, you begin to see how Claude Code's context window quickly fills up, so you'll need to manage this context using Claude Code's built-in commands.

Este ejercicio forma parte del curso

Claude Code in Action

Ver curso

Instrucciones del ejercicio

  • Start Claude Code with claude.
  • Ask Claude to read src/lib/auth.ts and explain the session functions, plus how prisma/schema.prisma models sessions. Let it finish without interrupting.
  • Run /context to see how much of the context window you've used.
  • Run /compact to compress the conversation into a summary.
  • Keep working on the compacted session: ask Claude to explain src/components/chat/MessageList.tsx.
  • Run /context once more to see usage after compacting, then type /exit to exit Claude Code.

ejercicio interactivo práctico

Convierte la teoría en práctica con uno de nuestros ejercicios interactivos

Empezar ejercicio