Skip to content

feat: per-project default Claude arguments#76

Merged
gi11es merged 10 commits intomasterfrom
feat/project-default-args
Apr 7, 2026
Merged

feat: per-project default Claude arguments#76
gi11es merged 10 commits intomasterfrom
feat/project-default-args

Conversation

@gi11es
Copy link
Copy Markdown
Owner

@gi11es gi11es commented Apr 7, 2026

Summary

  • Adds per-project default arguments for Claude Code sessions, implementing the three-tier hierarchy proposed in feat: per-session Claude Code argument customization #46 (comment): global defaults > project defaults > per-session customization
  • Each tier fully replaces the one below (no merging)
  • Right-click a project in the sidebar → "Default Claude Arguments…" to set project-level defaults
  • Renames "Extra arguments" to "Default Claude arguments" in Settings and adds help text noting project overrides

How it works

  • defaultArgs: String? on ProjectItem (runtime) and ProjectState (persistence) — nil means no override, falls back to global
  • Resolution chain: perSessionDialog ?? project.defaultArgs ?? globalDefaults
  • Per-session dialog pre-fills with project defaults when set, otherwise global defaults
  • Setting an empty value clears the project override
  • Persisted in state.json, backward-compatible (optional field decodes as nil)

Closes #46

Test plan

  • Set global default args in Settings (e.g. --model sonnet), verify new Claude tabs use them
  • Right-click project → "Default Claude Arguments…", set --verbose
  • Create new Claude tab — should use --verbose only (project replaces global)
  • Enable per-session prompt, create tab — dialog should pre-fill with --verbose
  • Clear project default (empty the field, Save) — next tab should fall back to global args
  • Restart Deckard — project defaults should persist

🤖 Generated with Claude Code

gi11es and others added 10 commits April 7, 2026 09:47
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…obal args help text

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Settings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gi11es gi11es merged commit 565af3a into master Apr 7, 2026
3 checks passed
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.

feat: per-session Claude Code argument customization

1 participant