NoticiaNews

Qué hacer para que tu plan de Claude Code dure másHow to make your Claude Code plan last longer

Tres hábitos para aprovechar la caché y reducir lo que Claude Code procesa en cada sesión.Three habits for using the cache and reducing what Claude Code processes in each session.

Medidor del plan de Claude Code.

Estas son distintas estrategias para reducir el consumo de Claude Code y hacer que dure más tu suscripción. Tres cambios pueden reducir cuánto texto vuelve a procesar Claude durante cada sesión.

Por qué se gasta tan rápido

Cada mensaje nuevo usa parte del contexto acumulado: las instrucciones, el historial y el contenido que Claude Code leyó para resolver la tarea. Una sesión larga puede volver a procesar material que ya no necesita.

Para eso existe la caché de instrucciones. Guarda la parte de la conversación que Claude ya procesó y reduce el costo de volver a leer las partes que siguen iguales. Así, lo que se repite cuenta menos que lo que aparece por primera vez.

La caché tiene una condición. Sólo reutiliza el inicio que sigue idéntico. Imagina que tu primer encargo decía «revisa la carpeta src» y vuelves a ese turno para pedir «revisa la carpeta tests». Claude puede recuperar de la caché lo que precede al mensaje cambiado, si todavía está guardado. El mensaje nuevo y lo que venga después se procesan a partir de esa versión.

1. Prepara todo al inicio y no lo cambies a mitad

  • Elige el modelo antes de empezar. Usa /model al abrir la sesión y quédate con ese modelo hasta terminar. Cada modelo tiene su propia caché. Si a mitad de una conversación larga pasas a uno más barato, ese modelo relee todo desde cero y puedes perder el ahorro esperado.
  • Manda lo barato aparte. Si una tarea pequeña merece un modelo más económico, pásala a un subagente o abre otra sesión. El subagente trabaja con su propia conversación y su propia caché, así que la sesión principal queda intacta. Basta con pedirlo: «usa un subagente con Haiku para resumir estos archivos». Lo que gaste el subagente también cuenta para tu plan.
  • Conecta tus herramientas antes del primer mensaje. Decide qué herramientas necesitas, conéctalas y luego empieza. En la configuración actual, Claude Code suele cargar las herramientas externas sólo cuando las usa, y entonces conectar una a mitad no rompe la caché. Si tus herramientas se cargan completas desde el inicio, agregar una a mitad sí la rompe.
  • No dejes enfriar una sesión grande. La caché caduca. En una suscripción dura cerca de una hora desde tu último mensaje, mientras estés dentro del uso incluido. Con una clave de la API, o si ya consumes créditos de uso, dura cinco minutos. Si vuelves después, el siguiente mensaje reprocesa todo. Desde la versión 2.1.251, /usage indica si la caché está activa.

2. Una tarea, una sesión

Una sola sesión abierta todo el día para todo cuesta más que el mismo trabajo repartido en sesiones cortas. Aunque la caché funcione, Claude carga con el contexto de tareas que ya terminaste.

  • Limpia al cambiar de tarea. Escribe /clear cuando termines algo y vayas a empezar otra cosa. Claude arranca con un contexto limpio.
  • Resume al cerrar una parte. Escribe /compact cuando termines una etapa de la misma tarea. Claude convierte la conversación en un resumen corto y sigue desde ahí. Hazlo al terminar una etapa, porque el resumen también consume parte del plan.
  • Di dónde está el archivo. «Busca el error en mi proyecto» hace que Claude abra decenas de archivos, y todos entran a la conversación. «El error está en checkout.js, en la función del precio total» le basta con uno.
  • Haz de CLAUDE.md un mapa. CLAUDE.md es el archivo de instrucciones que Claude Code lee al abrir cada sesión. Usa su inicio para decir en qué carpeta vive cada tipo de trabajo. Así Claude va directo y no recorre el proyecto entero.

3. Menos instrucciones fijas

Cuando Claude hace algo que no te gusta, la reacción común es agregar otra regla a CLAUDE.md. Pero ese archivo se carga completo en cada sesión, la necesite o no. Un archivo largo cuesta más tokens y además Claude lo sigue peor. Con muchas reglas es fácil que algunas se contradigan. Los modelos nuevos suelen necesitar menos instrucciones: objetivos claros, pocas reglas y pocos ejemplos.

Las skills resuelven esto. Al iniciar la sesión, Claude sólo ve una descripción corta de cada skill. El contenido completo se carga cuando una tarea lo necesita.

  • Revisa tus instrucciones fijas. En Claude Code 2.1.283 o posterior, /doctor prompt-audit puede señalar reglas repetidas y sugerir recortes.
  • Deja CLAUDE.md en menos de 200 líneas. Es la recomendación de Anthropic. Ahí van tu rol, quién eres y dónde están tus archivos.
  • Pasa cada proceso a una skill. Una lista de revisión o los pasos para recibir a un cliente no deben vivir en CLAUDE.md. Pídeselo a Claude: «convierte esta sección de mi CLAUDE.md en una skill».
  • Revisa tus skills cuando salga un modelo nuevo. Prueba si todavía hacen falta. Con cada modelo, muchas pueden ser más cortas.

En resumen

  1. Elige modelo y herramientas antes de empezar.
  2. Dale a cada tarea su propia sesión limpia.
  3. Mantén CLAUDE.md corto y pasa los procesos a skills.

Estos hábitos dependen de cómo funciona Claude Code hoy. Cada modelo y cada versión cambian algo, así que un hábito que ahorra ahora puede cambiar con la siguiente actualización.

Fuentes

Redacción con IA y edición humana.

These are different strategies to reduce Claude Code usage and make your subscription last longer. Three changes can reduce how much text Claude processes again during each session.

Why it runs out so fast

Every new message uses part of the accumulated context: the instructions, the history, and the content Claude Code read to solve the task. A long session can process again material it no longer needs.

That is what the prompt cache is for. It stores the part of the conversation Claude already processed and lowers the cost of reading again the parts that stay the same. That way, what repeats counts less than what appears for the first time.

The cache has one condition. It only reuses the beginning that stays identical. Imagine your first request said "review the src folder" and you go back to that turn to ask "review the tests folder". Claude can recover from the cache what comes before the changed message, if it is still stored. The new message and whatever comes after it are processed from that version.

1. Set everything up at the start and do not change it midway

  • Choose the model before you start. Use /model when you open the session and keep that model until you finish. Each model has its own cache. If you switch to a cheaper one in the middle of a long conversation, that model rereads everything from scratch and you can lose the expected savings.
  • Send the cheap work elsewhere. If a small task deserves a cheaper model, hand it to a subagent or open another session. The subagent works with its own conversation and its own cache, so the main session stays intact. Just ask for it: "use a subagent with Haiku to summarize these files". What the subagent spends also counts toward your plan.
  • Connect your tools before the first message. Decide which tools you need, connect them, and then start. In the current setup, Claude Code usually loads external tools only when it uses them, so connecting one midway does not break the cache. If your tools load in full from the start, adding one midway does break it.
  • Do not let a large session go cold. The cache expires. On a subscription it lasts about one hour from your last message, as long as you stay within your included usage. With an API key, or if you are already using usage credits, it lasts five minutes. If you come back later, the next message reprocesses everything. Since version 2.1.251, /usage shows whether the cache is active.

2. One task, one session

A single session left open all day for everything costs more than the same work split into short sessions. Even when the cache works, Claude carries the context of tasks you already finished.

  • Clear when you switch tasks. Type /clear when you finish something and are about to start something else. Claude starts with a clean context.
  • Summarize when you close a part. Type /compact when you finish a stage of the same task. Claude turns the conversation into a short summary and continues from there. Do it when a stage ends, because the summary also uses part of your plan.
  • Say where the file is. "Find the bug in my project" makes Claude open dozens of files, and all of them enter the conversation. "The bug is in checkout.js, in the total price function" lets it work with just one.
  • Make CLAUDE.md a map. CLAUDE.md is the instructions file Claude Code reads when it opens each session. Use its beginning to say which folder holds each kind of work. That way Claude goes straight there and does not walk through the whole project.

3. Fewer fixed instructions

When Claude does something you do not like, the common reaction is to add another rule to CLAUDE.md. But that file loads in full in every session, whether it is needed or not. A long file costs more tokens, and Claude also follows it worse. With many rules, it is easy for some to contradict each other. Newer models usually need fewer instructions: clear goals, few rules, and few examples.

Skills solve this. When the session starts, Claude only sees a short description of each skill. The full content loads when a task needs it.

  • Review your fixed instructions. In Claude Code 2.1.283 or later, /doctor prompt-audit can point out repeated rules and suggest cuts.
  • Keep CLAUDE.md under 200 lines. That is Anthropic's recommendation. It should hold your role, who you are, and where your files are.
  • Move each process to a skill. A review checklist or the steps to onboard a client should not live in CLAUDE.md. Ask Claude: "turn this section of my CLAUDE.md into a skill".
  • Review your skills when a new model comes out. Test whether they are still needed. With each model, many can be shorter.

In summary

  1. Choose your model and tools before you start.
  2. Give each task its own clean session.
  3. Keep CLAUDE.md short and move processes to skills.

These habits depend on how Claude Code works today. Each model and each version changes something, so a habit that saves now may change with the next update.

Sources

AI-assisted writing and human editing.

Boletín de Augurtek

Cada viernes, artículos y un video de Augurtek sobre inteligencia artificial.

El boletín y el correo de confirmación están en español. The newsletter and confirmation email are in Spanish.

Aviso de privacidadPrivacy notice (Spanish)

Activa JavaScript para suscribirte.