Skip to content

🐛 contributor relay: opencode tasks fail instantly with "Unrecognized flag: --auto" and the dashboard never says why #19060

Closed

Description

@clubanderson

What happened

A contributor running the ClankeR relay with the opencode backend picked up an issue on a hosted hive and the task failed about one second later. The hub recorded:

headless CLI exited with error: code 1: Unrecognized flag: --auto in command opencode run (backend opencode, failure_kind unspecified, permanent false)

The same contributor also failed another task on a different hive one second after pickup. Every later request from that relay returned no_matching_work (per-issue and per-contributor cooldown), so the contributor saw a failure in the feed and then silence, with no hint of the cause.

Root causes

  1. config/backends.conf hardcodes --auto for opencode (backend_perm_flag and opencode_local_perm_flag_shell). Installed opencode builds whose run does not know --auto exit 1 immediately, so every task fails the same way until the contributor upgrades.
  2. The relay reports that failure with no failure_kind (unspecified), although it is a client environment problem.
  3. failCurrentTask logs only the one-line reason locally; the CLI output tail goes only to the hub in task_failed.tmux_output, so the contributor never sees the CLI's own message.
  4. The public activity feed entry for a failed run has no reason ("hit a snag on ... via opencode CLI"), so neither the contributor nor an operator can tell why.

Claim handling (verified OK)

The failed task was released and the issue returned to the queue; the hub books a per-issue and per-contributor reclaim cooldown. No wedged claim.

Fix

  • Emit --auto for opencode only when the installed opencode accepts it (probe opencode run --help; unchanged when opencode is absent or supports it). The OPENCODE_PERMISSION deny-list still applies.
  • Classify unrecognized-flag/option CLI errors as environment.
  • Print the CLI output tail in the relay's local log on task failure.
  • Carry a scrubbed, bounded reason on "failed" activity entries and show it in the feed.

Not covered here: Claude consent dialog (#19049 / PR #19053).

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 18, 2026
  2. added a commit that references this issue on Nov 18, 2026
    4560050
  3. added a commit that references this issue on Nov 18, 2026
    f4f3849
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

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions