shareAI-lab / shareAI-lab/learn-claude-code
关于context offloading/compac 上下文卸载/压缩 中的问题
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 12.4k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 6
Description
在做上下文压缩时,我看到许多主流agent,比如claude code都提到隐藏工具调用结果、删除无用信息、压缩历史信息等方式。
问题一:这样是否会导致prompt cache问题呢?上下文变了,缓存命中降低,岂不是更增加成本呢?
问题二:如果是一个很长的文章/工具调用结果,我们直接截断放到硬盘里保存,那我们下次调用时再去打开这个保存的文件,那不还是需要加载进来吗?
期待有大佬可以解答
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue asks conceptual questions about context offloading, compression, prompt-cache behavior, and reloading stored content, but mentions no files, tests, or entry points. Start by identifying where the repository documents or implements context management; done would require a maintainer-approved explanation or documentation change addressing both questions.
Written by the indexing model from the issue text.
Assessment
- Domain
- ai
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100