Repository navigation
Resolve the running model for Codex and ACP default launches - #910
Conversation
Codex now updates the local AgentInstance.Model when it resolves (was server-only), so a local Codex row shows its model chip. ACP runtimes report the handshake's current model when nothing was requested — only then, so a requested-but-unmatched model still reports null. Claude PTY default launches remain the known best-effort gap. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR Summary by QodoResolve models for Codex and default ACP launches
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
1.
|
The local Codex model update now runs only on the PTY path (no handshake model) and never writes the 'default' sentinel, so an app-server Codex keeps its confirmed model. On ACP reconnect, a default launch refreshes its model from session/load instead of keeping the stale startup value. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reconnect keeps its prior model behavior: surfacing a session/load model change would need the orchestrator to re-read the runtime and pulse status, which is out of scope here. ResolvedModel's contract doc now covers the no-request current-model case. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Closes #899 — AI-2717
What & why
The rail's model chip (PR #904) only showed for Pi, because Pi was the only vendor whose local status carried a model on a default launch. This resolves it for the rest, best-effort:
AgentInstance.Model(it was reported to the server only), so a local Codex row shows the chip.session/newresult already carries.Claude PTY default launches (no model requested, no handshake to read) stay blank — the accepted best-effort gap.
Where to look
The ACP fallback fires only when nothing was requested, so a requested-but-unmatched model still reports
null— the signalEmitModelFallbackNoteand registration depend on.AgentInstance.Modelbecame settable (shadowing the positional param) and is written only throughSetResolvedModel, which pulses the local status frame the waySetResolvedTitledoes.Verification
dotnet build Capacitor.slnx→ 0 warnings; CLI and daemondotnet publish -c Release→ no IL2026/IL3050. Tests: AcpSessionModelListTests 25/25 (new: current-model extraction, both shapes + precedence + null), AcpHostedAgentRuntimeModelSelectionTests 8/8 (new: default launch exposes the handshake current model, no set_* sent), AgentStatusSnapshotTests 19/19 (new:SetResolvedModelupdates the snapshot), AgentOrchestratorVendorTests 61/61 (Codex model now also on the local frame).