Skip to content

Add the OpenCode Harness - #447

Merged
JacobStephens2 merged 5 commits into
issue-432from
issue-439
Oct 6, 2026
Merged

JacobStephens2 merged 5 commits into
issue-432from
issue-439

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Add OpenCode wherever a Harness can be selected, including [harness.opencode] and Setup. Use the user's provider Model and Effort, link Factory skills and instruction fallback, and recover the final reply and usage from the standalone session export.

Command / Setup
  check Model and Effort before work
    opencode run --standalone --format json --auto
Session / Resume
  same flags + stdin prompt + OPENCODE_DISABLE_AUTOUPDATE=1
  JSONL → progress, session id, skill-load warning
  session export → last assistant text, summed usage/cost, outcome
Interrupt
  stop the process tree, including the private server and shell command

Closes #439

Evidence

  • Before: harness opencode was rejected as an unknown Harness.
    After: 13 OpenCode scenarios cover selection, flags, stdin, environment, Model/Effort checks, Setup, skills, instruction links, export recovery and failures.
  • Before: Interrupting the preflight check could strand its command; token summaries omitted cache-write and reasoning tokens.
    After: The process-tree regression passes, and export parsing sums all assistant token categories and cost while excluding the title call.
  • Final validation: cargo test — 1,166 passed, 0 failed; cargo clippy --all-targets -- -D warnings, cargo fmt --check, and git diff --check all pass.

Test seams

  • Scenario harness: real Commands and Setup against a fake OpenCode CLI, observing argv, stdin, environment, skills, instruction links, logs, delivery, failures and interruption.
  • Pure parsing: documented OpenCode JSONL and export shapes, including a dropped final step_finish, last-assistant text and assistant-only usage totals.
  • Public Harness adapter: Resume invocation with a session id parsed from the stream, verifying stdin, flags and environment.

Review

Standards and Spec reviews use issue-432 at d5261163ca8e34846e397dc783c7f07988067322 as the fixed point. Addressed the shared skill-load policy duplication, interruptible preflight check, complete token accounting and unsupported automatic Resume trigger.

Merge Danger

Door: two-way

No data migration. Reverting removes the OpenCode Harness and its configuration support.

Blast Radius: Harnesses

Adds an OpenCode standalone check before work and shares skill-load warning policy with Muse. Existing Harnesses remain registered.

Unaddressed findings

Standards

  • None.

Spec

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit 58085dc into issue-432 Oct 6, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-439 branch October 6, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant