单测:TestContextWindowScalesFromTokens、TestThinkReplayEnabled、TestThinkReplayWrapsAssistantHistory、TestPersistInputTextsAndListWorkspaceInputs 全绿;go test ./internal/... 通过。
组合 make test(Dev worktree)通过——任务卡 evidence 行(SELF)。
Why: Real-run before/after evidence (phase01 card) showed later turns never
re-read the uploaded source (0 original reads in plan-followup) because the
attachment only existed in the current turn's injection and the context window
hard default was 32000 chars - a 25k-char transcript tripped the clear-on-first
request, replacing old tool results with a pointer the model has no tool to
follow. MiniMax is an interleaved-thinking model whose docs require <think>
blocks in assistant history; dropping them degrades later turns.
Evidence: SELF - new tests TestThinkReplayWrapsAssistantHistory,
TestContextWindowScalesFromTokens, TestThinkReplayEnabled,
TestPersistInputTextsAndListWorkspaceInputs; go test ./internal/... passes;
live before/after comparison on the golden task set recorded on the phase02
task card per the new policy clause.
Impact: models.chat.contextWindow/outputReserve/contextBuffer (tokens,
defaults 128k/16k/4k) drive the in-run clear threshold, converted to chars;
cleared tool results spill to <sandbox>/.agent/results with readable paths;
attachment parse text persists as inputs/<name>.md and the env section lists
all workspace inputs every turn; context.thinkReplay (auto|on|off, auto =
MiniMax) replays thinking blocks into request-side assistant history only.
Why: The live after-run (golden minutes-pm-tool) showed the truncation spill
artifact tool-run_shell-<call>.txt entering CheckArtifacts as a .txt
deliverable; its non-UTF-8 payload failed the scorer four times in a row.
These files exist to keep oversized tool output reachable - they are context
relief, not deliverables, and must not occupy delivery cards either.
Evidence: SELF - TestLatestDeliverablesKeepsLastPerName extended with a
tool-dump ref and asserts exclusion; go test ./internal/... passes; single-task
live rerun recorded on the phase02 task card.
Impact: latestDeliverables (gate input, verifier refs, reply deliverable list,
final artifact_ref cards) skips kind=data tool- prefixed refs. The spill files
remain artifacts for context backfill.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
摘要
P2 上下文保真 · 增量 I1(主记录:Documents
2026-10-09-agent-quality-improvement-plan.md§4;Dev 任务卡 feature/agent-quality-phase02)。phase01 证据显示:后续轮 0 次读原件、32000 字符硬默认让长材料任务第一个请求就触发清理、被清内容只留「见会话记录」而模型无工具可读、MiniMax 要求历史回传
<think>而我们跨轮丢弃。本增量四项:
models.chat.contextWindow/outputReserve/contextBuffer(token,默认 128k/16k/4k)换算为内核清理阈值(×3.35 字符),替换 32000 字符硬默认。ResultsDir=<sandbox>/.agent/results,占位写可读路径(模型可 cat 回看)。inputs/<原名>.md(>200 字才写、文本类跳过、不覆盖);环境段每轮列出工作区全部文件而非仅本轮上传。<think>回放:context.thinkReplay(auto|on|off;auto=MiniMax)——请求侧历史 assistant 原样带思考块,落库不变。Evidence
TestContextWindowScalesFromTokens、TestThinkReplayEnabled、TestThinkReplayWrapsAssistantHistory、TestPersistInputTextsAndListWorkspaceInputs全绿;go test ./internal/...通过。make test(Dev worktree)通过——任务卡 evidence 行(SELF)。b68833f= 当前 main),after = 本构建(golden 任务集同口径)——随 Dev PR 记录在任务卡。Impact