Authentication
TaskGraph uses whatever sign-in Claude Code already has.- Install Claude Code and run
claudeonce to sign in. - That is all.
taskgraphcommands and the MCP server now work.
When neither is set, TaskGraph withholds
ANTHROPIC_API_KEY from Claude Code so that Claude Code uses its own sign-in. See Authentication.
Models
Each of the three roles (main, research, fallback) uses opus, sonnet or haiku:
.taskgraph/config.json:
What AI calls can access
Each AI call is confined by its role. Your project’s own Claude setup, a prompt in a task or PRD, and TaskGraph’s own config cannot widen what a call can do.
In practice:
-
Your Claude Code setup stays out. Hooks,
CLAUDE.md, permission rules and MCP servers from your user, project and local Claude settings are not loaded, so they don’t run inside TaskGraph’s calls. -
File reads stay in the project. For
mainandfallback, aPreToolUsehook refuses anyRead,GreporGlobwhose path resolves outside the project root. Symlinks are resolved first, so a link in the repo that points elsewhere is refused, as are..segments,~paths, absolute paths and glob patterns that climb out. -
Secret files stay closed. The same hook refuses a
Read,GreporGlobthat names one of these (any letter case):- env files:
.env,.env.*,.env-*,.env_*,.envrc..env.example,.env.sampleand.env.template(or with-/_) can still be read. - keys and certificates:
*.pem,*.key,*.p12,*.pfx,*.keystore,*.jks, PuTTY’s*.ppk, andid_rsa,id_dsa,id_ecdsa,id_ed25519and their.pubfiles. - credential stores:
.git,.git-credentialsand.config/git/credentials,.npmrc,.netrc,_netrc,.pypirc,.pgpassand its Windows namepgpass.conf, the whole.awsand.kubedirectories, kubeconfigs kept elsewhere (kubeconfig,*.kubeconfig), and.docker/config.json.
Grepover a whole directory is rewritten to skip those files, so a search forAPI_KEYacross the project can’t return lines from.env. Itspathis rewritten to the resolved absolute path, so.docker//,src/../.dockeror a symlink to.dockerskips.docker/config.jsonjust as.dockerdoes. A search path that Windows or macOS would open as.docker,.configorgitunder another spelling (.docker., a trailing space, a Kelvin signKfork, a dotlessıfori) is refused. That search also skips.env.example. Other spellings that Windows or macOS open as one of these are refused too: an alternate data stream (.env::$DATA), a trailing dot or space (.env.,.env), any 8.3 short name such asENV~1, and non-ASCII letters a case-insensitive filesystem matches to ASCII (.awſ, with a long s, can open.aws). - env files:
-
Config can’t widen it. The settings below are applied first and these limits after, so config can’t add tools or MCP servers, load settings sources, add directories or replace the hook.
pathToClaudeCodeExecutableis only used when it’s an absolute path to a file namedclaudeoutside the project, so a repo’s config can’t point it at another program.
- Secret files are recognized by name only. A key saved as
config/prod.jsonor a token pasted into a source file can be read and sent to the model. - The path check runs just before each tool call. A symlink swapped by another process between the check and the read isn’t caught; nothing in the call itself can write.
- It’s a check on Claude Code’s file tools, not an OS sandbox. It relies on shell tools being denied.
- For
Grep, onlypathandglobare checked. Its regex only filters lines, andglobonly filters files under that path, so neither can reach outside it. - The project root is the one TaskGraph uses for the command:
--project-rootif you pass it, otherwise the project it finds from the current directory. If that’s a parent of several projects, all of them are readable. If no root is found,mainandfallbackget no file tools.
Structured outputs
Commands that generate structured data (parse-prd, add-task, expand, update, update-task, analyze-complexity) use Claude Code’s native structured output support. Responses are constrained to the expected schema, so there are no JSON parsing retries.
Advanced settings
Claude Code settings can be set globally in theclaudeCode section of .taskgraph/config.json, or per command in commandSpecific. Command-specific settings override global ones.
Tools, permission mode, MCP servers, settings sources, working directory, extra directories and hooks are set by the role and can’t be changed here. See What AI calls can access.
Notes
- Claude Code does not report usage costs, so cost shows as 0 in telemetry.
temperatureandmaxTokensare not supported by the Claude Code CLI and may be ignored.
Troubleshooting
”Claude Code CLI not available”
- Install it with
npm install -g @anthropic-ai/claude-codeand make sureclaudeis on yourPATH. - Verify it works by running
claude --help.
Authentication failures
- Run
claudeand sign in again. - In CI or containers, run
claude setup-tokenand pass the result asCLAUDE_CODE_OAUTH_TOKEN.
Unknown model
Use one ofopus, sonnet or haiku. Run taskgraph models to see the current configuration.
