Store settings on the thread instead of turn (#4579)

It's much more common to keep the same settings for the entire
conversation, we can add per-turn overrides later.
This commit is contained in:
pakrym-oai
2025-10-01 17:31:13 -07:00
committed by GitHub
parent e899ae7d8a
commit c07fb71186
8 changed files with 56 additions and 32 deletions

View File

@@ -51,3 +51,21 @@ const result = await thread.run("Implement the fix");
console.log(result);
```
### Working directory
By default, Codex will run in the current working directory. You can change the working directory by passing the `workingDirectory` option to the when creating a thread.
```typescript
const thread = codex.startThread({
workingDirectory: "/path/to/working/directory",
});
```
To avoid unrecoverable errors, Codex requires the working directory to be a git repository. You can skip the git repository check by passing the `skipGitRepoCheck` option to the when creating a thread.
```typescript
const thread = codex.startThread({
skipGitRepoCheck: true,
});
```