Skip to content

fix: select OpenCode build agent for workers - #1279

Open
osantis wants to merge 4 commits into
kunchenguid:mainfrom
osantis:fm/opencode-worker-agent-upstream-20260729
Open

fix: select OpenCode build agent for workers#1279
osantis wants to merge 4 commits into
kunchenguid:mainfrom
osantis:fm/opencode-worker-agent-upstream-20260729

Conversation

@osantis

@osantis osantis commented Jul 30, 2026

Copy link
Copy Markdown

What Changed

  • Select OpenCode’s build agent for ship and scout workers while preserving default-agent semantics for secondmates.
  • Add dispatch-profile coverage for OpenCode ship, scout, and secondmate launch commands.
  • Document the launch behavior and version-scoped OpenCode 1.18.9 verification evidence.

Risk Assessment

✅ Low: Captain, the change is narrowly scoped, preserves secondmate semantics, covers both worker kinds, and aligns documentation with version-scoped evidence.

Testing

The focused spawn suite passed for OpenCode worker, scout, and secondmate launch behavior; live OpenCode 1.18.9 capability output confirmed build (primary), reviewer-visible transcript evidence was captured, the attempted TUI capture was unreadable due to terminal rendering, and the worktree remained clean.

Evidence: OpenCode worker-agent evidence

Rendered launch behavior: ok - opencode workers name the build agent, receive --model, and omit the unsupported effort axis ok - opencode scouts name the build agent and preserve the selected model ok - opencode secondmates preserve officer agent selection while retaining the selected model OpenCode version: 1.18.9 Build agent listing: build (primary)

Rendered launch behavior:
ok - opencode workers name the build agent, receive --model, and omit the unsupported effort axis
ok - opencode scouts name the build agent and preserve the selected model
ok - opencode secondmates preserve officer agent selection while retaining the selected model

OpenCode version: 1.18.9

Build agent listing:
build (primary)
Evidence: Focused test output
ok - no --model/--effort records defaults and types the claude launch instructions
ok - relative home overrides ignore CDPATH and become absolute before spawn launch construction
ok - FM_HOME defaults resolve relative paths and preserve absolute spellings
ok - absolute override spellings are preserved in spawn launch paths
ok - unresolvable relative spawn overrides fail with named diagnostics
ok - active crew-dispatch profile requires an explicit harness for ship spawns
ok - active crew-dispatch profile requires an explicit harness for scout spawns
ok - active crew-dispatch profile allows an explicit resolved harness
ok - active crew-dispatch profile allows the legacy positional harness form
ok - active crew-dispatch profile allows the raw launch-command escape hatch
ok - claude receives --model and --effort profile flags
ok - codex receives --model and model_reasoning_effort profile flags
ok - codex omits unsupported max effort instead of passing a bad config value
ok - grok receives --model and --reasoning-effort profile flags
ok - grok omits unsupported max reasoning effort
ok - grok omits unsupported xhigh reasoning effort
ok - opencode workers name the build agent, receive --model, and omit the unsupported effort axis
ok - opencode scouts name the build agent and preserve the selected model
ok - opencode secondmates preserve officer agent selection while retaining the selected model
ok - pi receives --model and --thinking max profile flags
ok - pi-signed shares Pi launch semantics while preserving its configured and recorded identity
ok - pi-signed refuses safely and actionably when the selected executable is unavailable
ok - pi-signed is a distinct persistent secondmate runtime with shared Pi supervision semantics
ok - batch dispatch forwards shared --harness, --model, and --effort to every pair
ok - claude forwards firstmate's CLAUDE_CONFIG_DIR so the crewmate uses the same credential store
ok - claude omits the config-dir prefix when firstmate runs with the single-store default
ok - non-claude harnesses do not receive the claude CLAUDE_CONFIG_DIR prefix
ok - active crew-dispatch profile does not block secondmate launches
# all fm-spawn-dispatch-profile tests passed

Pipeline

Updates from git push no-mistakes

⏭️ **intent** - skipped

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-spawn-dispatch-profile.test.sh
  • opencode --version
  • timeout 10 opencode agent list | grep '^build '
  • Attempted a 160×50 PTY startup capture with opencode --agent build; the raw TUI stream was not reviewer-readable in this terminal environment.
  • git status --short confirmed testing left the worktree clean.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid

kunchenguid commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Automated reminder: thanks for the PR! This branch currently has a merge conflict with the base branch.

When you get a chance, please rebase onto (or merge) the latest base branch, resolve the conflict, and push. After that, checks will re-run and the PR will get looked at again.

Noted for firstmate#1279 at b6730029.

@osantis
osantis force-pushed the fm/opencode-worker-agent-upstream-20260729 branch from 265d6b9 to 701e5a0 Compare August 1, 2026 02:36
@osantis osantis changed the title fix: select OpenCode build agent for workers fix(spawn): select OpenCode build agent for workers Aug 1, 2026
@osantis osantis changed the title fix(spawn): select OpenCode build agent for workers fix: select OpenCode build agent for workers Aug 1, 2026
@osantis

osantis commented Aug 1, 2026

Copy link
Copy Markdown
Author

Update: the workflows for current head 701e5a0 have completed successfully. All 12 checks pass, and the PR is ready for maintainer review.

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.

2 participants