FirstPrompt
Inicia sesión
Lanza con Claude CodeMódulo 2 · Tu primer prompt
Lección 3 de 6AnteriorSiguiente
2:41

Este vídeo está en inglés por ahora. La versión en español llega pronto.

Ventanas de contexto y /clear

GratisVídeo 2:41

Estás leyendo sin cuenta: tu progreso solo se guarda en este dispositivo.

Regístrate gratis para no perderlo

Claude re-reads your whole conversation every time it answers. That running history is the context window, and keeping it tidy is one of the quiet skills that separates a smooth session from a frustrating one.

What is in there

Everything from this session: every message you sent, every file Claude read, every command it ran. It is large, but not infinite, and everything in it competes for attention.

Your files on disk are not the context. Clearing the conversation never deletes your work.

What it looks like when it goes wrong

Two symptoms, and once you know them you will spot them immediately:

  • Claude keeps referring to something you finished twenty minutes ago.
  • You ask for a small change and it edits files you were not talking about.

Both mean the same thing: the old work is still in the window, and it is pulling on every answer.

The fix: one task per conversation

Starts a new conversation with empty context. Your files are untouched.
/clear

Finished styling your page and now want to add a new section? /clear first. It is the cheapest quality upgrade available, and beginners almost never use it.

Keep the context while you are iterating on the thing — that history is exactly what lets Claude build on what it just did. when you genuinely switch tasks.

5 min de lectura
Lección 3 de 6

Módulo 2 · Tu primer prompt

0/6
  1. 2:46Anatomía de un promptVídeo
  2. 2:44La palanca de ser específicoVídeo
  3. 2:41Ventanas de contexto y /clearReproduciendo
  4. 2:21Comandos slashVídeo
  5. 2:25@file y @directoryVídeo
  6. 2:05Resumen del módulo 2Vídeo
  7. Checkpointquiz + publicar
same
Clear it

When you want to keep going, but the session is long

Sometimes you are still on the same task and the conversation has simply got long. You do not want to lose it.

Summarizes the conversation so far to free up room, and keeps going. It also tells you where the full earlier conversation is saved.
/compact

/clear throws the conversation away. /compact compresses it and carries on. When you are unsure which you want, ask yourself whether you would miss the history — if yes, compact.

Try it now

Do two unrelated things, badly, on purpose.

  1. Start Claude and ask it to change the colours on your page.
  2. Without clearing, ask it to write a completely unrelated file: shopping-list.md with five items.
  3. Now ask: "make the heading bigger."

Watch its answer. It may stay on the page, but notice whether it mentions the shopping list: that is the old task, still in the window. Then /clear and ask the same thing. This time it has to look around your folder first, because it no longer remembers either task.

What you just learned

  • The context window is Claude's memory of this session, not your files.
  • A cluttered context makes Claude drift toward old, finished work.
  • /clear between unrelated tasks. One task per conversation.
  • /compact when you are on the same task but the conversation has grown long.

Next: the handful of slash commands worth memorising.

Práctica

Prueba esta lección en una terminal guiada.

Regístrate gratis para practicar
SiguienteComandos slash
Anterior
Siguiente
CursosExplora Lanza con Claude CodePrompt packsCrea tu propio sitio web