settings.md +43 −1
66| `cleanupPeriodDays` | Sessions inactive for longer than this period are deleted at startup. Setting to `0` immediately deletes all sessions. (default: 30 days) | `20` |66| `cleanupPeriodDays` | Sessions inactive for longer than this period are deleted at startup. Setting to `0` immediately deletes all sessions. (default: 30 days) | `20` |
67| `companyAnnouncements` | Announcement to display to users at startup. If multiple announcements are provided, they will be cycled through at random. | `["Welcome to Acme Corp! Review our code guidelines at docs.acme.com"]` |67| `companyAnnouncements` | Announcement to display to users at startup. If multiple announcements are provided, they will be cycled through at random. | `["Welcome to Acme Corp! Review our code guidelines at docs.acme.com"]` |
68| `env` | Environment variables that will be applied to every session | `{"FOO": "bar"}` |68| `env` | Environment variables that will be applied to every session | `{"FOO": "bar"}` |
6969| `includeCoAuthoredBy` | Whether to include the `co-authored-by Claude` byline in git commits and pull requests (default: `true`) | `false` || `attribution` | Customize attribution for git commits and pull requests. See [Attribution settings](#attribution-settings) | `{"commit": "🤖 Generated with Claude Code", "pr": ""}` |
70| `includeCoAuthoredBy` | **Deprecated**: Use `attribution` instead. Whether to include the `co-authored-by Claude` byline in git commits and pull requests (default: `true`) | `false` |
70| `permissions` | See table below for structure of permissions. | |71| `permissions` | See table below for structure of permissions. | |
71| `hooks` | Configure custom commands to run before or after tool executions. See [hooks documentation](/en/hooks) | `{"PreToolUse": {"Bash": "echo 'Running command...'"}}` |72| `hooks` | Configure custom commands to run before or after tool executions. See [hooks documentation](/en/hooks) | `{"PreToolUse": {"Bash": "echo 'Running command...'"}}` |
72| `disableAllHooks` | Disable all [hooks](/en/hooks) | `true` |73| `disableAllHooks` | Disable all [hooks](/en/hooks) | `true` |
143* Use `Edit` deny rules to block writes to specific paths144* Use `Edit` deny rules to block writes to specific paths
144* Use `WebFetch` allow/deny rules to control which network domains Claude can access145* Use `WebFetch` allow/deny rules to control which network domains Claude can access
145 146
147### Attribution settings
148
149Claude Code adds attribution to git commits and pull requests. These are configured separately:
150
151* Commits use [git trailers](https://git-scm.com/docs/git-interpret-trailers) (like `Co-Authored-By`) by default, which can be customized or disabled
152* Pull request descriptions are plain text
153
154| Keys | Description |
155| :------- | :----------------------------------------------------------------------------------------- |
156| `commit` | Attribution for git commits, including any trailers. Empty string hides commit attribution |
157| `pr` | Attribution for pull request descriptions. Empty string hides pull request attribution |
158
159**Default commit attribution:**
160
161```
162🤖 Generated with [Claude Code](https://claude.com/claude-code)
163
164 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
165```
166
167**Default pull request attribution:**
168
169```
170🤖 Generated with [Claude Code](https://claude.com/claude-code)
171```
172
173**Example:**
174
175```json theme={null}
176{
177 "attribution": {
178 "commit": "Generated with AI\n\nCo-Authored-By: AI <ai@example.com>",
179 "pr": ""
180 }
181}
182```
183
184<Note>
185 The `attribution` setting takes precedence over the deprecated `includeCoAuthoredBy` setting. To hide all attribution, set `commit` and `pr` to empty strings.
186</Note>
187
146### Settings precedence188### Settings precedence
147 189
148Settings apply in order of precedence. From highest to lowest:190Settings apply in order of precedence. From highest to lowest: