Claude settings json - #1262
Conversation
Entire-Checkpoint: cc8a7458bec2
Entire-Checkpoint: 3f3c4627100e
… execution Entire-Checkpoint: 1aa5a894682d
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds a new Claude workflow settings file and updates existing Claude config and .gitignore to register lifecycle/tool hooks, set Anthropic model env vars, and restrict read permissions to internal metadata. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Claude as "Claude (hooks)"
participant Tool as "Tool (git‑ai / dcg)"
participant FS as "Filesystem / VCS"
User->>Claude: Submit prompt / start session
Claude-->>User: Acknowledge (SessionStart/UserPromptSubmit hooks)
Claude->>Tool: PreToolUse hook (run checkpoint or pre-task command)
Tool->>FS: Check/commit or run dcg (command -v dcg ...)
Tool-->>Claude: Tool result
Claude->>Tool: PostToolUse hook (post-task / post-todo / checkpoint)
Claude-->>User: Finalize (SessionEnd/Stop hooks)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes a dedicated settings file for Claude AI configurations, centralizing the management of AI session hooks and default model selections. It refines the Git tracking behavior for Claude-related files and modifies existing Claude settings to optimize the execution of specific commands by making checkpoint operations asynchronous and standardizing tool command calls, enhancing overall AI integration and performance. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
Mesa DescriptionTL;DRAdded a dedicated Claude settings file ( What changed?
Description generated by Mesa. Update settings |
Entire-Checkpoint: 8089241e7f0e
There was a problem hiding this comment.
Code Review
The pull request introduces a new .claude/settings.json file, configuring various hooks and setting Anthropic model environment variables, and updates .gitignore to specifically include this new settings file while ignoring other .claude directory contents. Additionally, the existing config/claude/settings.json is modified to adjust async properties for certain hooks and to make the dcg command execution conditional on its availability. Review comments indicate that the ANTHROPIC_DEFAULT_HAIKU_MODEL in the new settings file is incorrectly assigned a Sonnet model, which could have unintended performance and cost implications, and that the new JSON file is missing a trailing newline character.
| ] | ||
| }, | ||
| "env": { | ||
| "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-6-1m", |
There was a problem hiding this comment.
The ANTHROPIC_DEFAULT_HAIKU_MODEL is set to a Sonnet model (claude-sonnet-4-6-1m). This is likely a configuration error. Haiku models are designed for speed and lower cost, so using a Sonnet model here negates those benefits and may have unintended performance and cost implications. Please update this to a valid Haiku model identifier.
| "Read(./.entire/metadata/**)" | ||
| ] | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
Pull request overview
Adds a project-level Claude Code configuration under .claude/settings.json and aligns/adjusts hook behavior in the existing config/claude/settings.json, while updating .gitignore so the new settings file is committed but other .claude/ artifacts remain ignored.
Changes:
- Add
.claude/settings.jsonwith hook commands, env overrides, and a permissions deny rule. - Update
config/claude/settings.jsonhook entries (makegit-ai checkpointasync; makedcginvocation conditional). - Refine
.gitignoreto ignore.claude/*while explicitly keeping.claude/settings.jsontracked.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| config/claude/settings.json | Tweaks hook execution behavior (async for checkpoint; safer dcg invocation). |
| .gitignore | Stops ignoring .claude entirely; ignores contents except the committed settings file. |
| .claude/settings.json | Introduces repo-local Claude Code settings with entire-based hooks and model env overrides. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "type": "command", | ||
| "command": "entire hooks claude-code session-start", | ||
| "timeout": 30, | ||
| "async": true | ||
| } |
There was a problem hiding this comment.
The hook command relies on the entire binary, but this repo doesn’t appear to install entire cross-platform (it’s only listed in the Darwin Homebrew bundle). As-is, contributors without entire will get failing hooks. Consider guarding the command (e.g., check command -v entire first) or routing through a repo-managed script that no-ops when unavailable.
| { | ||
| "type": "command", | ||
| "command": "entire hooks claude-code session-end", | ||
| "timeout": 30, | ||
| "async": true | ||
| } |
There was a problem hiding this comment.
The hook command relies on the entire binary, but this repo doesn’t appear to install entire cross-platform (it’s only listed in the Darwin Homebrew bundle). As-is, contributors without entire will get failing hooks. Consider guarding the command (e.g., check command -v entire first) or routing through a repo-managed script that no-ops when unavailable.
| { | ||
| "type": "command", | ||
| "command": "entire hooks claude-code user-prompt-submit", | ||
| "timeout": 30, | ||
| "async": true | ||
| } |
There was a problem hiding this comment.
The hook command relies on the entire binary, but this repo doesn’t appear to install entire cross-platform (it’s only listed in the Darwin Homebrew bundle). As-is, contributors without entire will get failing hooks. Consider guarding the command (e.g., check command -v entire first) or routing through a repo-managed script that no-ops when unavailable.
| { | ||
| "type": "command", | ||
| "command": "entire hooks claude-code stop", | ||
| "timeout": 30, | ||
| "async": true | ||
| } |
There was a problem hiding this comment.
The hook command relies on the entire binary, but this repo doesn’t appear to install entire cross-platform (it’s only listed in the Darwin Homebrew bundle). As-is, contributors without entire will get failing hooks. Consider guarding the command (e.g., check command -v entire first) or routing through a repo-managed script that no-ops when unavailable.
| { | ||
| "type": "command", | ||
| "command": "entire hooks claude-code pre-task", | ||
| "timeout": 30, | ||
| "async": true | ||
| } |
There was a problem hiding this comment.
The hook command relies on the entire binary, but this repo doesn’t appear to install entire cross-platform (it’s only listed in the Darwin Homebrew bundle). As-is, contributors without entire will get failing hooks. Consider guarding the command (e.g., check command -v entire first) or routing through a repo-managed script that no-ops when unavailable.
| { | ||
| "type": "command", | ||
| "command": "entire hooks claude-code post-task", | ||
| "timeout": 30, | ||
| "async": true | ||
| } |
There was a problem hiding this comment.
The hook command relies on the entire binary, but this repo doesn’t appear to install entire cross-platform (it’s only listed in the Darwin Homebrew bundle). As-is, contributors without entire will get failing hooks. Consider guarding the command (e.g., check command -v entire first) or routing through a repo-managed script that no-ops when unavailable.
| { | ||
| "type": "command", | ||
| "command": "entire hooks claude-code post-todo", | ||
| "timeout": 30, | ||
| "async": true | ||
| } |
There was a problem hiding this comment.
The hook command relies on the entire binary, but this repo doesn’t appear to install entire cross-platform (it’s only listed in the Darwin Homebrew bundle). As-is, contributors without entire will get failing hooks. Consider guarding the command (e.g., check command -v entire first) or routing through a repo-managed script that no-ops when unavailable.
| "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-6-1m", | ||
| "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6-1m" |
There was a problem hiding this comment.
The model IDs here don’t match the repo’s configured Anthropic model names (e.g., models.json and config/claude/settings.json use claude-sonnet-4-6 and claude-haiku-4-5-20251001). Unless claude-sonnet-4-6-1m is a confirmed valid model in your environment, this will likely break model selection. Also, setting ANTHROPIC_DEFAULT_HAIKU_MODEL to a Sonnet model looks accidental—consider using the configured Haiku model (or remove the Haiku override).
| "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-6-1m", | |
| "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6-1m" | |
| "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001", | |
| "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6" |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
config/claude/settings.json (1)
219-228:⚠️ Potential issue | 🟠 MajorDuplicate "Bash" matcher causes
dcgto execute twice per Bash tool use.There are two
"Bash"matchers inPreToolUse: one at lines 176-207 (containingdcgat line 186) and another at lines 219-228 (containingdcgat line 224). Both invoke the samecommand -v dcg >/dev/null 2>&1 && dcgcommand, meaning dcg will run twice for every Bash command.Remove the duplicate matcher or consolidate the hooks into a single "Bash" matcher.
🔧 Proposed fix: remove duplicate matcher
} - }, - { - "matcher": "Bash", - "hooks": [ - { - "type": "command", - "command": "command -v dcg >/dev/null 2>&1 && dcg", - "timeout": 5 - } - ] } ],🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@config/claude/settings.json` around lines 219 - 228, There are two identical "Bash" matchers that both run the same hook command "command -v dcg >/dev/null 2>&1 && dcg", causing dcg to execute twice; remove the duplicate entry or merge their "hooks" arrays so only one matcher named "Bash" remains (keep the single hook with the command/timestamp/timeout settings) — look for the duplicate matcher objects containing "matcher": "Bash" and the hook with "command": "command -v dcg >/dev/null 2>&1 && dcg" and delete or consolidate one of them.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/settings.json:
- Around line 93-96: The project-level env keys ANTHROPIC_DEFAULT_HAIKU_MODEL
and ANTHROPIC_DEFAULT_SONNET_MODEL are set to "claude-sonnet-4-6-1m" which
conflicts with the user-level config that uses "claude-sonnet-4-6"; either
change these two values to match the user config (claude-sonnet-4-6) or, if the
1m context is intentional for this repo, add a concise comment next to these env
entries explaining the deliberate override so maintainers know why the
project-level models differ.
---
Outside diff comments:
In `@config/claude/settings.json`:
- Around line 219-228: There are two identical "Bash" matchers that both run the
same hook command "command -v dcg >/dev/null 2>&1 && dcg", causing dcg to
execute twice; remove the duplicate entry or merge their "hooks" arrays so only
one matcher named "Bash" remains (keep the single hook with the
command/timestamp/timeout settings) — look for the duplicate matcher objects
containing "matcher": "Bash" and the hook with "command": "command -v dcg
>/dev/null 2>&1 && dcg" and delete or consolidate one of them.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e23c1a7a-5d5e-43a8-9c3f-fda996414eb3
📒 Files selected for processing (3)
.claude/settings.json.gitignoreconfig/claude/settings.json
| "env": { | ||
| "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-6-1m", | ||
| "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6-1m" | ||
| }, |
There was a problem hiding this comment.
Model version mismatch between project and user configs.
This project-scoped config sets models to claude-sonnet-4-6-1m, while the user-scoped config/claude/settings.json sets them to claude-sonnet-4-6. Project-scoped settings typically take precedence, so this repository will use different models than defined in the user config.
If this is intentional (e.g., 1m context for this specific project), consider adding a comment. Otherwise, align the model versions.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/settings.json around lines 93 - 96, The project-level env keys
ANTHROPIC_DEFAULT_HAIKU_MODEL and ANTHROPIC_DEFAULT_SONNET_MODEL are set to
"claude-sonnet-4-6-1m" which conflicts with the user-level config that uses
"claude-sonnet-4-6"; either change these two values to match the user config
(claude-sonnet-4-6) or, if the 1m context is intentional for this repo, add a
concise comment next to these env entries explaining the deliberate override so
maintainers know why the project-level models differ.
Summary by cubic
Add a dedicated Claude hooks config and make hook commands non-blocking and more robust. Standardizes session/task automation, ensures
.claude/settings.jsonis tracked, and fixes a missing trailing newline.New Features
.claude/settings.jsonwith session and task hooks that callentire hooks claude-code ...(async, 30s).ANTHROPIC_DEFAULT_HAIKU_MODELandANTHROPIC_DEFAULT_SONNET_MODEL../.entire/metadata/**; updated.gitignoreto ignore.claude/*but track.claude/settings.json.Refactors
git-ai checkpoint claude --hook-input stdinrun async to avoid blocking.dcgcalls withcommand -v dcg >/dev/null 2>&1 && dcg; removed unnecessary async on adcghook.Written for commit 54f68cd. Summary will update on new commits.