[BUG] Laravel migrations edited via Edit tool silently fail to execute while appearing successful
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?
Description:
When creating Laravel migration files via artisan make:migration and then editing them using Claude Code's Edit tool, the migrations appear to run successfully
but don't actually apply the schema changes to the database.
Actual Behavior:
- Laravel marks migration as "migrated" in migrations table
- No errors are thrown
- Schema changes are not applied to database
- Manually creating identical file with same content works immediately
Environment:
- OS: Linux 6.12.21-1-lts
- Laravel 8 application
- Using Laravel Sail (Docker)
- MariaDB database
Additional Context:
This has occurred multiple times. The migration file content appears identical when read back, suggesting a possible file encoding, timing, or caching issue
during the Edit tool's write operation. The silent failure is particularly concerning as there's no indication anything went wrong.
What Should Happen?
Expected Behavior:
Migrations edited via Edit tool should execute properly and apply schema changes.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce:
- Create a migration: ./vendor/bin/sail artisan make:migration add_field_to_table
- Use Claude Code Edit tool to add schema changes (e.g., $table->json('field_name')->nullable()->after('other_field');)
- Run migration: ./vendor/bin/sail artisan migrate
- Migration shows as "Migrated" successfully
- Check database schema - the column was not added
- Manually create identical migration file in IDE and run it - works perfectly
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.13
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗