fix(delegate-task): align metadata with opencode core task tool
Match opencode core 'task' tool behavior for metadata consistency: 1. Model fallback: When categoryModel/task.model/resumeModel is undefined, fall back to parentContext.model so subagent metadata always includes model info. Thread parentContext into executeSyncContinuation for parity. 2. Task ID consistency: unstable-agent-task was missing taskId and backgroundTaskId in metadata. background_output used inconsistent snake_case 'task_id' vs camelCase 'taskId' elsewhere. Standardize on camelCase: taskId = sessionID (resume id), backgroundTaskId = bg task id. Update text output blocks to use buildTaskMetadataBlock helper. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -162,7 +162,7 @@ export function createDelegateTask(options: DelegateTaskToolOptions): ToolDefini
|
||||
if (runInBackground) {
|
||||
return executeBackgroundContinuation(args, ctx, options, parentContext)
|
||||
}
|
||||
return executeSyncContinuation(args, ctx, options)
|
||||
return executeSyncContinuation(args, ctx, options, parentContext)
|
||||
}
|
||||
|
||||
if (!args.category && !args.subagent_type) {
|
||||
|
||||
Reference in New Issue
Block a user