The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 07:15 UTC
test(server): agy permission continuation test waits for the reply's usage_update (#38899)
Julius Marminge committed
Nov 18, 2026 at 19:40 UTC
e8aa0debb3c0a400c276a07f22a635f31b233530
1 file changed
+8
-3
apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts
+8
-3
@@ -597,6 +597,7 @@ describe("AcpRegistryAdapterV2", () => {
597
used: 100,
598
size: 1000,
599
}),
600
+ claudeMarker("reply ended"),
601
],
602
gate,
603
true,
@@ -627,10 +628,14 @@ describe("AcpRegistryAdapterV2", () => {
628
// The model can be silent longer than the finalize debounce before it goes on.
629
yield* TestClock.adjust("10 seconds");
630
gate.release("reply");
630
- const output = yield* session.until(
631
- (event) => event.type === "message.updated" && event.message.text === "Command approved.",
631
+ // The closing usage_update must be handled before the clock moves, or its debounce never fires.
632
+ const output = yield* session.throughMarker("reply ended");
633
+ assert.isTrue(
634
+ output.some(
635
+ (event) =>
636
+ event.type === "message.updated" && event.message.text === "Command approved.",
637
+ ),
638
);
633
- assert.isTrue(output.some((event) => event.type === "message.updated"));
639
assert.isFalse(output.some((event) => event.type === "turn.terminal"));
640
yield* TestClock.adjust("3 seconds");
641
assert.equal((yield* session.terminal).status, "completed");