The best way to control Claude Code, Codex and more from any computer or phone
fix(server): a link card the user moved past no longer blocks auto-settle (#29847)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Alex Southwell committed
Nov 3, 2026 at 23:48 UTC
c60950044a1ee19b651087fb0979422fa3b4298a
2 files changed
+13
apps/server/src/orchestration-v2/ProjectionStore.ts
+10
@@ -6496,6 +6496,16 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> =
6496
INDEXED BY orchestration_v2_projection_turn_items_waiting_link_idx
6497
WHERE link.thread_id = t.thread_id
6498
AND link.type = 'link_request' AND link.status = 'waiting'
6499
+ -- linkCardStillAsks: once the user writes after the card, it stops asking.
6500
+ AND NOT EXISTS (
6501
+ SELECT 1 FROM orchestration_v2_projection_messages message
6502
+ WHERE message.thread_id = t.thread_id AND message.role = 'user'
6503
+ AND json_extract(message.payload_json, '$.createdBy') = 'user'
6504
+ AND NOT ${isIdleCompactionMessage("message")}
6505
+ AND message.updated_at > COALESCE(
6506
+ json_extract(link.payload_json, '$.startedAt'), link.updated_at
6507
+ )
6508
+ )
6509
)
6510
ORDER BY t.updated_at ASC, t.thread_id ASC
6511
`;
apps/server/src/peer/PeerLinkRequests.test.ts
+3
@@ -528,6 +528,9 @@ it.live("the agent asks without waiting, and the user links the box after its tu
528
yield* a.orchestrator.getThreadProjection(threadId),
529
).pendingRuntimeRequest,
530
).toBeNull();
531
+ expect(
532
+ (yield* a.projections.getSettlementCandidates(threadId)).map((thread) => thread.id),
533
+ ).toEqual([threadId]);
534
expect(yield* cardOf(a)).toMatchObject({ status: "waiting", linkStatus: "pending" });
535
536
// The user's client mints a code on the box and picks more than the agent suggested.