Repository navigation
0.3.5: stop pre-denying heredoc-fed file writes in Bash - #3
Merged
Merged
Conversation
A heredoc redirect or tee (e.g. cat <<EOF > script.sh) was being flagged the same as sed/perl in-place edits and pre-emptively denied, forcing Edit/Write for a case the existing pre/post snapshot audit already handles correctly. Reported as live friction: it blocked a working script-generation approach mid-task. Rebased onto 0.3.4 (temp-dir exemption + all-targets check); renumbered from 0.3.3, which #4 already used. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcfZR5roFkrPHCxKBUgdoC
TAJD
force-pushed
the
dev-heredoc-audit-fix
branch
from
October 5, 2026 07:18
b09f71d to
c3e0cd4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bashWriteIntentno longer flags a redirect or tee fed by a heredoc as an in-place edit requiring Edit/Write — it now falls through to the existing pre/post snapshot audit, same as any other Bash command.Why
Flagged as a live false-positive during the DEV harness work: a heredoc-based script-generation approach was blocked mid-task even though the post-audit mechanism (added in 0.3.0) already diffs the resulting file correctly for comment additions.
Test plan
node --test tests/bash.test.mjs tests/hook.test.mjs— 154/154 pass🤖 Generated with Claude Code
https://claude.ai/code/session_01HWGRbfkVDRi5NfDCwudC5C