Skip to content

app-server: expose live persistence identity and an enqueue precondition #55768

Open

Description

@abruption

What variant of Codex are you using?

CLI / app-server 0.163.0, macOS arm64 and Linux aarch64.

Source comparison: rust-v0.163.0 (83086188ae0614bd882818ff1aa23f3194962012) and main c7234c1174b27d9c55199fba0d546dc27d1b0415. Main was inspected, not executed.

What feature would you like to see?

Is there a supported API for identifying the actual persistence domain used by a running app-server, distinct from its account home and reloaded configuration? If not, please consider exposing an opaque live-storage identity and an optional expected-storage precondition checked atomically when admitting queued input.

I maintain session-peer, which discovers existing sessions and forwards messages. The use case is checking that metadata discovery and submission refer to the same store. Matching a thread UUID or account home cannot establish that when different stores may contain copies of the same thread.

The intended API would distinguish server/store replacement and define what happens after restart or a database copy. A path alone would not provide this identity. This is a capability/contract question, not a report of demonstrated misdelivery or an exploit.

Additional information

Credential-free, initialization-only probes on both platforms observed:

Private test configuration Server's open state DB config/read SQLite field
No override Account home null/absent
Environment only Environment-selected directory null/absent
User config plus environment User-config directory User-config directory
CLI override plus user config/environment CLI-selected directory CLI-selected directory
Change private config A to B while server runs Remains A Changes to B
Restart after that change B Not needed for this control

Minimal A/B procedure: start codex app-server --listen stdio:// with a fresh HOME/CODEX_HOME and user config selecting private SQLite directory A; initialize; inspect that process's open state DB handles; change only the private config to B; call config/read again; compare the handles; finally restart as a control.

All initialized servers reported the expected codexHome for their case.

The probes blocked network access and issued no thread, queue or model-turn requests. Host system configuration was absent; macOS forced preferences were absent. Windows, actual MDM policies and managed-daemon routing were not tested. Process file handles were laboratory evidence, not a proposed production API.

Source context:

If an existing versioned API already covers this use case, a reference would help us avoid duplicating it.

Activity

  1. added
    enhancement
    CLI
    app-server
    on Oct 21, 2026
  2. abruption commented on Oct 22, 2026

    @abruption
    Author

    Native storage-layer follow-up — 2026-10-22

    Additional initialization-only measurements used Codex 0.163.0 on macOS arm64 and Linux aarch64. Ten final conditions were tested on each platform, with matching results. Each process used private HOME/CODEX_HOME, project settings and working directories, with networking blocked. No thread, queue or model-turn request was issued.

    The main additional finding is that config/read without cwd can return user-level configuration while the running server has opened a trusted project's state DB. Supplying the process cwd makes readback match these fresh fixture cases, but it still does not attest startup storage after configuration changes.

    In the table, A is the user-config directory, C the project directory, D the nested-project override and E a CLI override. Open storage was identified from the owned server process's state_5.sqlite handles; these are fixture labels, not private paths.

    Condition Open state DB config/read without cwd With process cwd
    Trusted project, user config and environment C A C
    Explicitly untrusted project A A A
    Project trust unspecified A A A
    Trusted nested project layer D A D
    CLI override over trusted project/user/environment E E E
    Only cwd/config.toml, not .codex/config.toml A A A
    Unselected research.config.toml present A A A
    --profile research app-server Exit 1 before initialization; no state DB created N/A N/A
    Relative environment path, no configured SQLite value Relative to process cwd null/absent null/absent
    Whitespace-padded environment path Trimmed environment path null/absent null/absent

    Open-path expectations and the applicable readback fields were checked for all 20 final conditions. The profile rejection is a negative CLI-validation case, not evidence about positive profile selection on other supported commands. The project marker was a private minimal .git/HEAD, and trust was configured only in the private user config. Host system config files were absent; the Mac forced-preference presence check was negative.

    Relevant pinned source: cwd-aware config loading, project trust filtering, and profile-enabled subcommand restriction.

    These results supplement the earlier A-to-B live-config observation. Shared-daemon reuse, actual queue dispatch, owner races, positive selected-profile storage, MDM/cloud requirements and Windows were not tested. They do not demonstrate misdelivery or a security exploit. The source-only main check at 342ed69a174c206c1de52a59491b131e0753cfa5 still found no live-storage/enqueue identity contract; that main binary was not executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIapp-serverenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions