Skip to content

feat(acp): promote next implementation#29929

Merged
nexxeln merged 1 commit into
devfrom
nxl/promote-acp-next
May 29, 2026
Merged

feat(acp): promote next implementation#29929
nexxeln merged 1 commit into
devfrom
nxl/promote-acp-next

Conversation

@nexxeln

@nexxeln nexxeln commented May 29, 2026

Copy link
Copy Markdown
Member

Summary

  • promote the ACP next implementation as the production opencode acp server
  • remove the legacy ACP branch, runtime flag, and old ACP files
  • move ACP next unit and subprocess coverage onto the production ACP paths

Validation

  • bun typecheck from packages/opencode
  • bun test test/acp test/cli/acp --timeout 60000 from packages/opencode
  • bun turbo typecheck via pre-push hook

Closes #15675
Closes #16371
Closes #17285
Closes #24815
Closes #24846
Closes #25836
Closes #29785
Closes #29924
Closes #4240
Closes #6002
Closes #24481

@nexxeln nexxeln marked this pull request as ready for review May 29, 2026 19:56
@nexxeln nexxeln merged commit 4cc166a into dev May 29, 2026
11 checks passed
@nexxeln nexxeln deleted the nxl/promote-acp-next branch May 29, 2026 20:04
tranngoclai pushed a commit to tranngoclai/opencode that referenced this pull request May 30, 2026
zeroliu added a commit to logancyang/obsidian-copilot that referenced this pull request Jun 4, 2026
…lder (#2557)

* fix(agent-mode): support opencode 1.15.13 config-options model API; force-upgrade older opencode

opencode 1.15.13 (anomalyco/opencode#29929 "promote next ACP implementation")
dropped the dedicated ACP `models` state and moved the model catalog into a
`category:"model"` config option. The plugin only read `models`, so against
1.15.13 the picker showed BYOK models as "Not offered by agent" and the
current model as a raw provider UUID that failed to run.

Derive the catalog from the `category:"model"` config option when `models`
is absent and route switching through `session/set_config_option` (via a new
ModelState.apply spec). Pin the managed binary to 1.15.13 and prompt users on
older opencode to upgrade — managed reinstall or `opencode upgrade` for custom
binaries — from both the chat view and the configure dialog.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-mode): handle opencode config-option effort

* feat(agent-mode): prefetch opencode per-model effort options for the picker

opencode ≥ 1.15.13 advertises its catalog via a `category:"model"` config
option whose entries carry no per-model effort; effort is a sibling
`category:"thought_level"` option opencode only surfaces for the *active*
model. So `translateBackendState` could only attach effortOptions to the
current model, leaving every other picker row with no effort stepper until
it was selected.

Eagerly, right after a session's catalog loads, probe each enabled model
once to learn its effort and cache it for the picker. The probe loop reuses
the existing warm probe session (a model switch is ~ms; creating a session
is ~1s) and runs before the warm entry is published, restoring the original
model in a finally — so the session the manager adopts is never left on a
probed model (race-free). opencode-only via a new optional descriptor hook
`prefetchEffortCatalog`; other backends are untouched.

- descriptor.ts: add optional `prefetchEffortCatalog` to BackendDescriptor
- opencode/descriptor.ts: implement it (skip missing-key models, swallow
  per-model errors, restore original; frozen EMPTY_EFFORT_CATALOG)
- AgentModelPreloader: effortCatalog cache + getEffortCatalog + run prefetch
  in runProbe before publishing warm; clear on clearCached/shutdown
- AgentSessionManager: getEffortCatalog passthrough
- agentModelPickerHelpers: buildEffortOptionsByModelKey falls back to the
  prefetch cache for non-active rows (live effort wins for the active model)
- useAgentModelPicker: include the effort-catalog in the picker re-render signal

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-mode): re-probe effort catalog on restart with an active session

Enabling a new model restarts the backend, but when the active chat tab was
on that backend, restartBackendNow recreated the session without re-probing.
clearCached had already wiped the per-model effort catalog, and a live
session's attachModelCacheSync mirrors catalog state but not the effort
catalog — so effort steppers vanished for every model until a plugin reload.

Couple restart with probing: for an installed backend, always run the
preloader probe (which re-runs the effort prefetch). When a tab on the
backend is active, await the probe and let the replacement session adopt the
warm proc — still a single spawn, with the per-model switch flicker kept on
the throwaway probe session. The only restart-without-probe case left is an
uninstalled backend, which runProbe already self-guards.

Also reformats one unrelated builtinSkills test line via `npm run format`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment