Merge pull request #21 from deepseek-ai/fix/agent-loop-step-start-order

fix(agent-loop): append step/start before emitting agent/step-start
This commit is contained in:
Tianyi Cui
2026-06-15 22:08:52 +08:00
committed by GitHub
3 changed files with 32 additions and 3 deletions

View File

@@ -134,7 +134,7 @@ forever:
drain queued → session('user/message'…) → 'turn/start' → emit agent/turn-start
STEP loop:
drain steering (late steering from previous step's listeners)
emit agent/step-start
session('step/start'); emit agent/step-start
assembly = ctx.systemPrompt.assemble() ⟵ waterfall system-prompt/assemble
req = {model, system, tools, messages: session.deriveMessages(), signal}
req = waterfall agent/request ⟵ hooks, compaction, model switch