Permission parser corrupts settings.local.json when approving heredoc/multi-line bash commands
Resolved 💬 7 comments Opened Jan 6, 2026 by ProduktEntdecker Closed May 2, 2026
Bug Description
When approving a bash command that contains a heredoc or multi-line content (e.g., creating a GitHub/Linear issue with a markdown body), the permission system incorrectly captures the entire multi-line content as a single permission entry instead of properly handling it.
Steps to Reproduce
- Run a bash command with a heredoc, such as:
```bash
gh issue create --title "Example" --body "$(cat <<INNER_EOF
- [ ] Task 1
- [ ] Task 2
## Section
Content here
INNER_EOF
)"
```
- Approve the command when prompted
- Check
.claude/settings.local.json
Expected Behavior
The permission should either:
- Be treated as a one-time approval (not stored)
- Store only the command prefix pattern like
Bash(gh issue create:*)
Actual Behavior
The entire heredoc content gets captured as a permission entry:
{
"permissions": {
"allow": [
"Bash(TouchBarFix\"\n- [ ] **Meta Description** \\(150-160 Zeichen\\)...\nEOF\n\\)\")",
"Bash(done)"
]
}
}
Note: Bash(done) also appeared as a separate entry, likely from the heredoc closing or a loop construct.
Impact
- Low severity: The corrupted entries are invalid and skipped by the parser
- Claude Code shows a warning:
Files with errors are skipped entirely, not just the invalid settings - Manual cleanup of
settings.local.jsonis required
Environment
- Claude Code CLI
- macOS (Darwin 25.2.0)
- Occurred during a session involving
gh issue createor Linear issue creation with markdown body content
Workaround
Manually edit .claude/settings.local.json to remove the corrupted entries.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗