Skip to content

Model returns empty turns (server healthy) — degenerate 1-token completions after large tool results / deep context #14

Description

@Hrt-Htk

Summary

While the server is completely healthy, the model intermittently returns an empty turn — a single-token, immediate-stop completion with no usable content. The client (interactive pi and the pi subagent) then appears to "stop responding": every input yields an empty reply. This is the original "pi produces no output" complaint, and it is distinct from #13 (a hung/dead worker). Here nothing is hung — the worker answers every request in <1s; it just returns nothing.

Evidence (2026-07-19 ~20:44–20:47)

Server side fully green — worker 62032 alive and idle, every request 200:

task 164  eval time = 0.00 ms / 1 tokens     -> POST … 200 in 442ms   (1386 bytes)
task 168  eval time = 0.00 ms / 1 tokens     -> POST … 200 in 600ms   (1386 bytes)
task 171  eval time = 0.00 ms / 1 tokens     -> POST … 200 in 545ms   (1385 bytes)
task 174  eval time = 0.00 ms / 1 tokens     -> POST … 200 in 596ms   (1385 bytes)

Each of the last four requests generated exactly 1 token from an identical prompt (sim_best = 1.000, n_tokens = 11751). pi's own session (~/.pi/agent/sessions/--H--personal-assistant--/…) records genuinely empty assistant messages:

[toolResult]  (large web-scrape result)
[assistant]   (empty)
[user] "?"        -> [assistant] (empty)
[user] "afsdfsd"  -> [assistant] (empty)
[user] "asdfas"   -> [assistant] (empty)

The empties began right after a large tool result at ~11.7k tokens of context.

Signature (how to recognise it)

  • Server healthy, 200 responses, worker alive — no hang/5xx.
  • eval time = 0.00 ms / 1 tokens (model emits an immediate stop token).
  • pi session shows empty assistant content (no text, no tool call).
  • Often follows a large tool result / deep context; identical prompt repeated (sim_best ≈ 1.0).

Relationship to other issues

Possible directions (not yet investigated)

Impact

Recurring; affects both interactive pi and the pi subagent. Manifests as "the agent went silent / stopped responding" even though the backend is fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions