Skip to content

Fail refused ACP models and recover failed initialization - #436

Merged
BunsDev merged 9 commits into
mainfrom
acp-review-repair
Oct 29, 2026
Merged

BunsDev merged 9 commits into
mainfrom
acp-review-repair

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

An ACP server can refuse the explicitly selected model or fail initialization. Model refusal now fails the turn before submitting a prompt, preserving the selected model and RPC diagnostics. Initialization failure clears the failed connection and cached sessions, terminates that child, and allows the next turn to start a fresh server. Child identity guards keep late events from the old process from disconnecting its replacement.

Regression tests exercise both OpenCode and MiMo families, verify zero prompt requests after model refusal, and verify child termination and successful fresh-server retry after initialization failure. Independent review found no blocking findings in these two repairs. At signed head 8db57f5c42af3c101dd7637a06ba254287a39c34, fresh pnpm build && pnpm test passed with exit code 0. This merges landed main afd50ef while preserving the previously reviewed and tested repair tree exactly. These are scripted-process tests; they do not prove live provider inference or runtime permission enforcement. A change of head requires refreshed validation.

This follow-up does not resolve the separate permission-policy findings involving inherited agents, delegated sessions, MCP/custom tools and approval delivery. Provider expansion approval remains pending. BunsDev closed #408 after #432 merged, recording the delivered backend support. That closure does not resolve the separate review findings described here; this repair does not claim complete runtime permission qualification.

Refs #408 and #432.

Hosted CI on 8db57f5: Run 40764795777 attempt 1 ended cancelled when the macOS job reached its 45-minute limit. Before cancellation, the cold transcript performance test failed: five samples were 2046.5, 2019.2, 1506.6, 2485.7 and 1583.5 ms, with a 2019.2 ms median against the unchanged 500 ms gate. The desktop suite did not finish and the site suite did not run. The iPhone job passed 43 tests. The cancelled run log and artifact 12853390008 were archived, and ZIP integrity passed. No retry has been requested; this performance failure still needs diagnosis.

An exact-candidate local diagnostic rebuilt 8db57f5 and collected a renderer CPU profile and Chromium timeline without changing tracked source or the acceptance gate. Its single cold open measured 234.2 ms, with a 187 ms maximum renderer task and all 1,400 items rendered; the long thread was not selected at launch. The local timeline recorded 36.1 ms of layout and sampled scroll-follow code, but it did not reproduce the hosted slowdown. This single profiled launch includes instrumentation overhead and is not the five-launch acceptance test. Renderer source and the measurement fixture are unchanged from base afd50ef; the repair changes ACP backend code, its unit tests and documentation. The failing hosted run has long-task receipts but no CPU/layout trace or host-load measurements sufficient to establish the cause. The original failure remains unresolved, and no hosted retry has been requested. Raw profiles and the diagnostic source manifest are retained under modex-land-and-prune/acp-exact-profile*.

Signed integration head 78b337db9f9d04e9b0e19f6297f1d71cdf7bcd11 merges current main f03a012. The only merge conflict was in docs/status.md; the reviewed ACP implementation, regression tests and OpenCode documentation remain unchanged. Fresh build/unit validation passed with 2,244 passes, 26 skips and zero failures or cancellations. Full root E2E passed with 474 desktop tests, seven skips and seven site tests, exit 0; the five-launch transcript median was 132.8 ms on Apple M5 Max, 18 cores. This integration includes newly landed Code Review, Markdown, local-model and acceptance changes and requires fresh hosted validation. It is not a fix or explanation for the original hosted performance failure, which remains recorded above. The PR remains draft pending current-head hosted and protected delivery checks.

Hosted integration run 40792841673 completed successfully on 78b337db9f9d04e9b0e19f6297f1d71cdf7bcd11: 477 desktop E2E passes, four skips and seven site passes. Its cold-open samples were 515.4, 512.5, 376.4, 433.6 and 448.8 ms; the 448.8 ms median passed the unchanged 500 ms median gate on Apple M1 (Virtual), three cores. The iPhone and coverage jobs also passed. This result does not explain the original hosted slowdown. After preserving the completed run log, signed head 2f8e62d95a5f6e6f3f2605bb226973bc712d11a4 integrates main 33a7820 to resolve the documentation conflict introduced by #439. Only docs/status.md differs from the tested head; fresh build/unit validation passed again with 2,244 passes, 26 skips and zero failures or cancellations. The prior full local E2E covers the identical application/test/build tree; it was not repeated for this documentation-only integration. Fresh hosted checks on the new head and protected queue validation remain required.

Current-head hosted validation passed at 2f8e62d95a5f6e6f3f2605bb226973bc712d11a4: CI 40797054898 completed successfully with 477 desktop tests passed, four skipped, seven site tests passed and 43 iPhone tests passed. The unchanged transcript budget passed with median 401.3 ms against 500 ms on Apple M1 Virtual (three cores); samples were 425.1, 401.3, 464.9, 351.1 and 375.7 ms. Native Windows/Linux run 40797054782 also passed. This validates the current candidate; the earlier performance failure remains recorded above and its cause remains unproven.

BunsDev and others added 7 commits October 28, 2026 12:57
Two new thread backends drive the OpenCode CLI and Xiaomi's MiMo Code fork
through their Agent Client Protocol server (`opencode acp --pure`,
`mimo acp --pure`), the way Codex runs through `codex app-server`: one shared
server per backend, a session per thread as the resume handle,
`session/request_permission` answered through Modex's approval cards, rules and
policies, and Stop as `session/cancel`.

Modex's modes are agents injected inline through the CLI's config variable:
Chat denies edits, Agent allows them, Full access asks nothing, Plan pins the
built-in plan agent. A refused mode fails the turn. Settings gets cards,
verified executable overrides and default models for both; health reads
`auth list`'s credential count and the model list is `<cli> models`.

Not wired: confined Code Review turns (refused), Modex's knowledge, Space and
image tools, question cards, efforts in the model list.

Accepted live on OpenCode 1.19.5 and MiMo Code 0.1.16 (docs/opencode.md,
docs/reviews/2026-10-28-opencode-*.json, -mimo-acp.json). AGENTS.md's CLI-only
rule now names all four CLIs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A stubbed or older backends:health result has no opencode/mimo entries; the
executable-path rows now read them optionally instead of throwing and taking
the Coding CLIs section down. The stale-account e2e counts all four cards.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 29, 2026 12:54am UTC

Request Review

@github-code-quality

github-code-quality Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main 33a7820 acp-review-repair 2f8e62d +/-
66% 66% 0%
View coverage of the 1 most impacted file.
File main 33a7820 acp-review-repair 2f8e62d +/-
apps/desktop/sr...backends/acp.ts 91% 92% +1%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 29, 2026 01:33 UTC

@BunsDev
BunsDev marked this pull request as ready for review October 29, 2026 22:41
@BunsDev
BunsDev added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 469c612 Oct 29, 2026
13 checks passed
@BunsDev
BunsDev deleted the acp-review-repair branch October 29, 2026 23:24

This branch was successfully deployed

1 active deployment
Preview — 2f8e62d9 Deployed Oct 29, 2026 by vercel[bot]
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.

open code/mimo code support

2 participants