diff --git a/packages/ai-autopilot/src/runner/docker.ts b/packages/ai-autopilot/src/runner/docker.ts index b43119a..6341c45 100644 --- a/packages/ai-autopilot/src/runner/docker.ts +++ b/packages/ai-autopilot/src/runner/docker.ts @@ -330,7 +330,7 @@ export class DockerRunner implements Runner { const publish = this.opts.preview ? ['-p', `127.0.0.1:0:${this.opts.previewPort}`] : [] const run = await docker(['run', '-d', '--name', name, '-w', WORKSPACE, ...publish, this.image, 'tail', '-f', '/dev/null']) if (run.exitCode !== 0) { - throw new RunnerError(`failed to boot container: ${(run.stderr.trim() || run.stdout.trim()) ?? ''}`) + throw new RunnerError(`failed to boot container: ${run.stderr.trim() || run.stdout.trim()}`) } try { const session = new DockerRunnerSession(id, name, opts, this.opts) diff --git a/packages/ai-autopilot/src/runner/webcontainer.ts b/packages/ai-autopilot/src/runner/webcontainer.ts index 6b4b3c1..c8eb552 100644 --- a/packages/ai-autopilot/src/runner/webcontainer.ts +++ b/packages/ai-autopilot/src/runner/webcontainer.ts @@ -213,7 +213,7 @@ export class WebContainerRunnerSession implements RunnerSession { timer = setTimeout(() => { timedOut = true proc.kill() - res(137) + res(124) // discarded; the timedOut branch below sets the real code }, timeoutMs) }) : undefined diff --git a/packages/framework/src/driver/claude-code.ts b/packages/framework/src/driver/claude-code.ts index 8bd624f..8222b9d 100644 --- a/packages/framework/src/driver/claude-code.ts +++ b/packages/framework/src/driver/claude-code.ts @@ -70,7 +70,6 @@ let sessionCounter = 0 export class ClaudeCodeSession implements DriverSession { readonly id: string readonly cwd: string - private lastSessionId?: string constructor( private readonly config: ClaudeCodeDriverOptions, @@ -102,9 +101,6 @@ export class ClaudeCodeSession implements DriverSession { spawn: this.config.spawn ?? (nodeSpawn as unknown as SpawnLike), emit, signals, - }).then(turn => { - if (turn.sessionId) this.lastSessionId = turn.sessionId - return turn }) } @@ -114,8 +110,7 @@ export class ClaudeCodeSession implements DriverSession { dispose(): Promise { // Each prompt spawns and reaps its own process, so there is nothing durable - // to tear down. The last session id is kept only for a UI link. - void this.lastSessionId + // to tear down. The session id reaches the UI via the emitted result event. return Promise.resolve() }