Start or stop a game session that stays up
godot_sessionLoad a Godot scene once and keep it running paused at frame 0, so the game can be inspected and stepped frame by frame without reloading a large world on every call.
Instructions
Load a scene in Godot 4.7 headless once and keep it running between calls, paused at frame 0, so godot_game can look at the live game and move it frame by frame without loading the world again (a big world can take a minute to load; godot_play loads it on every call). op start (scene: default the main scene; restart: true loads it again), status, or stop. Only this machine can reach it (a loopback port with a token), the project is not changed (the script lives in .godot/godotwright/), and the game quits by itself after idle_minutes without a request (default 15). Stop it when you are done.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | start, status or stop | |
| path | No | The project folder, or any file or folder inside it (Godotwright walks up to project.godot). Relative paths start at the server's folder. Default: the current project. | |
| scene | No | the res:// scene to load (default: the main scene) | |
| restart | No | stop a running session and load the scene again | |
| idle_minutes | No | quit after this many minutes without a request (default 15) | |
| timeout_seconds | No | how long the scene may take to load (default 300) |