Repository navigation
Agents need only a minimum version for chat; newer releases and prereleases keep working - #30393
Conversation
…releases and prereleases run OpenCode chats accepted only the 1.x and 2.x lines and Pi only 0.x and 1.x, every prerelease was refused, and a slow or failed --version run counted as unsupported. A new major would open as a terminal and existing chats said "Orca can't run this agent in a chat here." Each agent now lists ascending minimum versions; a version must reach the latest one on or below its own major line, compared by semver. The check answers ready, too old, unknown (slow, failed or wordless run) or missing (did not start). Only too old refuses a launch, as Codex already did, with "<Agent> X is too old for chats. Update to Y or newer." carried in a new optional refusal fact agentInstallation; Codex keeps sending codexInstallation for older clients. Codex's reader and error fold into the same check.
…nt-version-floor # Conflicts: # src/main/acp/acp-launch-specs.ts # src/main/acp/acp-model-catalog-probe.test.ts # src/main/acp/acp-model-catalog-probe.ts # src/main/acp/acp-structured-launch-resolution.ts
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🔵 Low · up to
|
#29074 landed a per-agent "is this version string supported" predicate and a supported/unsupported/inconclusive observation for the + menu's agent health snapshot. Keep one version policy: an agent's launch check now returns the shared minimum-version result (ready, tooOld, unknown, missing), create support runs anything but tooOld or missing, and the health snapshot reads ready as available, tooOld as refused and anything else as unknown.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ffe12be7-49c9-41bb-8b2f-dfa8c61ec5fe
📒 Files selected for processing: 55
src/main/acp/acp-launch-specs.tssrc/main/acp/acp-model-catalog-probe.test.tssrc/main/acp/acp-model-catalog-probe.tssrc/main/acp/acp-structured-context-clear.test.tssrc/main/acp/acp-structured-launch-resolution-omp.test.tssrc/main/acp/acp-structured-launch-resolution-opencode.test.tssrc/main/acp/acp-structured-launch-resolution.tssrc/main/acp/acp-structured-launch-visuals.test.tssrc/main/acp/acp-visuals-skill.tssrc/main/agent-cli-version-probe.test.tssrc/main/agent-cli-version-probe.tssrc/main/codex/codex-cli-installation-error.tssrc/main/codex/codex-minimum-version.test.tssrc/main/codex/codex-structured-thread-open.tssrc/main/native-chat/agent-cli-installation-error.tssrc/main/native-chat/agent-session-wire/structured-agent-session-codex-version-recovery.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-failed-create-refusal.tssrc/main/native-chat/agent-session-wire/structured-agent-session-failure-text.tssrc/main/pi/rpc-configured-default.test.tssrc/main/pi/rpc-launch-resolution.test.tssrc/main/pi/rpc-launch-resolution.tssrc/main/pi/rpc-model-catalog-probe.test.tssrc/main/pi/rpc-model-catalog-probe.tssrc/main/pi/rpc-runtime-metadata.tssrc/main/pi/rpc-runtime-registration.test.tssrc/main/preflight/codex-cli-installation.test.tssrc/main/preflight/codex-cli-installation.tssrc/main/preflight/codex-workspace-relative-path.test.tssrc/main/runtime/scripted-codex-transport.test-fixture.tssrc/main/runtime/structured-agent-availability.test.tssrc/main/runtime/structured-agent-availability.tssrc/main/runtime/structured-agent-launch-support.test.tssrc/main/runtime/structured-agent-launch-support.tssrc/main/runtime/structured-agent-model-catalog-discovery.test.tssrc/main/runtime/structured-agent-runtime-metadata.tssrc/main/runtime/structured-agent-runtime-registration-types.tssrc/main/runtime/structured-agent-session-transport-overrides.tssrc/renderer/src/components/native-chat/agent-session-availability-words-text.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/agent-cli-installation-problem.tssrc/shared/agent-session-failure-copy.tssrc/shared/agent-session-failure-words.test.tssrc/shared/agent-session-failure-words.tssrc/shared/agent-session-refusal-details.tssrc/shared/agent-session-refusal-notice.tssrc/shared/agent-session-visible-failures.tssrc/shared/agent-session-write-failure.tssrc/shared/codex-cli-installation.test.tssrc/shared/codex-cli-installation.ts
💤 Files with no reviewable changes: 1
- src/main/preflight/codex-cli-installation.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
…create support and the agent health snapshot run the one shared check
… is known too old instead of unreadable
#30713's OMP listing session uses the shared version check this branch already calls; its test reads the version through the reader signature.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Reserve missing for an ENOENT startup failure. · agent-cli-version-probe.ts:78
src/main/agent-cli-version-probe.ts:78
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReserve
missingfor anENOENTstartup failure.
readAgentCliVersioncurrently marks everyrunProcessrejection asstarted: false. If the installed CLI rejects withEACCES,EPERM, or another error,checkAgentCliVersionreportsmissinginstead ofunknown. This prevents the normal launch path for an installed CLI whose version check failed.Return
started: falseonly when the startup error has codeENOENT. Return{ version: null }for other startup errors.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
6f0c96d0-e614-40b5-ba5b-1f62baa3b1b7
📒 Files selected for processing: 13
src/main/acp/acp-launch-specs.tssrc/main/acp/acp-model-catalog-probe.test.tssrc/main/acp/acp-model-catalog-probe.tssrc/main/agent-cli-version-probe.test.tssrc/main/agent-cli-version-probe.tssrc/main/agent-hooks/server/server-status-application.tssrc/main/agent-hooks/server/server-status-update.tssrc/main/daemon/pty-subprocess-spawn-file-foreground.test.tssrc/main/daemon/terminal-host-process-inspection.test.tssrc/main/github/github-remote-identity-parsing.test.tssrc/main/providers/local-pty-child-process-verdict.test.tssrc/main/providers/local-pty-provider-foreground-process.test.tssrc/renderer/src/i18n/locales/en.json
🚧 Files skipped from review as they are similar to previous changes: 1
- src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
#28046's scripted transports read versions through the shared reader: the Codex override keeps the reader type, and the ACP scripted child answers its version probe with a release above every floor.
Review loop status: done (full path)The problem. Orca only let a fixed list of agent versions run as chats: OpenCode 1.x–2.x, Pi 0.x–1.x, no prereleases. A version it couldn't read also counted as unsupported. So the day OpenCode 3.0 or Pi 2.0 ships, new chats with it fall back to a terminal, existing chats say "Orca can't run this agent in a chat here." (naming neither the agent nor a fix), and every new major needs an Orca release. What changes for users. Each agent has only a minimum version; anything newer runs, prereleases included. A version Orca can't read no longer blocks the chat. A version that really is too old gets a named, fixable message in the chat, which stays resumable: "OpenCode 1.18.19 is too old for chats. Update to 1.18.31 or newer." The + menu reads the same check, so a too-old agent's chat row is disabled and its terminal row stays available. Fixed during review
Deferred / labelled
Verified
For Brennan's review
Places where a human call matters:
Main was merged and checked at 86d8284: all six translations retain the minimum-version and both startup-timeout messages, the timeout rendering still resolves, and no old message key or maximum chat version was reintroduced; 18 named test files passed (300 tests), and full CI passed on this head. |
…nt-version-floor # Conflicts: # src/renderer/src/i18n/locales/en.json # src/renderer/src/i18n/locales/es.json # src/renderer/src/i18n/locales/fr.json # src/renderer/src/i18n/locales/ja.json # src/renderer/src/i18n/locales/ko.json # src/renderer/src/i18n/locales/zh.json # src/shared/agent-session-failure-copy.ts
…nt-version-floor # Conflicts: # src/main/codex/codex-cli-installation-error.ts # src/main/codex/codex-minimum-version.test.ts # src/main/pi/rpc-session.ts # src/main/runtime/structured-agent-availability.test.ts






ELI5
Orca only let OpenCode 1.x–2.x and Pi 0.x–1.x run as chats, refused every prerelease build, and treated a slow or failed version check as "unsupported". So the day OpenCode 3.0 or Pi 2.0 ships, new chats with it would fall back to a terminal (or a bare shell when opening an empty workspace automatically), existing chats would say "Orca can't run this agent in a chat here." (which names neither the agent nor a fix), and every new major version would need an Orca release.
Now each agent has only a minimum version. Anything newer runs, prereleases included. A version check that is slow or fails means "can't tell", so the chat runs. When a version really is too old, the chat says so by name: "OpenCode 1.2.0 is too old for chats. Update to 1.18.31 or newer."
What Changed
Before → after, as the user sees it
--versionexiting non-zero or printing no version: a prompt result was refused → the chat runs. Slow local checks can already open a provisional chat after the existing 3-second admission timeout; this change lets startup proceed when the later version result remains unreadable. If the agent really cannot start, its own start failure says so.Mechanism
isStableCliVersionOnLine,isStableCliVersionFrom, the OpenCode and Pi release-line tables) are replaced by one rule: each agent lists ascending minimum versions, and a version must reach the latest one on or below its own major line. A later major needs no entry. Comparison follows semver, so3.0.0-beta.1passes and2.0.14-rc.1does not.1.18.31,2.0.14(2.0.14 is the first 2.x verified to start its private server child with the chat's account), OpenCode 22.0.14, OMP17.0.5, Pi0.84.0, Codex0.136.0.agent_session_operation_invalid/attachFailedwith a new optional factagentInstallation: {agent, installedVersion, minimumVersion}, the same refusal Codex already used. Codex refusals also keep sending the oldercodexInstallationfact. The messagecodexCliTooOldbecomescliTooOldwith the agent's name in every locale.Why
A list of approved releases fails the day an unlisted release ships, and folding "can't tell" into "unsupported" makes the route flip between chat and terminal on a slow machine. The common pattern is a minimum version only, an unreadable version that never counts as too old, and a too-old message naming the agent, the installed version and the needed one. Orca's Codex path already did this, so this change reuses it for every agent instead of adding the next major line.
Alternatives considered:
initializeprotocol version instead of the CLI version. Rejected: the minimums encode behaviour the handshake doesn't report (Pi has no handshake, Pi below 0.84 never sends the event a chat turn waits on, OMP below 17.0.5 can't serve ACP), so the version floor stays. The handshake check is unchanged.Differences from the common pattern
--version) lets the chat start, and lets the agent's models be listed. Some implementations of the common pattern instead show the agent as unavailable, or refuse the model listing, until a version is read. Orca follows the variant that blocks only a version it knows is too old, so a slow machine can't flip a chat between chat and terminal from one start to the next; if the agent really can't run, its own start or listing failure says so.--versionalso fails would now run as a chat. Both need an old binary whose version check also breaks.Review scope and size
Against the main commit integrated into this branch (
90e99c48f4317f581258c967f7a5879a1332b681), the PR changes 618 production lines (including locale catalogs) and 536 test/fixture lines, excluding seven files the repo's pre-commit formatter reformatted while merging main (server-status-application.ts,server-status-update.tsand five test files: whitespace only,git diff -wis empty, no behavior). Version-check metadata declares each agent's minimums, and the shared check serves create support, launch and the host's agent snapshot.Mixed versions and saved data
agentInstallationis a new optional field, both on the wire and in a chat's saved refusal facts. Older clients and builds keep only the facts they know, so they drop it and show their generic start failure for that agent.codexInstallation, so older clients' Codex text is unchanged.codexInstallationstill read as Codex's message.Hosts
Linked Issue
N/A (maintainer). Tracked in the native-chat audit.
Visual Proof
Real Orca test copies, main vs this branch, same inputs, with real agent installs (macOS and Windows). Final head
adf33ec; main =90e99c48.A too-old OpenCode in an existing chat (Windows, real OpenCode 1.18.19 set as the agent's command, after a relaunch). Main tells you to abandon the chat; the branch names the installed and required versions and keeps the chat.
After pointing the command back at a supported OpenCode (1.18.34), the same chat replies on both (branch on the right):
Pi 0.73.1 in the + menu (macOS, real Pi that prints its version only on stderr; Pi below 0.84 can't run a chat). Main offers the chat row and clicking it opens a failed chat; the branch disables the chat row and offers Pi in a terminal.
Codex chat start, relaunch and resume behaved the same on both builds on both machines (branch shown):
Testing
Tests cover the minimum rule (later majors and prereleases pass, the floor's own prerelease doesn't), unknown versus missing versus too old, OpenCode, OMP and Pi launches with too-old, newer and unreadable versions, Codex on the shared check, and the too-old sentence for a new refusal and for one saved by an older build.
AI Disclosure
Review
Agent skill upstream boundary
Notes
Author: @BrennanKB5