Tight iterate loop on a GDScript bug
When to use: Player movement broke after refactor; you want Claude to fix without flipping back to Godot every minute.
Prerequisites
- Godot 4 installed — Download from godotengine.org
- GODOT_PATH env var — Point at the Godot binary (not the .app on macOS)
Flow
-
Project contextGodot: get project info for /Users/me/games/Platformer. List autoloads + main scene.✓ Copied→ Project name, version, autoload list returned
-
Run the failing sceneRun scene
scenes/Level1.tscnheadlessly with a 10-second timeout. Show stderr.✓ Copied→ stderr captured; error line + traceback visible -
Fix and re-runThe error is 'Invalid call to method move_and_slide on null'. Read scripts/Player.gd, find the cause, fix it, then re-run the scene.✓ Copied→ File edited, scene re-runs, no more null error
Outcome: Bug found and fixed in 5 minutes without leaving chat.
Pitfalls
- Headless run hangs on a modal dialog — Use timeout; check stderr for the dialog title
- GODOT_PATH points at the wrong arch (Intel vs ARM mac) — Verify with
file $GODOT_PATH