CLI is passing trancuated snippet from Tool result to LLM
- 主要语言
- Java
- 星标
- 10.5k
- 派生
- 1.5k
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 128
描述
CLI is sending the trauncated tool result to LLM instead of writing the file to disk and read the entire text. This results in a incorrect response from LLM since it does not have the entire Tool Result in the context
At 50KB threshold (inline path):
• The tool result was under 50KB, so the CLI passed it inline to the LLM as textResultForLlm
• But the CLI applies token-based truncation before sending to the LLM — you can see this in the telemetry: "truncateBasedOn":"tokenCount","truncateStyle":"middle"
• The LLM receives a truncated version and has no way to read the rest — the full text only existed in memory, never on disk
The real gap is that there's no hybrid: "inline a truncated preview AND save the full content to a file so the LLM can read more if needed." That would be the ideal behavior,
贡献指南
调研方向
首先跟踪处理工具结果的 CLI 路径,以及显示基于 token 的中间截断的 telemetry。验证 50KB 阈值下的 inline 路径,然后确认 LLM 可以通过文件获取完整结果,同时预览仍保持 inline。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- ai, cli
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100