Skip to content

Drop the opencode serve wrapper when --output-schema lands upstream #407

Description

@czpython

What

The opencode harness starts opencode serve and POSTs one message, because the schema door (format: {type: "json_schema"}) exists only on the server API. The argv side lacks one flag.

Upstream state (verified 2026-09-02):

  • opencode run builds the same Server.Default() app in-process (packages/opencode/src/cli/cmd/run.ts:948) and its prompt payload already accepts formatrun.ts never passes it.
  • feat(cli): add --output-schema flag anomalyco/opencode#17276 adds --output-schema to run. Open since 2026-03-13, no maintainer response, diff no longer applies.
  • Their #25430 tracks retryCount being dead code.

What to do

  1. Submit a fresh, rebased upstream PR with tests (the old diff was ~134 lines on run.ts).
  2. When a release carries the flag: replace the serve-spawn/POST wrapper in backend/druks/harnesses/opencode.py with the flag on opencode run, keep the deadline and the typed-error parsing, delete the port-parse and abort plumbing.

Acceptance

  • Upstream PR submitted and linked here.
  • If merged: the harness invocation is argv-only and the suite passes unchanged.

🤖 Generated with Claude Code

Activity

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