fix(agent-loop): route next-step input during admission

This commit is contained in:
_Kerman
2026-07-27 17:55:55 +08:00
parent 52174e32cb
commit a59ce0367c
18 changed files with 207 additions and 85 deletions

View File

@@ -2907,10 +2907,8 @@ export function createTuiChat(
agent.followup({ content, source: { kind: 'user' } })
return
}
// Idle: the snapshot rides the prompt's own admission transaction
// (PromptDecision.additionalContexts), so a blocking hook discards the
// prompt and its attached context together instead of stranding the
// snapshot in history for the next unrelated prompt.
// Idle: the snapshot rides the prompt's admission transaction so a
// blocking hook discards both together.
let cleanedUp = false
const cleanup = (): void => {
// Each trigger detaches both listeners, so a second call needs a