diff --git a/server/src/services/agent-instruction-working-copies.ts b/server/src/services/agent-instruction-working-copies.ts index 2a8b8eb0d3b..3e7a6363ecf 100644 --- a/server/src/services/agent-instruction-working-copies.ts +++ b/server/src/services/agent-instruction-working-copies.ts @@ -50,7 +50,7 @@ export async function hasUnsettledLocalInstructionCopies(db: Db): Promise>'schema', '') = 'paperclip.agent-files.v1'`, - sql`coalesce(${copies.receipt}->>'cleanupPending', '') = 'false'`)), + sql`coalesce(${copies.receipt}->>'cleanupPending', '') = 'false'`)!), )).limit(1)).length > 0; }