Skip to content

The work route waits for a turn that is starting, so its Live Activity gets updates - #305

Merged
promptclickrun merged 2 commits into
mainfrom
fix/work-snapshot-waits-for-turn
Nov 14, 2026
Merged

promptclickrun merged 2 commits into
mainfrom
fix/work-snapshot-waits-for-turn

Conversation

@promptclickrun

Copy link
Copy Markdown
Owner

Problem

The app asks which turn a chat has (POST …/work) at the moment the turn starts. The plugin learns of the turn at pre_llm_call, which Hermes fires later. If the question came first, the answer named no work. Released app builds ask one time, and then keep the Live Activity card for the full turn. The card got no update with the app in the background or closed, and no sealed detail.

Closes #304

Change

  • The work route holds its answer up to 8 seconds (WORK_WAIT_SECONDS) until the chat has running work.
  • The route answers immediately when work runs.
  • The route waits outside the lock, so the hooks of the turn run.
  • A host that closes answers immediately.

No change to the answer's fields. Older apps get the same answer, only later and correct.

Tests

With the current Hermes source and Python 3.14 on a Mac:

  • New test test_work_snapshot_waits_for_a_turn_that_is_starting. It failed before the change and passes now.
  • tests.test_managed_notifications and tests.test_card_detail: 231 tests pass.
  • Full suite: 2,459 tests. 15 tests fail in test_native_startup_logging, test_registration and test_plugin_update_installation. The same tests fail in this environment without the change.

Not tested: a real host with this change.

Made by Claude Fable 5.2 in Claude Code.

🤖 Generated with Claude Code

GordieBox and others added 2 commits November 13, 2026 20:59
…y gets updates

The app asks which turn a chat has the moment the turn starts. The plugin learns
of the turn at pre_llm_call, a little later. Told "no work", released apps kept
the card to themselves for the whole turn: no update with the app away, and no
sealed detail. The route now holds its answer up to 8 seconds for running work.

Closes #304

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.

The work route answers before the host knows the turn, so the Live Activity stays local

1 participant