Watch & React Workflow
The Watch & React workflow is for situations where you want to monitor nodes over time rather than analyze a specific recorded moment. Instead of recording and reviewing, you set up watches and the agent observes the game as it runs.
When to use watches instead of recordings
| Use recordings when... | Use watches when... |
|---|---|
| The bug already happened | You want to catch the bug as it happens |
| You need frame-precise timing | Coarse timing is sufficient |
| You want to scrub backward in time | You want real-time monitoring |
| The bug is intermittent and hard to trigger | The bug is happening continuously |
| Post-mortem analysis | Live investigation |
The basic loop
1. spatial_snapshot — get current frame number
2. spatial_watch (add) — register nodes to monitor
3. [game runs, things happen]
4. spatial_delta — check what changed
5. [repeat 3-4 as needed]
6. spatial_watch (remove) — clean upExample: Monitoring player health during combat
You are debugging a health regen system that seems to not work correctly during certain combat conditions.
Step 1: Set up the watches
Step 2: Check changes during combat
Step 3: Narrow down the cause
The agent found that the in_combat flag never resets — likely a missing call to set it to false when the last enemy dies. The fix is in the combat state manager.
Example: Watching enemy patrol behavior
You suspect enemies are teleporting slightly during patrol waypoint transitions.
Watching multiple nodes simultaneously
Set up watches on related nodes to catch interactions:
{ "action": "add", "watch": { "node": "Player", "track": ["position", "health"] } }
{ "action": "add", "watch": { "node": "Boss", "track": ["position", "velocity", "phase", "health"] } }
{ "action": "add", "watch": { "node": "Boss/AttackHitbox", "track": ["monitoring"] } }
{ "action": "add", "watch": { "node": "BossArena/HazardTiles", "track": ["monitoring"] } }Now a single spatial_delta call shows changes across all four nodes — you can see the Boss switch phase at a certain health threshold, the AttackHitbox become active, and the HazardTiles respond, all in one response.
Delta poll frequency
You control how often to poll. The agent does not poll automatically — you ask for a delta when you want it.
Typical patterns:
- Quick check: poll once after a specific event ("I just died, check the delta")
- Periodic: poll every 10-30 seconds during a long session
- Event-triggered: poll after specific in-game events ("I just finished wave 3, check it")
Poll when you need the next delta. The watch remains session state between calls, and each delta advances the baseline. Do not infer zero runtime cost from a lack of network polling.
Cleaning up
{ "action": "clear" }Always clear watches when moving to a new investigation. Stale watches from a previous investigation add noise to subsequent deltas.
Or delete a specific watch:
{ "action": "remove", "watch_id": "w_c8d9e0" }