Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Antigravity resumes a turn after an empty model reply #39123

ClosedB-EtterDigital(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/39123/headopened View on GitHub

Showing 5 changed files with 188 additions and 1 deletion (loading 2).

x
0 of 5 viewed, 5 left
148 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.tsModified
View file
@@ -1510,6 +1510,154 @@
}).pipe(Effect.provide(layerTest)),
+ it.live("resumes a hidden failure the agent survives, up to the flavor's bound", () =>
+ Effect.gen(function* () {
+ const path = yield* Path.Path;
+ const instanceId = ProviderInstanceId.make("acp-test-prompt-resume");
+ const threadId = ThreadId.make("thread-acp-prompt-resume");
+ const emptyReply = {
+ class: "provider_error",
+ message: "The model returned an empty reply.",
+ code: "EMPTY_MODEL_OUTPUT",
+ retryable: true,
+ } as const;
+ const prompts: Array<{ readonly runtime: number; readonly text: string }> = [];
+ // Like the native session log, each check reads how the latest prompt ended.
+ let emptyPrompts = 1;
+ let lastPromptEmpty = false;
+ const adapter = yield* makeAcpAdapterV2({
+ instanceId,
+ selfInvocation: yield* resolveSelfInvocation(),
+ flavor: {
+ driver: ACP_TEST_DRIVER,
+ capabilities: AcpProviderCapabilitiesV2,
+ reportsPerTurnPromptUsage: true,
+ watchPromptOutcome: () =>
+ Effect.succeed(() =>
+ Effect.sync(() =>
+ lastPromptEmpty