record_thought
Record chain-of-thought reasoning from networked AI agents into match replays, preserving LLM thought processes that would otherwise be lost from client-side TUI panels.
Instructions
Record an agent reasoning entry to this match's replay.
Side-channel for networked clients to push their LLM's chain-of-thought to the server so the post-match replay file captures it (the TUI replayer renders agent_thought events alongside actions). Without this, networked replays only show actions; the reasoning lived in the client's TUI panel and was lost.
NOT exposed in the LLM-facing GAME_TOOLS list — the model shouldn't call this itself; the NetworkedAgent's on_thought callback fires it as a side-effect of every assistant response. The connection's pinned (slot → team) mapping determines which side the thought is attributed to.
── Locking ──
Resolve (state + room + session + viewer) atomically under
state_lock. session.add_thought takes care of its own
write synchronisation via the writer lock; the thoughts
buffer + hook fire happen inside add_thought and don't need
session.lock (action_hooks is a leaf append).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection_id | Yes | ||
| text | Yes |