Skip to content

thread: run failed with 'invalid parameters' after burst of empty-argument tool calls #37502

Open

Description

@ImBIOS

Summary

A thread run on a linked remote environment (myrehat-dev) failed with a provider error ("The request contains invalid parameters") after a burst of degraded empty-argument tool calls in the same run (shell/read/edit invoked with {} → "Missing key" / "internal_server_error: The model failed to generate a response"). The failure left real work stranded: a follow-up run is stuck queued, and uncommitted test/spec files sit in a remote worktree.

Environment

  • opencode version: 2.3.0
  • OS: Linux 7.0.0-43-generic (linux x64) — reporter host; failing run was on remote env myrehat-dev.asia-southeast1-a.c.myrehat-dev.internal (linux x64, T3 server 0.1.10-nightly.20261113.4656)
  • Terminal: Unavailable (no TERM_PROGRAM/COLORTERM in reporter env; TERM=xterm-256color)
  • Shell: /bin/zsh
  • Install/channel: latest
  • Active plugins: ecc-universal

Reproduction

Exact repro requires the original remote state, but the observable pattern is:

  1. Open thread 4dfd64cf-1e93-49f3-9365-d5bcd8713a5e on env c78fd245-ab83-4648-9212-5480be266bcf (project 2508cc53-5e3a-42b8-b89e-ea36b02dc94a, provider opencode, model cliproxy-responses/opencode-go/muse-spark-1.3-contributor, full-access).
  2. Run ordinal:4 (requested 2026-11-16T03:41:24Z, started 03:41:24Z) progresses normally for ~85 min (positions 1716–1740: route inventory, spec reads, gh/CI polling).
  3. From ~04:46Z (position 1764 onward) tool calls start arriving with empty arguments: shell with {}, read with {}, edit with {}. Each fails with either Invalid arguments for tool "shell": - command: Missing key or internal_server_error: The model failed to generate a response. Affected itemIds include (prefix turn-item:provider:opencode:native-item:):
    • call_01a1e2adab3f74ff97d86839412971d4 (shell {}, failed)
    • call_01a1e2ae298736969ae15088cf6d0d (shell {}, failed)
    • call_01a1e2ae4325779c848991c99bfe718a succeeded, then call_01a1e2b00c..., call_01a1e2b... etc. alternate success/failure
    • call_01a1e2b61880771b966174dc0ea77abf (read {} → Missing path key, failed), call_01a1e2b... (read with path, succeeded) — bridge flapping, not a code bug
    • call_01a1e2c006457040bf4773ac0cfbd2c5 (edit {}, failed) then immediate retry call_01a1e2c006457040bf4773ac0cfbd2c5-sibling succeeded on same file
  4. At 05:10:08Z the run ends failed with item turn-item:provider:opencode:native-item:terminal-failure:provider:opencode:native-turn:ses_e2d38aa60ffeXQjvMiztTjutMQ%3Aattempt%3Arun-attempt%3Arun%3Arun%253Athread%253A4dfd64cf-1e93-49f3-9365-d5bcd8713a5e%253Aordinal%253A4%253Aattempt%253A1, type error, title Provider error, text: The request contains invalid parameters. Check the request body for any errors or inconsistencies.
  5. Run ordinal:5 (run:thread:4dfd64cf-...:ordinal:5, requested 05:10:08Z) is left queued with body "Background task completed." and never starts (still queued, startedAt: null as of 2026-11-16T05:2xZ).

Expected Behavior

  • Degraded/empty tool invocations should be retried or surfaced as retriable turn errors, not accumulate into a terminal provider failed state.
  • A provider "invalid parameters" error on an in-flight run should not strand the thread: either the run retries with a clean request body, or the queued follow-up run starts.
  • Uncommitted worktree work (/tmp/opencode/nmc-e2e200, branch feat/myr-e2e-complete) should be recoverable/visible rather than locked behind a dead run.

Actual Behavior

  • Run ordinal:4 failed; thread shows queued (ordinal:5 never starts, no activeRunId).
  • ~15+ empty-argument tool failures in positions 1764–1853 precede the terminal provider error, suggesting the request body accumulated invalid state until the provider rejected it.
  • Work at risk on remote: packages/api/src/routers/content.test.ts (new, 8/8 passing locally) and e2e/tests/journeys/dashboard.spec.ts (register-helper fix applied, tsc clean) in /tmp/opencode/nmc-e2e200 (branch feat/myr-e2e-complete from origin/staging @216c589), uncommitted at last observation.

Additional Context

  • Frequency: seen once on this thread; earlier runs ordinal:1–3 (Nov 13–14) completed fine on the same provider/model.
  • Related: e2e/CI work in MyRehat/new-myrehat-com PRs fix: prod builds loads asset files with relative file urls, not from the backend over http #22/Delete orphaned worktree when removing a thread #23 context (100% e2e coverage + CI visual-regression gate); the failed run was extending coverage (dashboard data spec + content router unit tests).
  • Recovery delegated to a child task on the remote env (verify worktree, run unit/tsc/e2e, commit+PR only on green CI, post outcome to thread); this issue tracks the platform bug, not the recovery.
  • No secrets included. Thread/activity evidence pulled via t3_thread_read (views messages + activity, positions 0–1856); statuses via t3_queue list and recentRuns.

Activity

  1. ImBIOS commented on Nov 16, 2026

    @ImBIOS
    ContributorAuthor

    Update: recovery of the failed thread's work completed (PR MyRehat/new-myrehat-com#24 merged, hosts verified 200), but the thread itself still cannot run: follow-up runs ordinal:6, 7 and 8 (triggered by plain user-message sends, including a 5-char message) all fail instantly with the same provider error 'The request contains invalid parameters. Check the request body for any errors or inconsistencies.' The thread is bricked server-side — no new run can execute regardless of message content. Diagnostics in the issue body (empty-arg tool-call burst at 04:46-05:10Z) appear to be the trigger, but the persistent failure suggests corrupted run/request state on the thread. Thread: 4dfd64cf-1e93-49f3-9365-d5bcd8713a5e, env c78fd245-ab83-4648-9212-5480be266bcf.

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