TuBrief
구독 채널
비디오
커뮤니티

Isolation Rules to Save 80% of Session Tokens When Fixing Legacy Code with Claude Code

TuBrief 편집팀
2026년 9월 12일
0
Computing/Software

원본 영상을 바탕으로 AI의 도움을 받아 작성했습니다. 원본 영상이 기준입니다.

English한국어Español中文العربيةDeutschFrançaisPortuguêsहिन्दीРусскийBahasa Indonesia日本語

관련 영상

Give Me 50 Minutes, I'll Give You 1000+ Hours Of Claude Code Knowledge (2026 Guide)51:29

Give Me 50 Minutes, I'll Give You 1000+ Hours Of Claude Code Knowledge (2026 Guide)

Chase AI

커뮤니티의 다른 글

사내 시스템에 llm api 붙일 때 마주하는 현실적인 한계와 대응법

2026년 9월 13일

레거시 백엔드에 GPT-6 Astra 붙일 때 예산 승인과 보안 통과를 먼저 끝내는 법이 있습니다

2026년 9월 13일

에이전트끼리 대화하다 6천만 원 청구서가 나오는 이유

2026년 9월 13일

사내 RAG 벡터 검색에 Okta 권한 필터를 직접 거는 방법

2026년 9월 13일

브라우저 에이전트에게 내 구글 계정을 통째로 넘기면 안 되는 이유

2026년 9월 12일

Apple Won the AI Race

2026년 9월 12일

댓글 (0)

Log in to leave a comment

아직 작성된 글이 없습니다

© 2026 . All rights reserved.

TuBrief
구독 채널
비디오
커뮤니티
로그인

Isolation Rules to Save 80% of Session Tokens When Fixing Legacy Code with Claude Code

When a solo developer with under a year of experience attaches Claude Code to a massive legacy codebase, the token budget depletes in under an hour. With no senior developer in the office to ask, and armed only with basic CLI commands, opening the terminal leads to nothing but a continuous stream of credit card charge alerts.

Claude Code does not persist conversation state on the server. The system prompt, the CLAUDE.md project configuration file, accumulated conversation history, and tool call results are bundled into a single payload every turn and sent back to the Anthropic API. In the first 1 or 2 turns right after session start, it stays around 15,000 tokens, but the moment the agent starts exploring and reads build outputs or tens of thousands of lines of logs, the payload balloons up to 80,000 tokens. Beyond 6 to 10 turns, 120,000 to 200,000 tokens fly back and forth every turn. It is a structure where costs compound with every turn.

The cause becomes clearer when looking at Anthropic's official prompt caching pricing. If the same prefix context is maintained, you only pay 10% of the cost compared to base input tokens. On the other hand, if the agent irregularly reads tens of thousands of lines of code, breaking the cache prefix, a cache creation cost 1.25 times higher with a 5-minute TTL is newly applied. This is why just a few searches run up fees that are difficult for a solo developer to handle.

.claudeignore Does Not Work

Many developers create a .claudeignore file in the root directory and feel relieved. To cut straight to the conclusion, such a configuration file does not exist in the official Claude Code CLI engine. The approach of writing "Do not read the logs folder" in CLAUDE.md is simply ignored if the model decides it is necessary.

To physically cut off the agent's file access at the engine level, you must use the permissions.deny setting in the .claude/settings.json file.

First, bundle build outputs and security files together in .claude/settings.json at the project root.