fix(background-output): stop defaulting full_session=true for running tasks
background_output auto-enabled full_session when the task was still running, returning the entire session transcript on every poll. When the parent agent had no other work and polled in a tight loop, this caused massive token waste because each response dumped thousands of tokens into the conversation history. Default full_session to false so running-task checks return a compact status table (~200 tokens). Callers can still pass full_session=true explicitly when they need the full transcript.
This commit is contained in:
@@ -78,7 +78,7 @@ export function createBackgroundOutput(manager: BackgroundOutputManager, client:
|
||||
}
|
||||
|
||||
const isActive = task.status === "pending" || task.status === "running"
|
||||
const fullSession = args.full_session ?? isActive
|
||||
const fullSession = args.full_session ?? false
|
||||
const includeThinking = isActive || (args.include_thinking ?? false)
|
||||
const includeToolResults = isActive || (args.include_tool_results ?? false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user