How to Make Codex and Claude Limits Last Longer

43.2K views
•
August 28, 2026
by
AI LABS
YouTube video player
How to Make Codex and Claude Limits Last Longer

TL;DR

Clear the conversation before unrelated tasks, combine related requests into one detailed prompt, and match the model and effort level to the difficulty of the work. Compact only when necessary, preserve essential details in the compaction instructions, rewind failed attempts instead of carrying mistakes forward, and disable automatic Claude Code recaps if their convenience does not justify the usage.

Transcript

If you've been working with agents for a while, you might also have hit your limits in the middle of doing something important and you have to wait for it to reset before you can continue your work again. That's been a cause of frustration for us, too, due to which we use a certain set of measures to make the limits last as long as possible so that... Read More

Key Insights

  • The context window is the amount of information a model can hold in one conversation, measured in tokens. Each new request can include the earlier conversation, system instructions, project instructions, and descriptions of connected tools and skills, so later interactions may process substantially more material.
  • Usage limits are separate from context windows and represent the total work available across sessions. The transcript says both Claude Code and Codex use five-hour windows beginning with the first message, with an additional weekly limit shared across models, so changing models does not restore exhausted usage.
  • The clear command is appropriate when a new task is unrelated to the completed task. Clearing removes accumulated conversation context, preventing instructions and outputs from the earlier job from being sent with prompts for work that does not need any of that information.
  • Compaction is a summary-based restart rather than a free recovery of usage. The agent must read the conversation to create the summary, important details may be lost, and previously consumed usage is not restored, so repeated intentional compaction can reduce both efficiency and response quality.
  • The timing of compaction affects its cost because Claude keeps a temporary ready-made copy of an active conversation. The transcript says reading from this copy costs roughly one tenth as much, so compacting before a long break may be preferable to compacting after returning.
  • Rewind removes an unsuccessful exchange instead of preserving both the mistake and its correction in future context. Claude Code supports a rewind command or a double press of Escape, while Codex uses the double-Escape method described in the transcript rather than a dedicated rewind command.
  • A single comprehensive prompt can use fewer tokens than several incremental prompts covering related changes. Each agent action may resend conversation context, while one combined request also lets Claude Code or Codex plan connected tasks together instead of processing each adjustment as a separate job.
  • Model selection and effort level are major controls on usage. The transcript recommends matching capability to task difficulty, using medium effort as the default, and increasing effort only for work that genuinely needs deeper reasoning because stronger models and higher effort consume more of the available limit.
  • More videos from this channel:
  • More from this channel: AI LABS

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What is the difference between a context window and a usage limit?

A context window is the amount of information a model can hold within one conversation at a time, and it is measured in tokens. A usage limit is the total amount of work available across sessions under a plan. Reaching the context boundary affects what fits in a conversation, while exhausting usage prevents more work until the applicable limit resets.

Q: Why do later messages in an agent conversation consume more tokens?

Later messages can cost more because the model does not remember earlier exchanges independently. The conversation is supplied again with the new prompt so the model can understand what happened previously. System instructions, project files such as CLAUDE.md or AGENTS.md, connected tool descriptions, file reads, and command outputs can also occupy context throughout the session.

Q: When should the clear command be used in Claude Code or Codex?

The clear command should be used when beginning a task that has nothing to do with the work just completed. It empties the existing context and starts a fresh session state, preventing unrelated prompts, outputs, tool activity, and corrections from accompanying the new task. It should not be used when the next task still depends on earlier decisions or details.

Q: When should a long conversation be compacted?

A long conversation should be compacted only when its context is becoming full and continued work still depends on it. The transcript recommends compacting before taking a break rather than after returning, because Claude may still have a lower-cost ready-made copy available. Compaction instructions should explicitly identify the requirements, decisions, and details that must survive the summary.

Q: Why can repeated compaction reduce answer quality and available usage?

Compaction requires the agent to read the conversation and create a summary, so it consumes usage rather than refunding what was already spent. A summary also preserves less information than the original conversation. Repeating the process can therefore spend additional tokens while progressively discarding details that the model would need to produce accurate, context-sensitive, high-quality responses.

Q: How does rewinding a failed agent response save context?

Rewinding removes the unsuccessful message from the active context before the corrected instruction is submitted. Without rewinding, future requests carry both the original mistake and the later correction, increasing the amount of material repeatedly processed. The transcript identifies a rewind command or double Escape for Claude Code, and double Escape for Codex because it lacks the described command.

Q: Why should related agent tasks be combined into one prompt?

Related tasks should be combined because every separate interaction can cause the existing conversation to accompany another model request, including when the agent reads files or runs commands. One detailed prompt can reduce repeated context transmission and allow the agent to plan connected changes together. The transcript reports that grouped website design changes used fewer tokens than submitting each change separately.

Q: How should model choice and effort level be adjusted to conserve usage?

Model capability and reasoning effort should match the actual difficulty of the task. The transcript recommends efficient models for ordinary work, stronger models when smaller ones struggle, and medium effort as the default. Higher effort should be enabled for a specific difficult task instead of being left on continuously, because deeper reasoning consumes more of the available usage limit.

Summary & Key Takeaways

  • Context windows and usage limits measure different things. A context window controls how much information fits within one conversation, while a usage limit controls the total work available across sessions. Later interactions can cost more because the conversation, instructions, tool descriptions, file reads, and command results may accompany subsequent model requests.

  • Workflow habits can reduce unnecessary token consumption. Clear the context when changing to an unrelated task, combine related requirements into one comprehensive prompt, and rewind an unsuccessful attempt before correcting it. Compacting can shorten the active conversation, but creating the summary also consumes usage and may remove details needed for high-quality work.

  • Tool configuration has a major effect on consumption. The recommended approach is to match model capability to task difficulty and keep effort at medium by default. Smaller or more efficient models suit routine work, while the strongest models and higher effort settings should be reserved for problems that genuinely require deeper reasoning.


Read in Other Languages (beta)

Share This Summary 📚

Explore More Summaries from AI LABS 📚