Skip to content

Commit a40baf4

Browse files
dsarnoclaude
andcommitted
fix(game_eval): clarify EVAL_GAME_NOT_READY messages (Copilot review)
Both not-ready paths are reached only after editor_handler already gated game_eval on is_playing_scene(), so "is the game running? start it with the Play button" was misleading — the session is up. Reword each to match what it actually means: - _wait_then_eval (capture never registered within the wait): the play session is up, so the game is most likely still booting → wait and retry; if it persists, the _mcp_game_helper autoload is missing/disabled or the game uses a custom main loop. - _send_eval (capture was ready but no live session): the game just stopped or is restarting → confirm it's running and retry. No autoload hint here — capture had already registered, so the autoload is present. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent baebcc7 commit a40baf4

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

plugin/addons/godot_ai/debugger/mcp_debugger_plugin.gd

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ func _wait_then_eval(
438438
## and caller-actionable; classifying it apart from the opaque 10s hang
439439
## keeps the INTERNAL_ERROR telemetry bucket meaning "the eval truly hung".
440440
_send_error(connection, request_id, ErrorCodes.EVAL_GAME_NOT_READY,
441-
"Game-side autoload never registered its debugger capture within %ds. Is the game actually running? Start it with project_run / the editor's Play button, then retry. If it IS running, check Project Settings → Autoload for _mcp_game_helper (added automatically when the plugin is enabled)." % int(EVAL_READY_WAIT_SEC))
441+
"Game-side capture didn't register within %ds. The play session is already running, so the game is most likely still booting — wait a moment and retry. If it persists, the _mcp_game_helper autoload is missing or disabled (Project Settings → Autoload; added automatically when the plugin is enabled), or the game uses a custom main loop." % int(EVAL_READY_WAIT_SEC))
442442
return
443443
_send_eval(tree, code, request_id, connection, timeout_sec)
444444

@@ -452,10 +452,11 @@ func _send_eval(
452452
) -> void:
453453
var session: EditorDebuggerSession = _first_active_session()
454454
if session == null:
455-
## #518: same not-ready condition as _wait_then_eval (capture reported
456-
## ready but no live debugger session), so the same caller-actionable code.
455+
## #518: capture reported ready but the debugger session is no longer live
456+
## (the game just stopped / is restarting) — a not-ready race, so the same
457+
## caller-actionable EVAL_GAME_NOT_READY rather than the opaque hang bucket.
457458
_send_error(connection, request_id, ErrorCodes.EVAL_GAME_NOT_READY,
458-
"No active debugger session is the game actually running?")
459+
"Game-side capture registered but its debugger session is no longer active — the game likely just stopped or is restarting. Confirm it's running and retry.")
459460
return
460461

461462
var timer: SceneTreeTimer = tree.create_timer(timeout_sec)

0 commit comments

Comments
 (0)