Skip to content

Configuration Reference

.corydora.json is the project-level config file Corydora reads every time you run it. Most teams only need to change a few sections:

  • git to control where changes land
  • runtime to choose providers, models, and stage-specific routes
  • modes to set a default focus and tailor mode-specific agent pools
  • execution to tune retry behavior and parallelism

You can edit the file directly and validate it with corydora config validate.

The published schema is available in the npm package at schemas/corydora.schema.json and in the repository on GitHub.

A practical way to read this file

Think of the config in layers:

  1. Choose where Corydora should make changes with git.
  2. Choose which provider and model should do the work with runtime.
  3. Choose which kind of work you want by default with modes.
  4. Limit how aggressive the run should be with execution.

version

PropertyTypeRequiredDescription
versionintegerYesSchema version. Must be 1.

git

Controls how Corydora isolates generated changes from your current work.

PropertyTypeDefaultDescription
isolationMode"worktree" | "branch" | "current-branch""worktree"How changes are isolated from your working tree
branchPrefixstring"corydora"Prefix for generated branch and worktree names
trackMarkdownQueuesbooleanfalseCommit markdown queue files to the generated branch
worktreeRootstringCustom root directory for worktrees

Isolation modes

worktree is the safest starting point. Corydora tries to keep generated changes out of your main checkout.

branch keeps work in the current checkout but still isolates it on a generated branch.

current-branch edits your active branch directly. Use it only when that is exactly what you want.

If you configure worktree, Corydora may still use branch for a specific run when the chosen fix route or validation step needs reliable access to the repository's existing dependencies. The CLI and corydora status both report the effective isolation mode that was actually used.


runtime

Controls the default provider, model, and request limits.

PropertyTypeDefaultDescription
providerRuntimeProviderIdThe AI runtime to use
modelstringProvider-specificModel identifier passed to the provider
fallbackProviderRuntimeProviderIdSecondary provider to use if the primary fails
maxOutputTokensinteger (min 1)8192Upper bound for generated output tokens per provider call
requestTimeoutMsinteger (min 1)900000Per-request timeout in milliseconds
maxRetriesinteger (min 0)3Retry budget for retryable request failures

Provider IDs

Provider IDTypeRequires
claude-cliCLIclaude binary, authenticated Claude Code installation
codex-cliCLIcodex binary and local Codex auth/config
gemini-cliCLIgemini binary and CLI auth or Google credentials
anthropic-apiAPIANTHROPIC_API_KEY
openai-apiAPIOPENAI_API_KEY
google-apiAPIGOOGLE_API_KEY or GEMINI_API_KEY
bedrockAPIAWS_REGION and standard AWS credentials
ollamaLocalOllama running locally with OLLAMA_HOST reachable

See Providers for setup details.

runtime.stages

You can override the default runtime per stage:

StageWhat it controls
analyzeFile analysis and task discovery
fixApplying the selected fix
summaryReserved for summary-stage routing compatibility

Each stage accepts the same keys:

  • provider
  • model
  • fallbackProvider
  • maxOutputTokens
  • requestTimeoutMs
  • maxRetries

This is useful when you want a less expensive model for analysis and a stronger model for fixes.

Example:

json
{
  "runtime": {
    "provider": "claude-cli",
    "model": "sonnet",
    "fallbackProvider": "openai-api",
    "maxOutputTokens": 8192,
    "requestTimeoutMs": 900000,
    "maxRetries": 3,
    "stages": {
      "analyze": {
        "provider": "openai-api",
        "model": "gpt-5-mini",
        "maxOutputTokens": 4096,
        "requestTimeoutMs": 300000
      },
      "fix": {
        "provider": "claude-cli",
        "model": "sonnet"
      },
      "summary": {}
    }
  }
}

Default models

When corydora init creates a config, it fills in a provider-specific default model:

ProviderDefault model
claude-clisonnet
codex-cligpt-5-codex
gemini-cligemini-2.5-pro
anthropic-apiclaude-sonnet-4-5
openai-apigpt-5
google-apigemini-2.5-pro
bedrockanthropic.claude-3-7-sonnet-20250219-v1:0
ollamaqwen2.5-coder:7b

modes

Modes change what Corydora prioritizes. The mode you choose affects file ranking, agent selection, validation behavior, and how the run spends its effort.

PropertyTypeDefaultDescription
defaultCorydoraMode"auto"Mode used when you run corydora run without --mode
profilesobjectMode-specific defaultsAgent and category preferences for each mode

Available modes

ModeUse it when you want Corydora to
automake balanced maintenance decisions on its own
churnstart with recently changed, frequently touched, larger files
cleanmake low-risk cleanup and consistency improvements
refactorsimplify awkward or high-friction files
performancefocus on runtime hotspots and repeated work
lintingprefer lint-driven tasks first
documentationimprove README, schema, CLI help, and other public-facing docs

Mode profiles

Each mode profile can define:

PropertyTypeDescription
agentIdsstring[]Default agents for that mode
categoryBiasTaskCategory[]Categories Corydora should emphasize for that mode

Example:

json
{
  "modes": {
    "default": "churn",
    "profiles": {
      "auto": {},
      "churn": {
        "agentIds": ["refactoring-engineer", "bug-investigator"],
        "categoryBias": ["bugs", "todo", "tests"]
      },
      "clean": {},
      "refactor": {},
      "performance": {},
      "linting": {},
      "documentation": {}
    }
  }
}

corydora run --mode <mode> overrides modes.default for one run.


agents

Controls which agents Corydora can use by default.

PropertyTypeDefaultDescription
enabledCategoriesTaskCategory[]All 5 categoriesWhich task categories to scan for
selectedBuiltinAgentsstring[]Project-dependentDefault builtin agent IDs to use when a mode profile does not override them
importedAgentDirectorystringPath to a directory of imported agent markdown files

Builtin agent IDs

IDLabelCategoriesTech lenses
bug-investigatorBug Investigatorbugstypescript, refactoring
performance-engineerPerformance Engineerperformancetypescript, react, nextjs, electron
test-hardenerTest Hardenerteststypescript, react, nextjs, node-cli
todo-triagerTodo Triagertodotypescript, refactoring
feature-scoutFeature Scoutfeaturesreact, nextjs, node-cli, electron
security-auditorSecurity Auditorbugssecurity, typescript, react, nextjs, node-cli
database-reviewerDatabase Reviewerbugs, performancedatabase, typescript, node-cli
refactoring-engineerRefactoring Engineertodo, performance, testsrefactoring, typescript

corydora init pre-selects builtin agents that match the detected project. Those selections are not just hints: Corydora uses them at runtime unless a mode profile or --agent overrides them.


scan

Controls which files Corydora is allowed to inspect and how analysis batches are built.

PropertyTypeDefaultDescription
batchSizeinteger (min 1)6Number of files dispatched in a single scan batch
maxConcurrentScansinteger (min 1)3Upper bound for concurrent scan operations
allowBroadRiskbooleanfalseInclude broader-scope findings in automated fixing
includeExtensionsstring[]See belowFile extensions to include in discovery
excludeDirectoriesstring[]See belowDirectory names to skip during discovery

allowBroadRisk

By default, Corydora only auto-applies tasks that stay within a smaller blast radius. Set allowBroadRisk: true only if you want it to pick up broader changes too.

Default includeExtensions

.ts, .tsx, .js, .jsx, .mts, .cts, .mjs, .cjs, .json

Default excludeDirectories

.git, .next, .corydora, .turbo, build, coverage, dist, docs, documentation, generated, logs, node_modules, out, public, storybook-static, tmp

If you want documentation mode to work inside docs/, remove docs and any other documentation directories you want scanned from excludeDirectories.


execution

Controls run limits, retries, validation, and parallelism.

PropertyTypeDefaultDescription
backgroundByDefaultbooleanfalseAutomatically launch runs in tmux without needing --background
preventIdleSleepbooleantrueOn macOS, wrap background runs with caffeinate -i when available
maxFixesPerRuninteger (min 1)20Maximum number of fixes applied before the run stops
maxRuntimeMinutesinteger (min 1)480Maximum wall-clock duration before the run stops
backlogTargetinteger (min 1)8Target number of pending tasks to maintain before scanning more files
validateAfterFixbooleantrueRun a local validation command after each fix when one is available
maxAnalyzeWorkersinteger (min 1)2Maximum number of analysis workers Corydora will try to run at once
maxFixWorkersinteger (min 1)1Maximum number of fix workers Corydora will try to run at once
maxAttemptsinteger (min 1)3Retry budget before a task or file is deferred
leaseTtlMinutesinteger (min 1)15How long a leased file or task can stay in progress before it is reclaimed

Validation by mode

When validateAfterFix is enabled, Corydora chooses the validation command based on the run mode:

ModeValidation behavior
lintingRuns lint if available
documentationRuns docs:check, docs:build, or docs:lint if available
All other modesRuns typecheck if available, otherwise test

Concurrency guidance

  • Corydora uses the lower of execution.maxAnalyzeWorkers and scan.maxConcurrentScans for analysis.
  • Corydora may reduce analysis concurrency automatically when the fix backlog is already full or recent failures suggest it should slow down.
  • Keep maxFixWorkers at 1 unless you have a clean, well-behaved repository and want to experiment with more parallel fixes.

todo

Controls markdown task-file behavior.

PropertyTypeDefaultDescription
trackMarkdownFilesbooleanfalseCompatibility setting for markdown task-file workflows
renderCompletedTasksbooleantrueInclude completed tasks when rendering the markdown queue

paths

Overrides the locations of Corydora's internal directories and files. Most projects should keep the defaults.

PropertyTypeDefaultDescription
corydoraDirstring.corydoraRoot working directory for Corydora data
stateDirstring.corydora/stateTask store and run state files
logsDirstring.corydora/logsLog files for each run
runsDirstring.corydora/runsHistorical run records
agentsDirstring.corydora/agentsImported agent metadata
envFilestring.corydora/.env.localLocal environment secrets loaded before provider calls

Store provider API keys in .corydora/.env.local, not in .corydora.json. Corydora can suggest or append the recommended .gitignore entries during init, but it does not silently rewrite your .gitignore.


Example configuration

This example keeps the default experience simple while showing the new mode and routing controls:

json
{
  "version": 1,
  "git": {
    "isolationMode": "worktree",
    "branchPrefix": "corydora",
    "trackMarkdownQueues": false
  },
  "runtime": {
    "provider": "claude-cli",
    "model": "sonnet",
    "fallbackProvider": "openai-api",
    "maxOutputTokens": 8192,
    "requestTimeoutMs": 900000,
    "maxRetries": 3,
    "stages": {
      "analyze": {
        "provider": "openai-api",
        "model": "gpt-5-mini",
        "maxOutputTokens": 4096,
        "requestTimeoutMs": 300000
      },
      "fix": {},
      "summary": {}
    }
  },
  "modes": {
    "default": "churn",
    "profiles": {
      "auto": {},
      "churn": {
        "agentIds": ["bug-investigator", "refactoring-engineer"],
        "categoryBias": ["bugs", "todo", "tests"]
      },
      "clean": {},
      "refactor": {},
      "performance": {},
      "linting": {},
      "documentation": {}
    }
  },
  "agents": {
    "enabledCategories": ["bugs", "performance", "tests", "todo", "features"],
    "selectedBuiltinAgents": [
      "bug-investigator",
      "performance-engineer",
      "test-hardener",
      "todo-triager",
      "refactoring-engineer"
    ]
  },
  "scan": {
    "batchSize": 6,
    "maxConcurrentScans": 3,
    "allowBroadRisk": false,
    "includeExtensions": [".ts", ".tsx", ".js", ".jsx", ".mts", ".cts", ".mjs", ".cjs", ".json"],
    "excludeDirectories": [
      ".git",
      ".next",
      ".corydora",
      ".turbo",
      "build",
      "coverage",
      "dist",
      "docs",
      "documentation",
      "generated",
      "logs",
      "node_modules",
      "out",
      "public",
      "storybook-static",
      "tmp"
    ]
  },
  "execution": {
    "backgroundByDefault": true,
    "preventIdleSleep": true,
    "maxFixesPerRun": 20,
    "maxRuntimeMinutes": 480,
    "backlogTarget": 8,
    "validateAfterFix": true,
    "maxAnalyzeWorkers": 2,
    "maxFixWorkers": 1,
    "maxAttempts": 3,
    "leaseTtlMinutes": 15
  },
  "todo": {
    "trackMarkdownFiles": false,
    "renderCompletedTasks": true
  },
  "paths": {
    "corydoraDir": ".corydora",
    "stateDir": ".corydora/state",
    "logsDir": ".corydora/logs",
    "runsDir": ".corydora/runs",
    "agentsDir": ".corydora/agents",
    "envFile": ".corydora/.env.local"
  }
}

Released under the MIT License.