Skip to content

Support OpenCode model rosters and empty-run continuation - #78131

Merged
pelikhan merged 7 commits into
mainfrom
copilot/opencode-per-agent-rosters
Nov 15, 2026
Merged

pelikhan merged 7 commits into
mainfrom
copilot/opencode-per-agent-rosters

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

OpenCode configured only the lead model, preventing per-agent model selection. Clean runs that ended without safe output also completed successfully without delivering anything.

  • Model roster: Read comma-separated GH_AW_OPENCODE_MODELS, trimming and deduplicating entries while always including the lead model. All roster models use the existing proxy and provider policy.
  • Session continuation: When the run exits successfully with no safe output, continue the captured session up to two times, using a prompt to finish with the task’s safe-output call. Nonzero exits, max-turns hits, existing output, and missing session IDs are not continued.
env:
  GH_AW_OPENCODE_MODELS: "fast-model,review-model"

@pelikhan

Copy link
Copy Markdown
Collaborator Author

@copilot enable opencode in a few model agentic workflows in the repo

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@pelikhan pelikhan changed the title [WIP] Add per-agent model rosters and session continuation support Support OpenCode model rosters and empty-run continuation Nov 15, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 15, 2026 21:25
Copilot AI adaptive review requested due to automatic review settings November 15, 2026 21:25
@pelikhan

Copy link
Copy Markdown
Collaborator Author

@copilot migrate a few more AWs to using open code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The turn-limit gate can permit additional model steps after the budget is exhausted and still report success, leaving a critical budget-enforcement issue unresolved.

1 open issue
What changed in this PR

This PR extends gh-aw’s shared OpenCode engine to support per-agent model selection and bounded continuation of runs that finish without safe output, addressing #78126.

Changes:

  • Adds a trimmed, deduplicated model roster through GH_AW_OPENCODE_MODELS, retaining the lead model and existing proxy policy.
  • Adds up to two session continuations for eligible empty runs, with shared event handling.
  • Documents the behavior, adds unit coverage, and refreshes three generated workflows.
File Description
actions/​setup/​js/​opencode_workflow.test.cjs Tests roster parsing, continuation limits, and skip conditions.
.github/​workflows/​smoke-opencode.lock.yml Incorporates the updated harness and workflow hashes.
.github/​workflows/​shared/​opencode.md Implements and documents model rosters and session continuation.
.github/​workflows/​engine-conformance-opencode.lock.yml Incorporates the harness changes into conformance testing.
.github/​workflows/​daily-security-red-team.lock.yml Incorporates the updated harness and associated hashes.

Review effort: Balanced (dynamic)

stdin: prompt,
});
for (let nudge = 1; nudge <= 2; nudge++) {
if (result.exitCode !== 0 || maxTurnsHit || hasSafeOutputs() || !sessionID) break;
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Copilot AI commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

@copilot enable opencode in a few model agentic workflows in the repo

Migrated three model-driven workflows to the shared OpenCode engine and regenerated their locks in 46e8e3d.

@copilot migrate a few more AWs to using open code

Added three more workflows to the shared OpenCode engine, preserving their configured models/providers; locks are regenerated in 46e8e3d.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (.github/workflows/shared/opencode.md:253): address unresolved feedback - Review comment

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "46e8e3d28b15f5f0ccc2f25eeeeff5443bb182c7",
  "kind": "requested",
  "schema_version": "1",
  "state": "1aead506618e1d5d657a16fea7c4be7d20f36e780315bd39b40249727ffae949",
  "work": [
    "7c00201c9317af950d08d005ea009283deddd52fd7c797bd0591918e4f9e4cdd"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

gh-aw-bot and others added 2 commits November 15, 2026 22:26
…agent-rosters

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Copilot AI requested a review from gh-aw-bot November 15, 2026 23:14
@pelikhan
pelikhan merged commit aea9a5b into main Nov 15, 2026
33 checks passed
@pelikhan
pelikhan deleted the copilot/opencode-per-agent-rosters branch November 15, 2026 23:48
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.0

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.

OpenCode engine: per-agent model rosters and session continuation when a run stops before safe output

4 participants