Skip to content

[origin-review] anomalyco/opencode#40142 — CHECK #28

Closed as duplicate

Description

@kvnloo

Why this matters

When a turn finishes length, the session loop treated it like stop — subagents exit silently mid-work (empty or reasoning-only) with no error.

Evidence

Tip fae62505cdf0f137ea583d233579ebfcfc38ad55 (base dev):

  • Leaf: session loop entry gate + in-loop branch — one continuation if usable text/tools and prior turn was not also length; else OutputLengthError (existing schema/ACP max_tokens mapping)
  • Tests claimed: three RED→GREEN cases in packages/opencode/test/session/prompt.test.ts (recoverable / reasoning-only / bound)
  • Evidence class: SOURCE + REPORTED (deepseek V4 flash stall). Live suite on tip this pass: UNKNOWN (run not finished in env)
  • Thread already has TUI copy suggestion for MessageOutputLengthError — optional leaf, not re-filed here

Invariant: truncation is either one bounded continue or an explicit output-length failure — never a silent successful stop.

Ask (design, light) — prospective; non-blocking

  1. Is “exactly one continuation keyed off previous finish” the permanent truncation policy, or should recoverable length share a durable retry budget with other stream recoveries (core: recover gracefully from truncated provider streams anomalyco/opencode#38747 class)?
  2. For never-again: should every finish reason that is not a chosen stop be forced through an error-or-continue matrix so new reasons cannot fall through as success?

Fork-only archive of a sealed review draft. Not posted on origin.

Activity

  1. kvnloo commented on Sep 25, 2026

    @kvnloo
    OwnerAuthor

    Factory QA: duplicate mirror of #27 for anomalyco/opencode#40142. Continue evidence/status updates on #27; one origin item gets one downstream QA thread.

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