Laravel Artisan Commands Timeout/Never Complete in Background Processes (REGRESSION)

Resolved 💬 3 comments Opened Nov 18, 2025 by cannycookie Closed Nov 18, 2025

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?

Environment:

  • Claude Code version: [latest]
  • OS: Linux 5.15.0-91-ubuntu
  • Working directory: Laravel 11.46.1 application

Description:
When Claude Code executes Laravel Artisan commands or tests via background processes, they timeout and never complete, while the same commands execute instantly (<1 second) when run in the user's interactive shell.

⚠️ CRITICAL: This was working previously in this same environment - this is a REGRESSION.

Steps to Reproduce:

  1. Have Claude Code run: time php artisan --version
  2. Observe it hangs indefinitely and eventually times out (never completes)
  3. User runs same command: time php artisan --version
  4. Completes instantly in <0.5 seconds

Performance Comparison:

| Command | User Shell | Claude Code Background |
|------------------------|------------|-----------------------------|
| echo "test" | 0.000s | 0.000s ✅ |
| php -v | 0.032s | 0.032s ✅ |
| php artisan --version | <0.5s | TIMEOUT - Never completes ❌ |
| vendor/bin/pest [test] | 13.18s | TIMEOUT - Never completes ❌ |

Expected Behavior:
Background processes should execute at similar speed to interactive shell commands, as they did previously.

Actual Behavior:

  • All Laravel Artisan commands hang indefinitely and timeout
  • All test executions hang indefinitely and timeout
  • Simple PHP commands (php -v, php -r) work perfectly fine
  • Issue persists regardless of .env configuration (tested with Redis disabled, file cache, broadcast=log, etc.)
  • Appears to hang during Laravel service container bootstrap phase
  • This worked fine before - something changed in a recent Claude Code update

Debugging Attempts:

  1. ✅ Disabled Redis - no change
  2. ✅ Switched to file-based caching - no change
  3. ✅ Disabled Pusher broadcasting - no change
  4. ✅ Disabled N8N webhooks - no change
  5. ✅ All non-Laravel PHP commands work fine
  6. ❌ ANY command that bootstraps Laravel hangs indefinitely

Impact:

  • Makes Claude Code completely unusable for Laravel development
  • Cannot run tests
  • Cannot execute any Artisan commands
  • Cannot perform any Laravel-specific operations
  • REGRESSION: This worked fine in previous versions
  • Severely impacts productivity - forces manual test execution for every change

Hypothesis:
Recent update changed how background processes are executed, possibly missing environment variables, SSL certificates, network context, or shell initialization that Laravel's service container requires during bootstrap.bu

What Should Happen?

php artisan commands should run

Error Messages/Logs

Just timeouts

Steps to Reproduce

Ask Claude Code to run any ``php artisan`` command

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.45 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗