Skip to content

Think at once when someone says "Cue, …" - #28

Merged
a-Fig merged 1 commit into
mainfrom
wake-thinks-now
Nov 13, 2026
Merged

a-Fig merged 1 commit into
mainfrom
wake-thinks-now

Conversation

@a-Fig

@a-Fig a-Fig commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Closes #27

Why

In the first real Meet call, Tyler said asking Cue for something felt slow (#26). One cheap part of that delay: "Cue, …" set state.addressed, but nothing called Claude until maybeThink's next 4 s tick. So every direct request lost 0–4 s before its think call started.

Change

  • addLine calls maybeThink() as soon as it hears a wake word. Local commands such as "Cue, mute" still run first, so the think call sees the new state.
  • maybeThink's finally starts another call if someone addressed Cue while it was busy.
  • Lines without a wake word are unchanged: they still wait for a pause or the tick.

The change stays on the wake path, as agreed with the #11 session, which also works in the tick loop.

Screenshots

None: nothing visible changes. Answers to "Cue, …" just arrive sooner.

Verified

  • npm run check passes.
  • Headless Chromium on ?test=1 with /api/think mocked (1.5 s per call, no Claude spend):
    • "Cue, what's the population of Japan?" reached /api/think in 12 ms. Before, that took up to 4 s.
    • A second "Cue, …" sent during a call got the next call as soon as the first ended, 1.3 s after it was asked.
    • "we should ship on friday" made no call within 500 ms, as before.
  • Not checked in a real call. Known gap: if Recall delivers "Cue." as a line of its own and the question as the next line, the think call fires on the bare "Cue." first. The question then waits for the usual pause.

Review

Skipped: public/-only change (CLAUDE.md skip rule).

🤖 Generated with Claude Code

A direct request used to sit until maybeThink's next 4 s tick, so every "Cue, …" lost 0–4 s
before its think call even started. That's the cheapest part of the slow loop Tyler felt in
the first real call (#26). A wake word now calls maybeThink immediately. One heard while a call
is running gets its turn as soon as that call ends, instead of a tick later.

The change stays on the wake path, so #11's work on the tick loop can rebase over it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@a-Fig
a-Fig merged commit 71194d4 into main Nov 13, 2026
1 check passed
@a-Fig
a-Fig deleted the wake-thinks-now branch November 13, 2026 21:05
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.

"Cue, …" waits up to 4 s for the next tick before thinking (from Opus)

1 participant