Skip to content

fix: a timer wake with nothing to do makes no model call; a refused token on connect is retried - #36

Merged
den-vasyliev merged 2 commits into
mainfrom
fix/idle-wakes
Nov 24, 2026
Merged

den-vasyliev merged 2 commits into
mainfrom
fix/idle-wakes

Conversation

@den-vasyliev

Copy link
Copy Markdown
Contributor

Two idle timer wakes of an actor cost four model calls with the whole prompt and tool list, to read an empty room twice.

  • Idle timer wakes. A wake the model planned at the end of a turn that only read its room was counted as asked for by the agent. On an actor every timer wake was: the core's order carries the plan's words, not who made it, so the quiet rule never applied. The state directory now keeps who made the plan and whether the last timer turn did nothing; the wake after it ends without a model call until something changes or 12 hours pass.
  • Stale facts. A wake whose facts are all about issues that closed is quiet.
  • Connect. An authorization-required answer on the first connect of a wake gets one fresh hello and one more try.

Release notes: docs/releases/v0.9.10.md.

…ello and one more try

A substrate actor's first MCP connect of a wake could meet a 401 (the core revokes a token issued before it marked the actor suspended, and its record can flip while the wake runs). The turn failed with the core MCP server not reachable and the wake was lost. The registry now calls Reauth once on an authorization-required error for the core (Link.Refresh: one hello at a time, new token to the token file the client reads on every request) and connects again.
A wake the model planned at the end of a turn that only read its room was counted as asked for, and on an actor every timer wake was (the core's order carries the plan's words, not who made it), so the quiet rule never applied. Who made the plan and whether the last timer turn did nothing are now kept in the state directory. A wake whose facts are all about closed issues is quiet too.
@den-vasyliev
den-vasyliev merged commit 2fa8d56 into main Nov 24, 2026
3 checks passed
@den-vasyliev
den-vasyliev deleted the fix/idle-wakes branch November 24, 2026 18:25
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