Files
deepseek-harness/docs
Tianyi Cui 9d5b3ab832 fix(agent-loop): append step/start before emitting agent/step-start (P1-6)
Every loop boundary appends the session event before emitting the Cordis
event (ADR 0003's append-before-emit rule) — except step/start, which was
inverted. A listener on agent/step-start that inspected session.events could
not see the step it was just told had started.

- Swap the two lines so session.append('step/start') precedes the emit.
- Fix the two stale pseudo-code copies (the runLoop JSDoc STEP-loop block and
  docs/architecture.md) so neither shows step-start emitted before the append.
- Regression test: a step-start listener observes the matching step/start
  event already at the tail of session.events. Verified the test fails on the
  pre-fix (emit-first) order.
2026-06-14 23:18:41 +08:00
..
2026-06-14 11:28:00 +08:00