Skip to content

Add global task configuration defaults#36

Open
jsmestad wants to merge 1 commit into
tintinweb:masterfrom
jsmestad:feat/global-task-config
Open

Add global task configuration defaults#36
jsmestad wants to merge 1 commit into
tintinweb:masterfrom
jsmestad:feat/global-task-config

Conversation

@jsmestad

Copy link
Copy Markdown

TL;DR

Add agent-wide task configuration defaults so settings such as auto-cascade can apply across projects without repeating the same project file. Project configuration remains the higher-precedence override.

Context

Some task settings are user preferences rather than project decisions. Requiring the same .pi/tasks-config.json entry in every project makes those preferences repetitive to maintain.

The auto-cascade control was also labeled “Auto-execute with agents” in /tasks → Settings, while the documentation calls the feature “auto-cascade,” which made the existing control harder to find.

Changes

  • Load global defaults from <agent-dir>/tasks-config.json, using pi's getAgentDir() so custom agent directories continue to work.
  • Merge <cwd>/.pi/tasks-config.json over global defaults key by key.
  • Persist only values that differ from global defaults when the settings menu writes project configuration.
  • Rename the settings control to “Auto-cascade agent tasks” to match the documented terminology.
  • Document the global configuration path and an autoCascade example.
  • Add focused tests for precedence, malformed files, persistence, and save/reload behavior.

Compatibility

When no global config exists, loading and saving behave as before. Existing project configuration remains authoritative for every key it defines, including explicit false values.

Verification

  • biome check src/ test/
  • tsc --noEmit
  • vitest run (178 tests)
  • tsc
  • git diff --check

@jsmestad
jsmestad marked this pull request as ready for review July 13, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant