boardx / boardx/workspacex

/chat 工具卡把内核「Tool result too large」英文驱逐占位原样展示;驱逐阈值 1000 token 太低

Open
#2,813 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
1h 7m
Merged PRs (30d)
969

Description

## 现象(2026-09-06 devapp 人类实测)

deep-agent 内核(`deepagents` `FilesystemMiddleware`,`apps/deep-agent-service/src/deep_agent_service/harness.py` 钉 `tool_token_limit_before_evict=1000`)把超阈值的工具结果驱逐成沙箱文件 `/large_tool_results/`,ToolMessage 正文换成给模型看的英文占位:

> Tool result too large, the result of this tool call call_xxx was saved in the filesystem at this path: /large_tool_results/call_xxx … You can read the result from the filesystem by using the read_file tool …

/chat 工具卡(`apps/web/components/chat/copilotkit-v2-tool-renderers.tsx`)把这段原样展示给用户;`task` 子代理的汇报稍长就被驱逐,用户看到一堆内部搬运痕迹。人类反馈"这个结果看起来也挺奇怪的"。

## 处置(ad-hoc,按 `.harness/instructions/ad-hoc-fix-pr-sop.md`)

1. 前端:纯函数 `apps/web/lib/tool-result-eviction.ts` 识别该形状(以 `Tool result too large` 开头且含 `/large_tool_results/`),工具卡改成一句中文「结果较长,已存为文件 …,agent 会按需读取」+ 可折叠「查看原文」;vitest 单测。
2. 后端:阈值默认提高到 8000,可由 `KERNEL_DEEP_AGENT_TOOL_EVICT_TOKENS` 覆盖;pytest 通过 env 压小阈值保持机制可测。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with apps/web/components/chat/copilotkit-v2-tool-renderers.tsx and apps/web/lib/tool-result-eviction.ts, then run the related Vitest tests. Inspect apps/deep-agent-service/src/deep_agent_service/harness.py and the existing pytest coverage for the eviction threshold and environment override. Done means the UI presents a localized, collapsible result notice and the backend default and override behavior are covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
backend, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.