diff --git a/codex-cli/src/utils/agent/agent-loop.ts b/codex-cli/src/utils/agent/agent-loop.ts index bd6adcd09f..970d594b5b 100644 --- a/codex-cli/src/utils/agent/agent-loop.ts +++ b/codex-cli/src/utils/agent/agent-loop.ts @@ -639,17 +639,13 @@ export class AgentLoop { type: "object", properties: { command: { type: "array", items: { type: "string" } }, - workdir: { - type: "string", - description: "The working directory for the command.", - }, timeout: { type: "number", description: "The maximum time to wait for the command to complete in milliseconds.", }, }, - required: ["command", "workdir", "timeout"], + required: ["command", "timeout"], additionalProperties: false, }, }, @@ -975,17 +971,13 @@ export class AgentLoop { type: "array", items: { type: "string" }, }, - workdir: { - type: "string", - description: "The working directory for the command.", - }, timeout: { type: "number", description: "The maximum time to wait for the command to complete in milliseconds.", }, }, - required: ["command"], + required: ["command", "timeout"], additionalProperties: false, }, }, diff --git a/codex-cli/src/utils/agent/handle-exec-command.ts b/codex-cli/src/utils/agent/handle-exec-command.ts index aea2c3a707..7927850a4b 100644 --- a/codex-cli/src/utils/agent/handle-exec-command.ts +++ b/codex-cli/src/utils/agent/handle-exec-command.ts @@ -219,7 +219,7 @@ async function execCommand( try { await access(workdir); } catch (e) { - log(`EXEC workdir=${workdir} not found, use process.cwd() instead`); + log(`EXEC workdir=${workdir} not found, using process.cwd() instead`); workdir = process.cwd(); } } diff --git a/codex-cli/src/utils/parsers.ts b/codex-cli/src/utils/parsers.ts index 4461379c02..ecd2b2e99b 100644 --- a/codex-cli/src/utils/parsers.ts +++ b/codex-cli/src/utils/parsers.ts @@ -90,7 +90,7 @@ export function parseToolCallArguments( const { timeout, workdir } = json; return { cmd: commandArray, - workdir: typeof workdir === "string" ? workdir : undefined, + workdir: undefined, timeoutInMillis: typeof timeout === "number" ? timeout : undefined, }; }