Skip to content

fix(client): snoozed limited threads no longer wake on unrelated activity - #15134

Closed
Absterrg0 wants to merge 1 commit into
pingdotgg:mainfrom
Absterrg0:fix/limit-snooze-early-wake
Closed

Absterrg0 wants to merge 1 commit into
pingdotgg:mainfrom
Absterrg0:fix/limit-snooze-early-wake

Conversation

@Absterrg0

Copy link
Copy Markdown

Threads snoozed via 'Snooze until reset' reappeared in the inbox before the usage-limit reset time.

The client's raised-hand check compared runtime.updatedAt against snoozedAt, but runtime.updatedAt is projection activity time and advances on unrelated events (title updates, metadata changes). Any background event after the snooze was misread as a fresh failure.

Wake detection now uses the run's stable completedAt timestamp for failed/completed runs, and only falls back to session.updatedAt for legacy session-shaped shells.

Built with Muse Spark via OpenCode.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 3, 2026
@Absterrg0 Absterrg0 closed this Oct 3, 2026
}
// Legacy session errors without a run timestamp: session.updatedAt stamps
// the status edge, so an error newer than the snooze is new information.
const session = shell.session ?? null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High state/threadSettled.ts:125

A failed production shell with no snoozedAt returns false, so the thread stays hidden until snoozedUntil instead of waking immediately on failure. The fallback only reads shell.session, while production shells populate shell.runtime; include shell.runtime so failures without a completion watermark preserve the server's early-wake behavior.

-  const session = shell.session ?? null;
+  const session = shell.session ?? shell.runtime ?? null;
🤖 Copy this AI Prompt to have your agent fix this:
In file @packages/client-runtime/src/state/threadSettled.ts around line 125:

A failed production shell with no `snoozedAt` returns `false`, so the thread stays hidden until `snoozedUntil` instead of waking immediately on failure. The fallback only reads `shell.session`, while production shells populate `shell.runtime`; include `shell.runtime` so failures without a completion watermark preserve the server's early-wake behavior.

@macroscopeapp

macroscopeapp Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Would Approve

Macroscope's review found this PR approvable — This is a narrowly scoped, tested client bug fix that replaces unreliable projection activity timestamps with stable run completion timestamps, preventing unrelated activity from waking snoozed threads. An unresolved High-severity finding remains for runtime-only failures without snoozedAt, which blocks approval until addressed.

Not approved because:

  • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant