Currently there are two agent implementations that aren't connected:
OLD (used by agent CLI):
NEW (used by experiments only):
Problems:
Migration plan: 1. Unify Tool types (or keep minimal in Op, full in Tools.hs) 2. Unify Event types (single source of truth) 3. Replace Engine.runAgentWithProvider with Op-based loop 4. Update agent CLI to use Interpreter/Sequential 5. Delete Engine.hs loop logic (keep provider code) 6. Ensure agentd containers work with new implementation
Benefits after migration:
Risks:
Added trace custom thinking events (emitted by Sequential interpreter) and watch/CLI display support for parity with old -v2 behavior.
Agent CLI now runs via Op + Sequential interpreter and emits Trace.Event JSON; agentd status/watch updated to parse trace schema.