Settings
The keys of settings.jsonc, where CodeWork looks for it, and how user and project settings combine.
You configure CodeWork with settings.jsonc files. Comments and trailing commas are allowed. When there’s no .jsonc file, CodeWork reads a plain settings.json.
Where settings live
| Layer | File | Use it for |
|---|---|---|
| User | ~/.codework/settings.jsonc | Your defaults in every project |
| Project | .codework/settings.jsonc | What the whole team should get. Commit this file. |
The project is the first folder with a .codework folder inside, even an empty one, starting from the session’s folder on your machine and moving up. CodeWork reads only that folder’s settings file and doesn’t search further up. ~/.codework never counts as a project. A session with no folder on your machine reads only the user layer.
The project layer is applied over the user layer. For model and retry fields, the project wins. The plugins and models lists from both layers are combined, user first.
CodeWork reads settings again before each model call, so a change applies without a restart. If a file exists but CodeWork can’t use it, CodeWork doesn’t skip it. It stops with an error that names the file and the key it didn’t accept.
--home moves the user layer along with the rest of the CodeWork home. --user-config-dir <dir> replaces just the user settings.jsonc and mcp.json with the ones in <dir>.
Example
{
// Default model for every session in this project
"model": {
"provider": "openrouter",
"id": "deepseek/deepseek-v4.1-flash",
"thinkingLevel": "medium",
},
// Turn on the opt-in search tools and add a team plugin
"plugins": [
{ "plugin": "codework.tool.grep", "enabled": true },
{ "plugin": "codework.tool.find", "enabled": true },
"@acme/codework-tool-proc@1.2.0",
],
// Retry rate limits and outages a little longer than the default
"retry": { "maxRetries": 5 },
}Top-level keys
| Key | Type | Description |
|---|---|---|
model | object | The default model and how to call it. See model. |
models | array | Extra catalog entries. See Custom models. |
plugins | array | Plugins to load and configure. See Configure plugins. |
retry | object | Retries for failed model requests. See retry. |
MCP servers have their own file, mcp.json.
model
| Key | Default | Description |
|---|---|---|
provider | openai | Provider ID from the catalog |
id | gpt-5.6-luna | Model ID |
thinkingLevel | medium | off, minimal, low, medium, high, xhigh, or max |
toolExecution | sequential | parallel runs the tool calls from one model response at the same time |
thinkingBudgets | Thinking tokens per level, for models that take a token budget | |
options | Request options, below | |
providerOptions | Options for one provider or model, below |
Without any settings, CodeWork uses OpenAI’s gpt-5.6-luna with medium thinking. Each model supports only some of the thinking levels. See Thinking levels.
--provider, --model, and --thinking on codework run, and the pickers in your editor, override these for one session.
model.options
| Key | Default | Description |
|---|---|---|
temperature | Sampling temperature, for models that accept it | |
maxTokens | Cap on output tokens per response | |
timeoutMs | 3600000 | Longest a single request may take |
idleTimeoutMs | 300000 | Abort a response stream that sends nothing for this long, and retry it |
maxRetries | 0 | Retries inside the provider’s SDK. Leave at 0 and use retry instead. |
cacheRetention | Prompt caching: none, short, or long, on providers that support it | |
headers | Extra HTTP headers sent with each request | |
baseURL | Send requests to a different endpoint, such as a proxy | |
apiKey | The environment variable holding the key, written "${NAME}". Never a literal key. | |
contextWindow | Correct the catalog’s context window for this model | |
protocol | Correct the wire protocol the catalog lists, such as openai-compatible |
Any other key is passed to the provider as a provider-specific request option.
model.providerOptions
Options for one provider. Key them by provider ID, then by model: * for every model, a pattern with *, or an exact model ID. Each one takes the keys of model.options, plus thinkingLevel and toolExecution.
{
"model": {
"providerOptions": {
"openrouter": {
"*": { "cacheRetention": "long" },
"deepseek/*": { "temperature": 0.6 },
"deepseek/deepseek-v4.1-flash": { "thinkingLevel": "high" },
},
},
},
}They apply over model.options in that order: *, then patterns, then the exact ID, so the most specific one wins.
retry
When a request fails with a rate limit, an overload, a server error, a timeout, or a dropped connection, CodeWork waits and tries it again. Quota and billing errors are never retried.
| Key | Default | Description |
|---|---|---|
maxRetries | 3 | Attempts after the first. 0 turns retries off. |
baseDelayMs | 2000 | Wait before the first retry; doubles after each one |
maxDelayMs | 60000 | Longest wait. A server asking for longer fails the turn. |