fix(background-task): restore opt-in full session output

Bring background_output back to the legacy contract so callers only get full session transcripts when they explicitly ask for them.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-03-14 13:46:50 +09:00
parent fe4493c6a6
commit e87075b9a4
3 changed files with 13 additions and 15 deletions
@@ -53,7 +53,7 @@ export function createBackgroundOutput(manager: BackgroundOutputManager, client:
"Wait for completion (default: false). System notifies when done, so blocking is rarely needed."
),
timeout: tool.schema.number().optional().describe("Max wait time in ms (default: 60000, max: 600000)"),
full_session: tool.schema.boolean().optional().describe("Return full session messages with filters (default: true)"),
full_session: tool.schema.boolean().optional().describe("Return full session messages with filters (default: false)"),
include_thinking: tool.schema.boolean().optional().describe("Include thinking/reasoning parts in full_session output (default: false)"),
message_limit: tool.schema.number().optional().describe("Max messages to return (capped at 100)"),
since_message_id: tool.schema.string().optional().describe("Return messages after this message ID (exclusive)"),
@@ -122,10 +122,7 @@ export function createBackgroundOutput(manager: BackgroundOutputManager, client:
}
const isActive = isTaskActiveStatus(resolvedTask.status)
const fullSessionProvided = args.full_session !== undefined
const fullSession = fullSessionProvided
? (args.full_session ?? true)
: true
const fullSession = args.full_session ?? false
const includeThinking = isActive || (args.include_thinking ?? false)
const includeToolResults = isActive || (args.include_tool_results ?? false)