Repository navigation
Description
Area
CLI
What are you trying to accomplish?
Replace the target list of an existing JEV Combo from the CLI while keeping the Combo a JEV Combo, with its decision method, quota policy and session pin intact:
ocx combo set jev-auto --targets sol/gpt-5.6-sol,luna/gpt-5.6-luna --jsonWhat prevents this today?
When --targets is given and --strategy is omitted, ocx combo set does not read the existing Combo. It sends a fresh body with strategy: "failover" (src/cli/combo.ts: the existing row is fetched only when targetsRaw === undefined, and the strategy falls back to "failover"). The server stores that body, so the Combo silently stops being a JEV Combo, and every JEV-only field is dropped: decisionProvider, decisionModel, decisionTimeoutMs, decisionQuotaSignals, decisionQuotaTiers and sessionPin.
This is currently documented (docs-site/src/content/docs/reference/cli/agents.md: "--targets alone keeps the existing failover default"). It still surprises in practice, because the help text says existing fields are read before writing, and --targets-file, --targets together with --strategy jev, and rename all preserve the policy. CodeRabbit flagged it as Major on #7567 (review). I left it out of that PR because it changes an existing CLI contract.
What should OpenCodex do?
When --strategy is omitted and the Combo already exists, ocx combo set --targets ... should start from the stored row, exactly as the no---targets path and --targets-file already do. It should replace only the targets and keep the stored strategy and all strategy-specific fields. Creating a new Combo would still default to failover. An explicit --strategy keeps its current meaning, including dropping JEV-only fields when switching away from jev.
Example usage or interface
# existing: { "strategy": "jev", "decisionQuotaSignals": true, "sessionPin": { "ttlMs": 1200000 }, ... }
ocx combo set jev-auto --targets sol/gpt-5.6-sol,luna/gpt-5.6-luna --json
# expected: strategy stays "jev"; decisionQuotaSignals and sessionPin unchanged; only targets replacedAlternatives or workarounds
Pass --strategy jev together with --targets, or use --targets-file; both preserve the stored JEV policy today.
Additional context
Regression coverage would sit beside tests/routing/jev-quota-config.test.ts and tests/cli/cli-combo-session-pin.test.ts. The docs sentence in reference/cli/agents.md and the matching guide text would need to change with the behavior.
Checks
- I searched existing issues and documentation.
- This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
- I removed secrets and personal data.
Activity
fix(cli): show the kept-JEV message only for target or JEV refusals
fix(cli): keep the stored strategy when combo set replaces targets (#…
lidge-jun commentedon Oct 23, 2026
Fixed on
devby #7601:ocx combo set <id> --targets ...without--strategynow keeps the stored strategy and, for a JEV combo, its decision method, quota policy and session pin. When the new targets don't fit the JEV policy,PUT /api/combosanswers 400 with an additivefieldand the CLI explains that the JEV combo was kept. Closing manually because GitHub only auto-closes frommain; it ships in the next release.docs(cli): an existing JEV combo keeps its stored decision method (#7602