Preserve Codex cwd on turns

This commit is contained in:
Codex
2026-05-21 10:06:36 +00:00
parent 0480eeb424
commit 19eddcab3e
2 changed files with 6 additions and 4 deletions

View File

@@ -270,9 +270,11 @@ func (c *Client) StartTurn(ctx context.Context, threadID, cwd, model, reasoningE
params := map[string]any{
"threadId": threadID,
"input": input,
"cwd": cwd,
"approvalPolicy": "on-request",
"sandboxPolicy": SandboxPolicy(sandbox, cwd),
}
if strings.TrimSpace(cwd) != "" {
params["cwd"] = cwd
params["sandboxPolicy"] = SandboxPolicy(sandbox, cwd)
}
if model != "" {
params["model"] = model