Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@atxtechbro
Copy link
Owner

Summary

  • Prevent Claude Code from modifying .claude/settings.json on startup
  • Maximize all output limits and timeouts for Pro Max plan
  • No more ghost diffs every time Claude starts

Details

Claude Code adds default fields when they're missing, causing unnecessary git noise. This PR includes all fields Claude expects, preventing modifications.

Since we're on the Pro Max plan, all limits have been increased 4x:

  • Output tokens: 8k → 32k and 25k → 100k
  • Timeouts extended to 5-20 minutes
  • Output lengths quadrupled

Testing

  1. Start Claude Code - no modifications to settings.json
  2. Verify increased limits work with longer operations

Closes #1001

- Add env vars that Claude Code adds on startup
- Include includeCoAuthoredBy field to prevent modifications
- Maximize all limits for Pro Max plan:
  - CLAUDE_CODE_MAX_OUTPUT_TOKENS: 8192 -> 32768 (4x)
  - MAX_MCP_OUTPUT_TOKENS: 25000 -> 100000 (4x)
  - BASH_DEFAULT_TIMEOUT_MS: 2min -> 5min
  - BASH_MAX_TIMEOUT_MS: 10min -> 20min
  - BASH_MAX_OUTPUT_LENGTH: 50k -> 200k
  - MCP timeouts doubled

Principle: subtraction-creates-value
@amazon-q-developer
Copy link
Contributor

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@amazon-q-developer
Copy link
Contributor

✅ I finished the code review, and didn't find any security or code quality issues.

- Revert bash timeouts to standard (not token-related)
- Add model: opus field to prevent modifications
- Keep token/output limits maximized for Pro Max
- includeCoAuthoredBy already included
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.

fix: instantiate all Claude Code settings fields to prevent ghost diffs

2 participants