Allow users to send messages to running agents, injected between iterations.
Agent checks for steering between iterations at a clean boundary. Steering is injected into the conversation context, then the agent continues the same run.
Agent iteration 1 → tool call → result
Agent iteration 2 → tool call → result
User: agentd steer run-123 "try a different approach"
Agent checks steering queue before iteration 3
Steering injected as user message in context
Agent iteration 3 → now has guidance → continues
...
Agent completes (single run, single trace)
_/events/<run-id>.steering - messages to inject
agentd steer <run-id> "try a different approach"
Writes message to steering file. Agent picks it up on next iteration boundary.
In the main loop, between iterations: 1. Check for steering file (path from env var or convention) 2. If exists, read and clear it 3. Append as user message to conversation 4. Emit steering event to trace 5. Continue iteration
{"type": "steering", "message": "try a different approach", "timestamp": "..."}
The existing Check :: (Maybe Steering -> next) -> OpF s next is exactly this.
Interpreter calls it between iterations, reads from steering file.
1. Add agentd steer <run-id> <message> command
2. Implement steering check in Engine.hs loop (between iterations)
3. Add EventSteering type to Events.hs
4. Pass steering file path to agent (env var AGENT_STEERING_FILE or derive from run-id)
When replaying, steering events are in the trace - replayer injects them at the same points. Perfect reproducibility.
Implemented steering via agentd steer + AGENT_STEERING_FILE, added EventSteering handling in sequential interpreter, and updated docs/specs.