[BUG] Dynamic context injection does not work as documented.
Resolved 💬 1 comment Opened May 22, 2026 by mandelkow Closed Jun 22, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
According to the docs (https://code.claude.com/docs/en/skills#inject-dynamic-context):
"Each !<command> executes immediately (before Claude sees anything)"
However this interaction with Claude Code 2.1.141 (Haiku) suggests otherwise:
❯ Print the latest user prompt and nothing else. # !`ls CLA*.md`
⏺ Print the latest user prompt and nothing else. # !ls CLA*.md
What Should Happen?
❯ Print the latest user prompt and nothing else. # !ls CLA*.md
⏺ Print the latest user prompt and nothing else. # CLAUDE.md
Error Messages/Logs
Steps to Reproduce
❯ Print the latest user prompt and nothing else. # !ls CLA*.md
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.141
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
Inline code injection is a much anticipated feature.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗