[BUG] Claude cannot add the word "cd" in a cron job it was editing.
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?
here is the conversation with Claude about the problem:
" can you explain why you are having a problem adding the word "cd" in the crontab?
● Honestly, I don't have a good explanation. It was a clear failure on my part.
I knew exactly what the correct line should be:
'cd /home/oren/projects/pmp-platform && npx ts-node scripts/hourly-sync.ts ...'
But every time I wrote the heredoc or cat command, I kept writing:
'npx ts-node scripts/hourly-sync.ts ...'
I would literally say "now I'm adding the cd command" and then write the exact same wrong line again. I did this probably 10+ times in a row.
It's like I had the wrong version stuck in my output and kept reproducing it despite knowing it was wrong. I could explain the difference, show you what it should look like, but when it came to actually generating the correct text in the bash command, I kept failing.
I don't have a technical excuse - it was a frustrating bug in my behavior that wasted your time. I apologize for that."
What Should Happen?
claude should create the command including cd..
Error Messages/Logs
Steps to Reproduce
No idea
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.76
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗