feat: add Codex ACP backend - #5349
Conversation
|
Head branch was pushed to by a user without write access
2ccf5c2 to
0e0c3f3
Compare
0e0c3f3 to
c50ef53
Compare
e096cd7 to
adec4f4
Compare
adec4f4 to
cb22349
Compare
GPT 5.6 Review (fork) — 🔴 changes requested (blocking)Reviewed BLOCKING -- src/kiro_crew/platform/defaults.py:44 -- Codex dispatch alters the Kiro construction path
|
Add Codex as a selectable ACP harness while preserving Kiro as the default. Keep ACP imports lazy so configuration loading remains cycle-free, expose backend selection in dashboard settings, and cover the backend, registry, and localized tab-label paths with regression tests.
2657ad7 to
b56fdf2
Compare
|
Re: GPT 5.6 Review BLOCK-MERGE on Same finding as the prior round (see comment above at Standing on the prior rebuttal: H13 explicitly names the No code change proposed; treating this as a persistent false positive from the review lane, not a new finding. |
|
Full-diff overlap audit (current head These are not patch-identical, but they should not both land as independent backend models. Please treat #6307's registry/descriptor/admission design as the integration base, then port any #5349-only Codex UX, resolver diagnostics or tests that remain valuable and supersede this special-case path. #6390 is a related architecture decision (per-crew arbitrary command/env interfaces), not a Codex duplicate; its selection granularity must also be reconciled with the registry rather than mechanically stacked. |
|
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]: This PR has been stale with failing CI. I reviewed the blockers but they require input beyond automated triage:
When these are addressed, the pipeline will re-assess on its next cycle. |
Audit note — three open PRs are building the same ACP-harness seamThis is a consolidation request, not a duplicate finding: #5349, #6307 and #6777 What the audit verified by reading all three merge-base diffs:
Why this needs a decision rather than a merge orderThe three collide inside the same functions, not merely in the same files, and each pins its Two things must not be lost whichever design winsFrom #5349, carry before consolidating: (1) website/src/pages/settings/AiBackendPanel.tsx plus website/src/test/AiBackendPanel.test.tsx -- the Settings -> System -> AI Backend picker with per-backend descriptions and the restart/new-chat disclosure (aiBackendPanel.restart_new_chats_description), together with its command-palette wiring in website/src/components/commandPalette/settingsRegistry.gen.ts and settingsTabLabel.ts; this is closer to the maintainer's 'the provider switch has its own page, keep consistent with the internal version' than #6307's preview-gated Developer -> ACP Adapters tab (AcpBackendCard.tsx). (2) src/kiro_crew/dashboard/kiro_readiness.py::running_backend_requires_kiro_prerequisite -- keep its fail-closed rule (an absent or unknown backend still demands kiro readiness) as the behaviour #6307's live resolver must preserve. (3) src/kiro_crew/cli_doctor.py's actionable codex rows ('Codex ACP adapter not found', Fix: npm i -g @agentclientprotocol/codex-acp), folded into acp/doctor.py::_report_adapter, and reused as the basis for the missing agent_sdk/backend_install.py codex probe that landed main names as codex's selectability blocker. (4) From test/test_acp_backend_codex.py, the design-independent cases only: codex advertised-model gating, session/new MCP descriptor wiring, session resume, and the auth-required / readiness boundary. Do NOT carry CodexAcpClient, CodexAcpProvider / create_codex_provider_factory, the create_factory codex branch, the ACP_BACKENDS_SELECTABLE edit, CODEX_EFFORT_CONFIG_ID = 'reasoning_effort', or the restart-only SessionManager.acp_backend snapshot -- each is superseded by, or contradicted by, landed main. One security-relevant noteNothing needs harvesting for a closure - neither PR is closed. For the consolidation, two items must not be lost whichever design wins. From #6307: src/kiro_crew/acp/opencode.py's ensure_routed_settings() with PERMISSION_ASK / PERMISSION_BYPASS_VALUES, which writes Suggested next step: a maintainer picks the seam design (the registry-dispatch shape vs. the From a repository-wide duplicate/overlap audit of every pull request open against |
Open PR relationship auditThis is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion. Relationship findings
No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit. |
|
@llamojha Thanks for this, and sorry for the long wait. This should not be closed, but it does need re-scoping. The Codex selection half has since landed on main through #6593, #7813, #7963, #8684 and #8791. Codex is already in What is genuinely not on main is the runtime behaviour of a Codex gateway, and that part is worth landing. Could you rebase onto main and narrow this to that remainder, expressed against main's live-config model? Please also drop Posted from the 2026-09-08 open-PR relationship audit (read-only, one auditor per PR); reply here if any of this is wrong. |
Problem / Motivation
Kiro Crew public builds currently start new chats through the Kiro ACP harness only. Users who already use the Codex CLI cannot select its ACP adapter from the dashboard while keeping the existing
agent.provider = "acp"contract.Why it matters
A selectable Codex harness lets users use their existing local Codex setup without introducing a second provider abstraction or weakening Kiro's default behavior and security boundaries. Persisted backend changes also need a clear restart/new-chat boundary so they cannot silently alter already-running sessions.
What changed (motivation → approach → change)
Kiro remains the default, first-class ACP backend. Codex is added as an adapted harness selected through
agent.acp_backend, with selection occurring only at the provider-registry seam.CodexAcpClientandCodexAcpProviderfor Codex transport, lifecycle, model discovery/selection, MCP descriptors, auth diagnostics, and capability handling.SessionManager, so model listing, usage reporting, and readiness follow the active gateway runtime rather than a pending persisted switch.Tests
213db2e56, focused Codex/harness/trust-read/i18n-style tests pass.git diff --checkpassed.Manual verification
15476.5476and production data were not touched.Screenshots / video
The AI Backend selector, showing Settings → System → AI Backend with the ACP backend dropdown expanded (Kiro selected, Codex and Kiro Agent Server available):
Related Issues
no linked issue: this feature was developed directly and does not resolve a filed issue.
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)