GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode run exits 1 after auto-compaction recovers from a provider 413 · Issue #39573 · anomalyco/opencode

opencode run exits 1 after auto-compaction recovers from a provider 413 #39573

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
opencode run exits 1 after auto-compaction recovers from a provider 413#39573
Copy link
Assignees
jlongster

Description

@Alezander9
Alezander9
opened on Jul 29, 2026
Issue body actions

Description

opencode run exits 1 (and the TUI shows an error toast) when a provider rejects a request for size (HTTP 413 / ContextOverflowError), even though auto-compaction recovers: the session compacts, retries, and produces a complete correct answer. Anything scripting opencode run or tailing --format json sees the run as failed.

Cause: the auto-compact branch in processor.ts halt() publishes Session.Event.Error before attempting recovery:

ctx.needsCompaction = true
yield* events.publish(Session.Event.Error, { sessionID: ctx.sessionID, error })
return

Consumers (cli/cmd/run.ts, tui/app.tsx, app/context/notification.tsx) all treat session.error as the run's outcome. This publish is inconsistent with the rest of the codebase: it doesn't set message.error (the durable message says no error), it isn't followed by idle or a throw, and nothing consumes it — compaction is triggered by the "compact" return value. Retried 429s and the proactive overflow check are both silent.

Steps to reproduce

  1. Run a non-interactive prompt against a session large enough that the provider returns 413, with auto-compaction enabled
  2. Compaction recovers and the final answer is produced
  3. opencode run exits 1; --format json stdout contains an error event

Reproducible with the test-LLM harness: push a 413 (request_too_large), then two text replies; opencode run --format json exits 1 despite emitting the recovered output.

OpenCode version

dev (processor.ts:616)

Activity

  1. github-actions
    assigned
    jlongster
    on Jul 29, 2026
  2. github-actions commented on Sep 29, 2026

    @github-actions
    github-actionsBot
    on Sep 29, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  3. github-actions
    closed this as not plannedon Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jlongster
    jlongster

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.