no-task-output

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Never Use TaskOutput

切勿使用TaskOutput

TaskOutput floods the main context window with agent transcripts (70k+ tokens).
TaskOutput会向主上下文窗口填充大量Agent对话记录(70,000+ tokens)。

Rule

规则

NEVER use
TaskOutput
tool. Use
Task
tool with synchronous mode instead.
切勿使用
TaskOutput
工具。请改用同步模式的
Task
工具。

Why

原因

  • TaskOutput reads full agent transcript into context
  • This causes mid-conversation compaction
  • Defeats the purpose of agent context isolation
  • TaskOutput会将完整的Agent对话记录读取到上下文中
  • 这会导致对话过程中出现上下文压缩
  • 违背了Agent上下文隔离的设计初衷

Pattern

示例模式

undefined
undefined

WRONG - floods context

WRONG - floods context

Task(run_in_background=true) TaskOutput(task_id="...") // 70k tokens dumped
Task(run_in_background=true) TaskOutput(task_id="...") // 70k tokens dumped

RIGHT - isolated context, returns summary

RIGHT - isolated context, returns summary

Task(run_in_background=false) // Agent runs, returns summary
undefined
Task(run_in_background=false) // Agent runs, returns summary
undefined

Source

来源

  • Session where TaskOutput caused context overflow
  • 因TaskOutput导致上下文溢出的会话案例