Bug
When a command is prefixed with sudo, the annotation drops the sudo token entirely instead of marking it with the ⚡ elevated-privileges emoji documented in the README.
Repro
echo '{"tool_name":"Bash","input":{"command":"sudo rm -rf /tmp/old-cache && kill -9 1234 || curl -s https://example.com | tar xzf backup.tar.gz"},"session_id":"demo"}' \
| bash scripts/annotate-pre.sh
Actual
The first segment renders as:
sudo is absent from the output — the rendered text no longer matches the command being executed.
Expected
Something like:
⚡ sudo 🗑 rm -rf /tmp/old-cache
or at minimum the literal sudo preserved inside the red destructive-command span.
Why it matters
This is worse than a cosmetic miss: the plugin's whole purpose is helping users understand what Claude Code is about to run, and privilege escalation is exactly the kind of thing the annotation should amplify, not hide. As-is, the annotated view makes a sudo rm -rf look like a plain rm -rf.
Likely cause: the parser treats sudo as a command-prefix to skip when resolving the command-map entry (so rm gets the right emoji), but the skipped token isn't re-emitted by the renderer.
🤖 Generated with Claude Code
Bug
When a command is prefixed with
sudo, the annotation drops thesudotoken entirely instead of marking it with the ⚡ elevated-privileges emoji documented in the README.Repro
Actual
The first segment renders as:
sudois absent from the output — the rendered text no longer matches the command being executed.Expected
Something like:
or at minimum the literal
sudopreserved inside the red destructive-command span.Why it matters
This is worse than a cosmetic miss: the plugin's whole purpose is helping users understand what Claude Code is about to run, and privilege escalation is exactly the kind of thing the annotation should amplify, not hide. As-is, the annotated view makes a
sudo rm -rflook like a plainrm -rf.Likely cause: the parser treats
sudoas a command-prefix to skip when resolving the command-map entry (sormgets the right emoji), but the skipped token isn't re-emitted by the renderer.🤖 Generated with Claude Code