How-to

Claude Code 禁用 1M 上下文设置

Why we picked it

宝玉分享的 Claude Code 小技巧,禁用 1M 上下文能省 Token,效果不打折但速度稍慢。

用户分享禁用 Claude Code 1M 上下文的经验。使用 Fable 5.

Body

1 时,禁用 1M 上下文能显著减少 Token 消耗。实际使用中,禁用后模型效果无明显折扣,但 Token 处理速度会变慢。

设置方法是在 ~/.claude/settings.

json 中添加环境变量。

Original · 宝玉

这个 Claude Code 禁用 1M 上下文的设置目前我还在用,从效果来说没有发现有明显折扣,从 Token 消耗来说真的慢一些。 宝玉 @dotey 一个让你 Claude 的 Token 更耐用的经验:禁用 1M 上下文,尤其是在用 Fable 5.1 的时候很明显。 ~/.claude/settings.json "env": { "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1" } 🔗 View Quoted Tweet📊 1 ⚡

Industry Coordinates & Source Verification

This report is categorized under AITOP's "How-to" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows and US-China foundation model benchmarks and commercialization comparison. Key entities and technical topics under continuous tracking include Claude Code, Fable 5.1, prompt engineering, token optimization.

Source attribution: curated from 宝玉 (@dotey).