Skip to content

[Bug]: stale Codex app-server makes injected roster disagree with live spawn_agent allowlist (2.8.0) #857

Description

@GENEXIS-AI

Client or integration

Codex App

Area

Service lifecycle

Summary

On OpenCodex 2.8.0, v2 guidance can advertise subagent models from a newly written on-disk catalog while a long-lived Codex app-server still validates spawn_agent against an older in-memory list. The injected roster listed valid models, but the active tool rejected an exact listed model and returned an empty allowlist.

Expected: OpenCodex should not positively advertise a roster that may be newer than the active app-server allowlist. Status/doctor/guidance should detect and explain the stale-process condition without restarting active work automatically.

This is related to #295, but the remaining gap is lifecycle drift after the roster-intersection fix: effectiveSubagentRoster() reads the current disk catalog on each request while Codex can retain an older catalog in memory.

Reproduction

  1. Start Codex Desktop so its app-server loads the current model catalog.
  2. Change or sync the OpenCodex subagent roster/catalog without restarting the app-server.
  3. Start a qualifying v2 turn.
  4. Observe proxy-authored guidance such as Available models: "gpt-5.6-sol", ....
  5. Call spawn_agent using exactly model="gpt-5.6-sol", fork_turns="none", and a valid self-contained task.
  6. Observe Unknown model gpt-5.6-sol for spawn_agent. Available models: with an empty list.

In the observed state, the app-server process started before both opencodex-catalog.json and models_cache.json were rewritten. ocx agent status and the injected guidance used the new disk roster; the live tool validator did not. A local session audit found 565 exact failures across 13 sessions.

Suggested safe behavior:

  • If app-server start time predates the active catalog/cache mtime, suppress the positive roster claim and show an actionable restart warning.
  • Surface the check in ocx doctor / ocx agent status, not only the one-shot ocx sync warning.
  • Do not kill or restart an active app-server without explicit user action.
  • Cover fresh, stale, and no-app-server cases with regression tests.

Version

2.8.0

Operating system

macOS 26.5.2 (25F84)

Provider and model

OpenCodex v2 routed subagents; reproduced with gpt-5.6-sol. The configured roster also included gpt-5.6-terra and kiro/claude-opus-5.

Logs or error output

Unknown model `gpt-5.6-sol` for spawn_agent. Available models:

Runtime details:

OpenCodex: 2.8.0
Codex Desktop app-server: 0.146.0-alpha.9.2
OpenCodex configured CLI: 0.144.6

Screenshots and supporting files

No screenshot required; the error and process/catalog timestamps are text-reproducible.

Redacted configuration

{
  "v2_surface": true,
  "multi_agent_mode": "default",
  "subagent_models": [
    "gpt-5.6-sol",
    "gpt-5.6-terra",
    "kiro/claude-opus-5"
  ]
}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions