Merge remote-tracking branch 'giteahttps/codex/worktree-target-path'

This commit is contained in:
2026-02-23 21:01:46 -05:00
14 changed files with 434 additions and 7 deletions

View File

@@ -72,6 +72,8 @@ const CLAUDE_OUTPUT_FORMAT = {
schema: ACTOR_RESPONSE_SCHEMA,
} as const;
const CLAUDE_PROVIDER_MAX_TURNS = 2;
function toErrorMessage(error: unknown): string {
if (error instanceof Error) {
return error.message;
@@ -433,7 +435,7 @@ function buildClaudeOptions(input: {
};
return {
maxTurns: 1,
maxTurns: CLAUDE_PROVIDER_MAX_TURNS,
...(runtime.config.provider.claudeModel
? { model: runtime.config.provider.claudeModel }
: {}),

View File

@@ -3,7 +3,11 @@ import { mkdir, readFile, writeFile } from "node:fs/promises";
import { resolve } from "node:path";
import { SchemaDrivenExecutionEngine } from "../agents/orchestration.js";
import { parseAgentManifest, type AgentManifest } from "../agents/manifest.js";
import type { ActorExecutionResult, ActorExecutor } from "../agents/pipeline.js";
import type {
ActorExecutionResult,
ActorExecutor,
PipelineAggregateStatus,
} from "../agents/pipeline.js";
import { loadConfig, type AppConfig } from "../config.js";
import { parseEnvFile } from "./env-store.js";
import {
@@ -43,6 +47,10 @@ export type RunRecord = {
error?: string;
};
function toRunStatus(status: PipelineAggregateStatus): Extract<RunStatus, "success" | "failure"> {
return status === "success" ? "success" : "failure";
}
type ActiveRun = {
controller: AbortController;
record: RunRecord;
@@ -385,7 +393,7 @@ export class UiRunService {
run: record,
});
await engine.runSession({
const summary = await engine.runSession({
sessionId,
initialPayload: {
prompt: input.prompt,
@@ -405,7 +413,7 @@ export class UiRunService {
const next: RunRecord = {
...completedRecord,
status: "success",
status: toRunStatus(summary.status),
endedAt: new Date().toISOString(),
};
this.runHistory.set(runId, next);