Skip to content

deprecate: make ak run the canonical executor - #84

Merged
pacphi merged 1 commit into
mainfrom
docs/opencode-routable
Jul 29, 2026
Merged

deprecate: make ak run the canonical executor#84
pacphi merged 1 commit into
mainfrom
docs/opencode-routable

Conversation

@pacphi

@pacphi pacphi commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

ak dual remains temporarily for existing Claude+Codex scripts, including its legacy escalation behavior; #83 tracks migrating or retiring that capability before removal.

Validation

  • pnpm run check

@pacphi
pacphi merged commit 6347d1a into main Jul 29, 2026
11 checks passed
@pacphi
pacphi deleted the docs/opencode-routable branch July 29, 2026 07:52
robertelee78 added a commit to robertelee78/agentic-kit that referenced this pull request Jul 29, 2026
…tract comment

The adapter has been the ak run path for opencode workers since pacphi#82/pacphi#84;
the comment was false in a security-sensitive adapter (swarm architecture
finding).
pacphi pushed a commit that referenced this pull request Jul 29, 2026
…settled terminal stream (#85)

* fix(execution): opencode serve protocol — object-shaped model post + settled terminal stream

Found by the #76 three-host live smoke, where every opencode worker failed
and the CLI then crashed:

1. prompt_async 400s: the adapter posted the configured model as a bare
   string, but opencode serve's schema expects {providerID, modelID} or
   null ("Expected object | null, got \"opencode/kimi-k3\" at
   [\"model\"]" — verified against serve 1.18.8). provider/model strings
   are now split on the first slash into the schema object (model ids may
   contain slashes); a model with no provider prefix is omitted so the
   server's own configured default applies — never a guessed provider.

2. Process crash after the failure verdict: when the prompt post threw,
   launch() stopped the owned server but left the terminal SSE promise
   unconsumed; its socket-close rejection surfaced as an unhandled
   rejection (TypeError: terminated, UND_ERR_SOCKET) that killed node
   AFTER the run verdict had printed. A no-op second consumer is attached
   at creation — observe() still sees genuine terminal rejections.

Regression tests: serve-shaped model posts (incl. slash-containing model
ids and the bare-id omission), and a 400-prompt teardown asserting no
unhandled rejection while the owned server still receives SIGTERM.

Verified end-to-end: with this fix, the opencode leg of the #76 smoke
completes — ak run feature with all four workers routed to opencode
(kimi-k3) succeeded, produced the sandboxed repo mutation, and emitted
normalized terminal evidence (observed model, provider, durations).

* docs(execution): drop stale 'no command invokes this adapter yet' contract comment

The adapter has been the ak run path for opencode workers since #82/#84;
the comment was false in a security-sensitive adapter (swarm architecture
finding).
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