INFR-AGENT: Claude Code Permission Optimization

Labels: enhancement, infr-agent, developer-experience, productivity

Problem Statement

Claude Code’s permission system causes significant productivity friction:

Community research reveals this is a known systemic issue with proven workarounds.

Root Causes (Per Research)

  1. Over-aggressive security model - Treats git commit and find as threats
  2. Permission persistence bugs - System forgets “don’t ask again” selections
  3. Command parsing issues - Pipes and operators trigger unexpected prompts

Solution Approach

Immediate Win: Shift+Tab Auto-Accept Mode

Configuration Optimization

Implement community-validated permission config in ~/.claude.json:

{
  "permissions": {
    "allow": [
      "Bash(mkdir:*)",
      "Bash(ls:*)",
      "Bash(git:*)",
      "Bash(npm:*)",
      "Bash(find:*)",
      "Bash(grep:*)",
      "Bash(echo:*)",
      "Bash(cat:*)",
      "Bash(python:*)",
      "Bash(pytest:*)",
      "Write(*)",
      "Read(*)",
      "Edit(*)"
    ],
    "deny": [
      "Bash(rm:*)",
      "Bash(curl:*)",
      "Bash(wget:*)",
      "Read(./.env*)",
      "Read(./secrets/**)",
      "Read(./config/token*)"
    ]
  }
}

Workaround Documentation

Update Code Agent prompts with:

Advanced Option: Container Isolation

For unrestricted development work:

Implementation Steps

Success Criteria

Risk Mitigation

Security Considerations:

Estimated Effort

2 hours initial setup, ongoing refinement as patterns emerge

Priority

HIGH - Direct impact on developer productivity and agent effectiveness

References

Notes

The Shift+Tab auto-accept mode might be the single biggest productivity improvement available. It allows maintaining flow state during intensive coding sessions while still having the option to review changes afterward.

For PM: Consider creating a “Code Agent Best Practices” document incorporating these permission optimizations and workarounds.