.taskgraph/config.json. Create or change it with taskgraph models, and avoid editing it by hand.
Shared and per-machine settings
.taskgraph/config.json is shared: commit it so everyone on the project uses the same models and defaults. Settings that only make sense on one machine go in .taskgraph/config.local.json, which taskgraph init adds to .gitignore.
- TaskGraph reads
config.local.jsonoverconfig.json: any key in the local file wins, and objects merge key by key. A missing local file is fine. - If
config.local.jsonisn’t valid JSON, TaskGraph warns, usesconfig.jsonalone, and leaves the file for you to fix. claudeCode.pathToClaudeCodeExecutableis always per-machine. TaskGraph saves it toconfig.local.json, and moves it there fromconfig.jsonthe next time it saves settings ortaskgraph initruns.- To use a different model on your machine only, put it in
config.local.json, for example{ "models": { "main": { "modelId": "opus" } } }. From then on,taskgraph models --set-mainand--setupsave the main model there and leave the shared one alone.
.taskgraph/state.json holds your current tag and is gitignored too, so taskgraph tags use never changes a committed file.
Models
Three roles, each set to one ofopus, sonnet or haiku:
Example config.json
config.json uses the current default, so it follows a new default after an upgrade.
Projects from before defaultNumTasks became 0 may have "defaultNumTasks": 10 saved next to "enableProxy": false. That 10 was the old default, saved automatically, so TaskGraph removes both lines the next time it reads the file. To keep asking for about 10 tasks, set defaultNumTasks to 10 again or pass --num-tasks 10.
Definition of Done
global.definitionOfDone lists checks every task must clear before set-status done accepts it, on top of the task’s own acceptance criteria:
taskgraph show <id> numbers these after the task’s own criteria. Check them per task with taskgraph set-status <id> --check <n>, or pass --force to skip the gate. Subtasks are not gated by the Definition of Done.
Archiving finished tasks
global.archiveAfterDays (default 30) is how long a done or cancelled task stays in tasks.json before taskgraph archive moves it to .taskgraph/tasks/archive.json. --older-than <days> overrides it for one run.
Environment variables
Model IDs,
maxTokens, temperature, defaultSubtasks, defaultPriority and projectName belong in config.json, not in environment variables.
Upgrading? Variables named
TASK_MASTER_* and TASKMASTER_* were renamed to TASKGRAPH_* in 0.47, and the old names are ignored. See the upgrade guide.Troubleshooting
If taskgraph init doesn’t respond
Run the CLI through npx instead:
Configuration errors
If TaskGraph cannot find its config file, runtaskgraph models --setup in your project root to create or repair it.
For tag, timeout and MCP details, see the Advanced Configuration Guide.
