Skip to content

fix: avoid Claude cache timer before first prompt - #442

Merged
Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/cc-timer-fix
Apr 10, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/cc-timer-fix

Conversation

@Jinwoo-H

Copy link
Copy Markdown
Contributor

Problem

The Claude prompt-cache countdown could appear before the user had sent the first Claude message. Orca seeded the timer from the first idle Claude title it saw, but a fresh Claude Code session also starts idle before any prompt cache exists.

Solution

Only seed the initial idle countdown for PTYs that were reattached during session restore. Freshly spawned Claude terminals now skip that seed path and wait for a real working-to-idle transition after the first request. The seeding decision is isolated in a small helper with focused tests covering fresh tabs, restored tabs, working titles, existing timers, and startup settings hydration.

Testing

  • pnpm test -- src/renderer/src/components/terminal-pane/cache-timer-seeding.test.ts src/renderer/src/lib/agent-status.test.ts
  • pnpm exec oxlint src/renderer/src/components/terminal-pane/pty-connection.ts src/renderer/src/components/terminal-pane/cache-timer-seeding.ts src/renderer/src/components/terminal-pane/cache-timer-seeding.test.ts
  • pnpm run typecheck:web

Closes #420

@Jinwoo-H
Jinwoo-H merged commit 386bd17 into main Apr 10, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Thundernerd added a commit to Thundernerd/orca that referenced this pull request Nov 18, 2026
… of tickets

Each implemented ticket handed over one to three findings in the area it had
just touched, and each of those did the same, so the tracker filled with
narrowing variations on one theme (on Cronk: stablyai#421 → stablyai#430 → stablyai#442/stablyai#443 →
stablyai#448/stablyai#454 → stablyai#460/stablyai#461, and similar chains for closing, query binding and
From Transcript kinds). Some were review points on code still on the
unmerged branch (stablyai#450, stablyai#453) or /code-review judgement calls (stablyai#467).

- The implementing brief, local and cloud, now counts only real bugs and
  gaps as findings. Problems in code the branch adds are fixed in its PR;
  judgement calls, tidy-ups and further passes over freshly reworked code
  are left with a reason in the report instead of handed over.
- The finding check also searches tickets closed in the last two weeks and
  the findings already filed up the "Found while implementing" chain, and
  files nothing for code that exists only on the origin's branch.
- A finding whose title is already recorded on its origin is not filed
  again, which is how stablyai#431 duplicated stablyai#430.
- The filed body no longer repeats "Found while implementing" and the
  triage line when the agent's draft already opens with them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Countdown for Claude Code cache expiration is displaying even before I send the first msg

1 participant