사용량 위키: 한도 초기화 시간과 토큰 절약

한도는 언제 초기화되고, 어떻게 하면 더 오래 쓸 수 있을까요? 주제별로 찾아보세요. Codex와 Claude를 따로 답하며, 공식 문서의 원문 인용과 링크를 함께 제공합니다.

세션이 길수록 토큰이 더 드는데, /compact와 /clear 중 무엇을 써야 하나요?

작업을 바꿀 때는 /clear, 한 작업 도중에만 /compact를 쓰세요. 메시지마다 대화 전체를 다시 읽기 때문에 세션이 길수록 한 줄 한 줄이 비싸집니다. /clear는 토큰이 들지 않고, /compact는 그 자체가 큰 요청 한 번입니다.

Codex

새 작업은 /new로 새 대화를 시작하고, 한 작업이 길어졌으면 /compact를 쓰세요.

Codex 사용량은 컨텍스트 크기를 따라갑니다. 입력이 클수록 더 많이 씁니다. 캐시된 입력은 일반 입력의 10분의 1로 계산되고 캐시 쓰기는 무료이지만, 대화가 길수록 그 몫도 커집니다. 작업을 바꿀 때 /new(또는 /clear)를 입력하면 컨텍스트가 0에서 다시 시작합니다. 같은 작업을 이어 가야 하는데 이미 길어졌다면 /compact가 대화를 요약으로 바꿔 줍니다. /status는 토큰 사용량과 남은 컨텍스트를 보여 주고, /resume은 이전 대화를 다시 불러옵니다.

공식 문서 원문

Model choice, context, reasoning, tool use, retrieval, and caching all affect usage, so prompt length alone isn't a reliable estimate.
OpenAI Developers · Codex pricing
Charges are based on the model used and the actual input, cached input, and output tokens consumed.
OpenAI Help Center · ChatGPT Rate Card
Codex does not charge for cache writes.
OpenAI Help Center · ChatGPT Rate Card
/new: Start a new chat inside the same CLI session.
OpenAI docs · Developer commands
/compact: Summarize the visible chat to free tokens.
OpenAI docs · Developer commands
/status: Display session configuration and token usage.
OpenAI docs · Developer commands

Claude

작업을 바꿀 때는 /clear를 쓰세요. 토큰이 들지 않습니다. /compact는 작업 도중에만 쓰세요. 그 자체가 큰 요청 한 번입니다.

Claude Code는 요청마다 대화 전체를 보내고, 도구를 한 번 호출할 때마다 요청이 또 하나 생깁니다. 캐시가 있으면 기록을 캐시 요율(일반 입력의 약 10분의 1)로 다시 읽기 때문에, 하루 종일 열어 둔 세션에 한 줄만 입력해도 기록 전체의 비용을 냅니다. /usage 패널은 이렇게 표현합니다. "Longer sessions are more expensive even when cached. /compact mid-task, /clear when switching to new tasks."(긴 세션은 캐시가 있어도 더 비쌉니다. 작업 도중에는 /compact, 새 작업으로 바꿀 때는 /clear를 쓰세요.) 캐시는 구독에서 1시간, 사용량 크레딧을 쓰는 동안에는 5분 유지됩니다. 그보다 오래 쉬면 돌아와서 보내는 첫 메시지가 전체 컨텍스트를 일반 요율로 다시 처리하며, 이것이 가장 비싼 메시지입니다. /clear 전에 /rename으로 이름을 붙여 두면 /resume으로 그 세션을 찾을 수 있습니다. /compact 뒤에는 무엇을 남길지 적을 수 있습니다. 예: /compact keep only test output and code changes(테스트 출력과 코드 변경만 남기라는 뜻). CLAUDE.md에 # Compact instructions라는 제목의 섹션을 만들어 두면 고정 규칙이 됩니다.

공식 문서 원문

With prompt caching, Claude Code re-reads that history at the cached token rate, so a one-line question in a session that has been open all day still draws usage for the whole conversation.
Claude Code docs · Manage costs effectively
Cache misses: your first message after a break longer than the cache lifetime misses the cache and reprocesses your full context. The lifetime is an hour on a subscription and drops to five minutes once you're drawing on usage credits
Claude Code docs · Manage costs effectively
Compaction: /compact reads the conversation it summarizes, so compacting a large context is itself a large request. When you want a fresh start instead of continuity, /clear costs nothing
Claude Code docs · Manage costs effectively
Use /clear to start fresh when switching to unrelated work. Stale context wastes tokens on every subsequent message. Use /rename before clearing so you can easily find the session later, then /resume to return to it.
Claude Code docs · Manage costs effectively
cache_read_input_tokens — Tokens served from cache on this turn, billed at roughly 10% of the standard input rate
Claude Code docs · How Claude Code uses prompt caching

웹 검색, 큰 파일, 긴 로그: 컨텍스트에 통째로 넣지 마세요

검색 한 번은 저렴합니다. 비용이 드는 것은 웹 페이지 전체, 파일 전체, 로그 전체를 컨텍스트에 넣는 일입니다. 한번 들어가면 이후의 모든 메시지가 그 비용을 다시 냅니다.

  1. 사실 하나가 필요하면 페이지 전체 가져오기가 아니라 검색을 요청하세요. 전문이 필요할 때만 가져오세요. Claude에서는 web search와 web fetch 모두 한도에 포함되며, 1만 단어짜리 글을 요약하면 검색 한 번보다 훨씬 많이 듭니다. Research는 검색을 연달아 여러 번 실행해 더 많이 씁니다.

  2. 파일과 함수를 짚어 주고, 가능하면 줄 범위도 알려 주세요. "auth.ts의 login 함수를 고쳐 줘"는 파일 하나만 읽지만 "이 코드를 개선해 줘"는 넓은 범위를 훑게 만듭니다.

  3. 로그와 테스트 출력은 에이전트가 보기 전에 걸러 주세요. Claude Code에서는 PreToolUse hook으로 테스트 명령이 실패한 줄만 돌려주게 할 수 있고, 공식 costs 페이지에 바로 쓸 수 있는 스크립트가 있습니다. 가장 간단한 방법은 직접 grep으로 오류 줄만 뽑아 붙여 넣는 것입니다.

  4. 출력이 긴 일(테스트 실행, 문서 가져오기, 로그 읽기)은 서브에이전트에 맡기세요. 긴 출력은 서브에이전트의 컨텍스트에 남고 메인 세션은 요약만 받습니다. 절약되는 것은 메인 세션의 컨텍스트이며, 전체 토큰이 항상 줄어드는 것은 아닙니다.

  5. Codex: 관련 있는 파일만 제공하고, 가능하면 출처 범위를 좁히세요.

공식 문서 원문

Usage of web search and web fetch counts toward your usage limits.
Claude Help Center · Enable and use web search
asking Claude to summarize a 10,000-word article will use substantially more of your context window than a regular web search query.
Claude Help Center · Enable and use web search
Instead of Claude reading a 10,000-line log file to find errors, a hook can grep for ERROR and return only matching lines, reducing context from tens of thousands of tokens to hundreds.
Claude Code docs · Manage costs effectively
Vague requests like "improve this codebase" trigger broad scanning. Specific requests like "add input validation to the login function in auth.ts" let Claude work efficiently with minimal file reads.
Claude Code docs · Manage costs effectively
Limit source material. Provide only relevant files and, when possible, narrow the sources or date range.
OpenAI Developers · Codex pricing

흔한 오해

  • /compact는 토큰을 절약해 주니 아무 때나 실행하면 된다

    아닙니다. /compact는 요약을 쓰기 전에 대화 전체를 읽어야 하므로, 컨텍스트가 클수록 그 요청 한 번도 커집니다. 계속 이어 갈 작업의 중간에 어울립니다. 작업을 바꿀 때는 토큰이 들지 않는 /clear를 쓰세요.

  • 캐시가 있으니 세션을 하루 종일 열어 둬도 거의 비용이 들지 않는다

    그렇지 않습니다. 캐시는 다시 읽는 단가를 약 10분의 1로 낮춰 줄 뿐입니다. 메시지마다 기록 전체를 여전히 읽으며, 기록이 길수록 그 몫도 커집니다. 게다가 구독에서 캐시는 1시간만 유지됩니다. 더 오래 쉬었다가 돌아오면 첫 메시지가 전체 컨텍스트를 일반 요율로 다시 처리합니다.

  • 웹 검색은 토큰을 많이 쓰니 피해야 한다

    검색 때문이 아닙니다. 검색은 짧은 발췌 몇 개를 가져올 뿐입니다. 비용이 드는 것은 페이지 전체를 가져오고, 파일 전체를 읽고, 로그 전체를 붙여 넣는 일입니다. 그 내용이 컨텍스트에 남아 이후 매 턴마다 다시 읽힙니다.

팁

  • 작업을 바꾸기 전에 /rename을 실행한 다음 /clear를 하세요. 돌아갈 때는 /resume입니다. Codex에서는 /new와 /resume을 씁니다.
  • /compact는 작업 도중에만 쓰고, 무엇을 남길지 덧붙이세요. 예: /compact keep only test output and code changes.
  • 1시간 넘게 자리를 비울 건가요? 먼저 하던 일을 마무리하세요. Pro와 Max에서 Claude Code가 큰 세션을 요약에서 이어 가자고 제안하면 받아들이세요. 이후 메시지는 전체 기록을 다시 싣지 않습니다.
  • 언제든 Claude Code에서는 /context, Codex에서는 /status를 실행해 컨텍스트가 얼마나 찼는지 보세요.
  • 다 쓴 /loop 작업은 중지하고 아직 종료하지 않은 teammate는 종료하세요. 쉬고 있는 세션에서도 실행될 때마다 전체 컨텍스트를 싣습니다.
  • Claude Code는 긴 컨텍스트나 캐시 미스가 최근 사용량의 10%에 이르면 /usage에 표시합니다. 그 표시가 보이면 /clear를 할 때입니다.

Codex 리셋 발표 기록 · Claude 리셋 발표 기록