perf(deepagent-plugin): optimize context window — kill TEXT_DELTA noise#28
Open
cryptoSUN2049 wants to merge 1 commit intomainfrom
Open
perf(deepagent-plugin): optimize context window — kill TEXT_DELTA noise#28cryptoSUN2049 wants to merge 1 commit intomainfrom
cryptoSUN2049 wants to merge 1 commit intomainfrom
Conversation
…se + add response caps Stream relay: stop pushing TEXT_DELTA to SystemEvent (100+ events/task → 4-9). Only key milestones emit: TOOL_START, AGENT_HANDOFF, RUN_FINISHED. RUN_FINISHED truncated to ~24K chars (16K tokens) with hint to use messages tool. Stall notice limited to 1 per task. Tool responses: add jsonCapped() safety net (2000 char max). fin_deepagent_messages default limit 5 (was 100), max 20 (was 200). skills/packages/backtests/backtest_result all capped. Verified with real Findoo API: 4-min analysis → 7 SystemEvents (was ~80). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fin_deepagent_messages拉全文jsonCapped()2000 字符硬上限,fin_deepagent_messages默认 5 条(原 100)Verified
Test plan
pnpm test -- extensions/findoo-deepagent-plugin/test/stream-relay-context-opt.test.ts(7 passed)pnpm test -- extensions/findoo-deepagent-plugin/test/context-optimization-e2e.test.ts(5 passed)FINDOO_DEEPAGENT_API_KEY=<key> npx vitest run extensions/findoo-deepagent-plugin/test/real-api-context-opt.test.ts(2 passed, real API)pnpm buildpasses🤖 Generated with Claude Code