ClaudeCode复杂任务自动压缩上下文

请教下ClaudeCode在处理复杂任务时怎么实现自动压缩上下文,避免出现: API Error: 400 Your input exceeds the context window of this model. Please adjust your input and try again. ❯ /...
ClaudeCode复杂任务自动压缩上下文
ClaudeCode复杂任务自动压缩上下文

请教下ClaudeCode在处理复杂任务时怎么实现自动压缩上下文,避免出现: API Error: 400 Your input exceeds the context window of this model. Please adjust your input and try again.

❯ /compact                                                                                     
  ⎿  Error: Error during compaction: API Error: 400 Your input exceeds the context window of
     this model. Please adjust your input and try again.
❯ /context 
  ⎿  Context Usage
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛀ ⛀   gpt-5.5
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   270.8k/200k tokens (135%)
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ 
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   Estimated usage by category
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   ⛁ System prompt: 1.5k tokens (0.7%)
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   ⛁ System tools: 14.6k tokens (7.3%)
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   ⛁ Memory files: 1k tokens (0.5%)
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   ⛁ Skills: 1.3k tokens (0.7%)
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   ⛁ Messages: 269k tokens (134.5%)
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ 

另外,gpt5.5不是1M的上下文吗?怎么在claudecode中设置上下文长度呀?

8 个帖子 - 4 位参与者

阅读完整话题

来源: LinuxDo 最新话题查看原文