The whole remote script is fed to `ssh bash -s` as stdin (a heredoc). `docker compose run` without -T attaches that stdin to the container, so it consumed every line after the migrate — web was never restarted and no health check ran, yet the script exited 0 and printed "Done". A deploy that half-ran and reported success. `-T` plus `</dev/null` on the migrate command stops it reading the heredoc. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>