Skip to content

Count reasoning tokens as a sign of life - #62

Merged
daniel-rossier merged 1 commit into
mainfrom
fix/reasoning-keeps-turn-alive
Nov 30, 2026
Merged

daniel-rossier merged 1 commit into
mainfrom
fix/reasoning-keeps-turn-alive

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

The liveness watchdog cancelled agent-core turns while the model was still thinking: complete_raw_messages never ticked on reasoning_content deltas. Two Infrabase dataset questions ended with "nothing has happened for 300s" while llama-server was streaming (13080 and 16384 tokens at ~42 tok/s).

Ticks on reasoning deltas too. New test in test_completion; the 765 tests of the modules that use model_backend pass.

The agent core's request leaves sampling to the server, which thinks.
complete_raw_messages collected reasoning_content deltas without calling
on_token, so the liveness watchdog saw nothing while the model reasoned
and cancelled the turn after 300 s: two Infrabase questions ended with
"nothing has happened for 300s" while llama-server was streaming 13080
and 16384 tokens at ~42 tok/s.

Tick on reasoning deltas as on content and tool-call deltas.
@daniel-rossier
daniel-rossier merged commit 71cde2c into main Nov 30, 2026
2 checks passed
@daniel-rossier
daniel-rossier deleted the fix/reasoning-keeps-turn-alive branch November 30, 2026 08:39
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