Skip to content

fix(computer): a pick that ends without a frame is logged as off - #847

Open
OAraLabs wants to merge 1 commit into
mainfrom
fix/computer-pick-end-is-logged
Open

OAraLabs wants to merge 1 commit into
mainfrom
fix/computer-pick-end-is-logged

Conversation

@OAraLabs

Copy link
Copy Markdown
Owner

Why

A pick lives in memory, so it ended silently when the daemon restarted, when it expired, or when a client cleared one the daemon no longer held. Beacon learns the pick from the action log (live and by backfill), so after a restart it kept showing the app as picked. Its picker opens only when nothing is picked, so a needs_app answer showed no apps, and "Change / clear" sent a DELETE that emitted nothing: the conversation was stuck.

What

  • ComputerLiveStream.binding_off(session_id, reason=...) emits a minimal "off" computer_binding frame.
  • The launcher runs end_stale_picks() once the stream exists: every session whose last logged pick is "on" gets an "off" (reason: restart).
  • An expired pick, and an unbind with nothing held, say "off" too.

Verification

New tests/test_computer_pick_end_logged.py (5 tests; all red before). Computer-use suites 636 passed; ruff clean. On the rig: after a daemon restart, Beacon showed "No app picked yet" with the picker open.

🤖 Generated with Claude Code

A pick lives in memory, so it ended silently when the daemon restarted, when
it expired, or when a client cleared one the daemon no longer held. Beacon
learns the pick from the action log (live and by backfill), so after a restart
it kept showing the app as picked; its picker opens only when nothing is
picked, so a "needs an app" answer showed no apps, and "Change / clear" sent a
DELETE that emitted nothing.

- ComputerLiveStream.binding_off(session_id, reason=...) emits a minimal
  "off" computer_binding frame.
- The launcher runs end_stale_picks() once the stream exists: every session
  whose last logged pick is "on" gets an "off" (reason "restart").
- An expired pick, and an unbind with nothing held, say "off" too.

Found on the isolated computer-use rig.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant