fix(runtime): don't inherit a foreign model across runtimes (v0.283.0) - #499
Merged
Conversation
Found on the first live attachable Codex session. The fleet runtime default is model="opus"; codex-scout pins no model of its own; so the launcher handed `opus` to Codex, which replied "The 'opus' model is not supported when using Codex with a ChatGPT account." Two holes: 1. The cross-runtime guard only matched full ids (^claude), so bare ALIASES — opus/sonnet/haiku/fable — passed. Patterns are now word-boundary anchored and cover aliases both directions. 2. Nothing validated INHERITANCE. The per-agent config route rejects a foreign model, but the workspace default spans every runtime and so cannot be correct for all of them at once. resolveRuntimeTuning now takes the runtime and DROPS a model that runtime can't run, falling back to the CLI's own default — a working session instead of a dead one. 7 conformance fixtures pin the inheritance matrix. 137/137. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found on the first live attachable Codex session (#496), which came up as:
The fleet runtime default is
model: "opus",codex-scoutpins no model of its own, so the launcher handedopusstraight to Codex.Two holes, both mine
1. Aliases weren't caught. The guard added in #483 matched
^claude, so full ids likeclaude-opus-4-8were refused — but the bare aliases people actually put in the workspace default (opus,sonnet,haiku,fable) went straight through. Patterns are now word-boundary anchored and cover both directions.2. Inheritance was never validated — the bigger one.
PUT /api/agents/:id/configrejects a foreign model, so I thought the trap was closed. It wasn't: the workspace default spans every runtime, so it cannot be correct for all of them at once, and an agent with no model of its own inherited it silently. No amount of per-agent validation catches that.resolveRuntimeTuningnow takes the runtime and drops a model that runtime can't run, so the session falls back to the CLI's own default — a working run rather than a dead one. Dropping beats erroring here: the workspace default is a fallback, and refusing to launch because a fleet-wide setting doesn't suit one runtime would be the wrong trade.Verified
7 new conformance fixtures pin that matrix so it can't regress. Suite 130 → 137.
🤖 Generated with Claude Code