Skip to content

llm: clean stream EOF without finish event can loop generation indefinitely (UI stays busy) #407

Closed

Description

@mdev34-lab

Severity: high | global review pass P4 (session lifecycle).

packages/llm/src/protocols/openai-responses.ts:959-977; packages/llm/src/route/client.ts:279-295,382-390; packages/opencode/src/session/processor.ts:724-731,788-794; packages/opencode/src/session/prompt.ts:1369-1374,1506-1516: a native OpenAI Responses stream that closes before a terminal event lets the processor finish cleanly without setting finish or error. The prompt loop's exit and step-cap checks require a truthy lastAssistant.finish, so they are skipped and another generation starts - requests continue until interrupted while the UI stays busy.

Repro: provider stream closes without a terminal/finish event (proxy/gateway truncation); the session regenerates in a loop. Fix size: medium.

Activity

  1. agenteinstinct1-max commented on Oct 21, 2026

    @agenteinstinct1-max
    Collaborator

    Fixed by #445 (merged into dev-vibecoded).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions