Integrate master agent runtime orchestration updates

This commit is contained in:
kris
2026-04-16 04:41:46 +08:00
parent e0c0ea1814
commit 39be49630f
81 changed files with 9283 additions and 448 deletions

View File

@@ -235,6 +235,10 @@ export async function prepareCodexTaskExecution(config, task, outputFile) {
export function buildCodexTaskExecution(config, task, outputFile) {
const { targetThreadRef, cwd } = resolveResumeTarget(config, task);
const prompt = String(task?.executionPrompt || "");
const taskExecutionModel = typeof task?.executionModel === "string" && task.executionModel.trim()
? task.executionModel.trim()
: null;
const effectiveModel = taskExecutionModel || config.masterAgentModel;
if (
targetThreadRef &&
@@ -247,8 +251,8 @@ export function buildCodexTaskExecution(config, task, outputFile) {
"-o",
outputFile,
];
if (config.masterAgentModel) {
args.push("-m", config.masterAgentModel);
if (effectiveModel) {
args.push("-m", effectiveModel);
}
args.push(targetThreadRef, prompt);
return {
@@ -269,8 +273,8 @@ export function buildCodexTaskExecution(config, task, outputFile) {
"-o",
outputFile,
];
if (config.masterAgentModel) {
args.push("-m", config.masterAgentModel);
if (effectiveModel) {
args.push("-m", effectiveModel);
}
args.push(prompt);
return {