fix(agent-loop): scope blocked admission cleanup
This commit is contained in:
18 files changed
+162
-51
No files matched your search
@@ -176,7 +176,11 @@ export class ReactLoopAgent implements Agent {
|
||||
if (queued !== undefined) this.inbox.splice('next-turn', 0, 1, [], 'admitted')
|
||||
return { kind: 'admitted', messages: decision.messages }
|
||||
}
|
||||
this.cancel({ kind: 'hook', reason: decision.reason }, { keepInbox: decision.keepInbox })
|
||||
if (decision.discardClaimed) {
|
||||
this.inbox.splice('next-step', 0, outboxLength, [], 'canceled')
|
||||
if (queued !== undefined) this.inbox.splice('next-turn', 0, 1, [], 'canceled')
|
||||
}
|
||||
this.cancel({ kind: 'hook', reason: decision.reason }, { keepInbox: true })
|
||||
return { kind: 'blocked' }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user