codex-copilot-dx 1.2.33 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +64 -110
  2. package/bin/cli.mjs +38 -102
  3. package/docs/ARCHITECTURE.md +23 -7
  4. package/docs/README.md +9 -76
  5. package/docs/REFERENCE.md +137 -1936
  6. package/package.json +11 -4
  7. package/src/access-settings.mjs +2 -2
  8. package/src/adapter.mjs +1 -1
  9. package/src/auth-credentials.mjs +1 -1
  10. package/src/auto-review-model.mjs +2 -2
  11. package/src/cli-animation.mjs +2 -2
  12. package/src/cli-auth.mjs +3 -3
  13. package/src/cli-cache.mjs +2 -2
  14. package/src/cli-command-spec.mjs +260 -58
  15. package/src/cli-image.mjs +2 -2
  16. package/src/cli-limits.mjs +2 -2
  17. package/src/cli-m365.mjs +1 -1
  18. package/src/cli-management.mjs +7 -3
  19. package/src/cli-options.mjs +71 -408
  20. package/src/connection-runtime.mjs +1408 -377
  21. package/src/copilot-token-session.mjs +1 -1
  22. package/src/dashboard/connections.js +23 -4
  23. package/src/dashboard/ui.css +9 -2
  24. package/src/dashboard-api.mjs +5 -5
  25. package/src/doctor.mjs +4 -4
  26. package/src/image-mcp.mjs +2 -2
  27. package/src/native-prediction-fix.mjs +1 -1
  28. package/src/native-prediction-profile.mjs +1 -1
  29. package/src/native-prediction-windows.mjs +1 -1
  30. package/src/native-prediction.mjs +6 -6
  31. package/src/nightly-update.mjs +2 -2
  32. package/src/provider-runtime.mjs +1 -1
  33. package/src/providers/m365-accounts.mjs +1 -1
  34. package/src/release-install.mjs +11 -15
  35. package/src/startup-ui.mjs +15 -11
  36. package/src/terminal-console.mjs +5 -4
  37. package/src/terminal-state.mjs +1 -1
  38. package/src/usage.mjs +5 -5
  39. package/src/windows-command.mjs +2 -2
  40. package/bin/codex-copilot-dx.mjs +0 -11
  41. package/src/cli-models.mjs +0 -94
  42. package/src/legacy-command-warning.mjs +0 -38
package/docs/REFERENCE.md CHANGED
@@ -1,183 +1,113 @@
1
- # CCDX command, configuration and compatibility reference
2
-
3
- Use Codex App with GPT models available to your **GitHub Copilot** account by default.
4
- The optional [Microsoft 365 provider](#microsoft-365-provider) supplies a protocol-isolated
5
- Claude gateway and an explicitly selected Codex backup.
6
-
7
- ## Manual APIs and client access
8
-
9
- `ccdx web` starts management without GitHub sign-in or automatic App launch.
10
- Use **Model sources → Add API**, enter the HTTPS API base address/key
11
- (including a required prefix such as `/v1`), then choose **Save & read models**.
12
- The saved source remains available and the editor stays open for model selection.
13
- A failed directory read keeps the source and draft; retry with **Read models**
14
- under the existing request-coalescing and cooldown policy.
15
- Select the models to use and their supported interfaces, save, then choose each
16
- client's visible models and default on **Codex** or **Claude**. Unselected catalog entries
17
- are not saved. A selected model needs at least one interface; choosing an
18
- interface also selects its model. Manual ID entry is an optional collapsed path
19
- for models absent from the catalog. Only Codex on GitHub needs the default
20
- GitHub sign-in path. To use Claude alone, disable Codex access. Stop the
21
- management-only process before normal `ccdx` startup for the live terminal.
22
-
23
- | Client | Local base path | Required upstream API |
24
- | --- | --- | --- |
25
- | Codex App / CLI | `/v1` | Responses |
26
- | Claude App / Claude Code | `/anthropic` | Messages |
27
-
28
- All paths share the main port, normally 2026. Manual Codex and explicitly managed
29
- Claude clients receive distinct private local credentials; never the upstream
30
- key. Display hints do not authorize requests. API addresses require HTTPS, no
31
- userinfo/query/fragment, and endpoint overrides on the base address's origin.
32
- Redirects are refused. Existing proxy/bypass/private-CA rules remain; unsupported
33
- dynamic macOS routing fails without a direct fallback. Windows delegates system
34
- routing to a target-pinned WinHTTP worker. Failed calls are not replayed. A
35
- transport failure before response headers marks that transport unhealthy; a
36
- later request creates a new transport and rereads the existing routing policy.
37
- Other responses already using the old transport finish before it is released.
38
- HTTP denials and deliberate cancellation do not trigger this recovery.
39
- Network failures retain `ccdx_api_network_unavailable` and include a bounded
40
- `error.diagnostic`: a recognized local error `code`, observed `phase`, and
41
- `reused_socket` (boolean or unknown). Unknown codes/phases remain `unknown`.
42
- Diagnostics omit raw error text, endpoints, headers, keys and request content.
43
-
44
- Up to 16 uniquely named manual APIs and 500 unique models per API are supported. Model IDs are limited to 160 characters; `codex-auto-review` remains an internal alias. Custom model
45
- IDs are not filtered by a GPT/Claude prefix. Each model declares Messages,
46
- Responses and/or Chat Completions; optional stored `context_window` and
47
- `reasoning_efforts` metadata remain explicit. Chat-only records are catalog
48
- information, not converted into another client protocol. Saving automatically
49
- reads the catalog; failure does not undo saved configuration. Startup and the
50
- existing periodic model-refresh cycle refresh enabled APIs serially, using a
51
- 30-minute success cache and a one-minute failure cooldown. **Read models** can
52
- refresh sooner, but shares a one-minute cache with recent reads. Directory GETs
53
- use a 20-second total deadline, 8 MiB total body bound, 500 models and at most 25
54
- pages. Native `has_more`/`last_id` pagination uses only a validated `after_id`
55
- cursor on the configured catalog URL; arbitrary next URLs are never followed.
56
- An ID-only result has unknown protocol support until reviewed. Ordinary page
57
- reads use saved data; no discovery sends inference. `ccdx models` labels manual
58
- models as configured, not live. New catalog entries are candidates, never
59
- automatically granted to a client. An absent entry does not delete a saved model.
60
-
61
- For manual Messages APIs, CCDX writes Claude App's model configuration
62
- automatically. Standard Claude IDs keep their existing identity; other IDs use
63
- a stable `ccdx/claude-compatible-<digits>` route with `labelOverride` set to the
64
- real model ID. Reordering or adding models does not renumber existing routes.
65
- The App's model catalog advertises the same routes and real display names.
66
- Users do not need to add aliases manually. Owned configuration migrates through
67
- the existing field journal; custom or managed settings remain protected.
68
-
69
- Only the authenticated Claude App binding enables this translation. The gateway
70
- resolves routes against that source's allowed Messages models, sends real IDs
71
- upstream for Messages and token counting, and returns the requested route in
72
- JSON messages or SSE `message_start.message.model`. Other SSE frames, tool data
73
- and signatures are retained. Alias SSE framing is bounded by the existing event
74
- limit and follows client backpressure. Usage and request diagnostics keep real
75
- model IDs. Explicit multi-source bindings use source-qualified routes for Codex and both Claude clients. Unqualified legacy IDs resolve only when exactly one authorized deployment matches. Source/key history boundaries and native protocol semantics remain enforced.
76
-
77
- Some App requests include `system` messages as well as a top-level `system`
78
- field, including system notes after user content. For manual App connections,
79
- CCDX appends their text blocks to the top-level field in system-message order,
80
- retaining system priority, block metadata and the order/content of conversation
81
- messages. Non-text system content fails locally. Other clients and providers
82
- keep their existing payload paths.
83
-
84
- Compatibility routes address Claude App's model-name filter. A saved connection,
85
- successful model-list read or connection check does not prove complete App
86
- conversation, tool or thinking support for every upstream model.
87
-
88
- `connections.json` beside user settings (respecting `XDG_CONFIG_HOME`) stores a
89
- strict version-two graph of provider switches, API metadata, source grants and per-client model deployments/defaults. Version one is read with its original single-source visibility; the first write preserves original bytes in `connections.json.v1-backup`. A null deployment list retains the legacy source catalog; an explicit array exposes only its selected deployments. Migration never expands an old `allowed` grant into model visibility. It stores only credential references or an environment
90
- variable name. Keys use macOS Keychain service `codex-copilot-dx.manual-api`,
91
- Windows CurrentUser DPAPI-protected bytes, or Linux Secret Service (`secret-tool`).
92
- Unavailable protection fails without plaintext fallback. Headless installations
93
- may use `key_env` under Addresses & authentication; set the variable before CCDX
94
- starts. Its value is never returned by management or copied into client config.
95
- Private helpers omit unrelated credentials and Node hooks. API error bodies are
96
- replaced with stable codes; valid Retry-After metadata is retained.
97
-
98
- An explicit empty Codex deployment array pauses CCDX access, including after a
99
- restart or disabling the last selected source. Models, Responses and compact
100
- requests return `503 ccdx_client_source_disabled` before checking a client key;
101
- no upstream call, automatic model selection or login repair is attempted. Enable
102
- the app/source and select at least one model to resume. GitHub-only selections
103
- retain native OpenAI mode; nonempty mixed/API deployments retain private-key
104
- authentication. With automatic sync enabled, pausing restores only owned Codex
105
- configuration; manual sync leaves native files unchanged. Neither changes login.
106
-
107
- `client-gateway-keys.json` holds local credentials separately. Disabled sources leave normal source lists. **Model sources** owns **Disabled sources**; application access cards own **Disabled clients**. App navigation remains available while access is closed, so its restoration control stays reachable. Each
108
- collapsed list appears only when it has entries and provides **Enable again**.
109
- Closing a client stops CCDX access, not the app. Disabling an in-use source
110
- requires explicit replacements or pauses. Pinned API streams finish on their
111
- original provider; retired transports/keys are released afterwards. Legacy M365
112
- work is guarded before its old gateway is removed. Recovery preserves grants,
113
- configuration and historical usage without choosing a current source. With a
114
- managed graph, `m365 off` pauses affected bindings; `m365 remove` preserves shared
115
- Claude ownership records still needed by APIs.
116
-
117
- Claude's existing field-owned journal protects custom/managed edits. Manual
118
- clients use the existing profile with generic name CCDX; M365's beta restriction
119
- is not imposed on APIs. Only an unchanged owned restriction is restored. Adding
120
- an API alone does not migrate existing M365 client credentials. First explicit
121
- Claude connection management installs private client keys; reopen affected apps.
122
- Codex reconciliation owns provider selection, the selected model, the private
123
- provider table and, in native mode, `openai_base_url`. GitHub-only selections use
124
- this base URL with the built-in `openai` provider; fresh native setups create no
125
- custom provider table. The App therefore keeps its native provider branch.
126
- An unchanged old `ccdx_gateway` table is retained inactive during migration so
127
- existing sessions can still resume their recorded provider. New sessions use
128
- `openai`; existing session files are never rewritten to disguise their provider.
129
-
130
- The versioned ownership journal records exact prior/owned declarations and
131
- supports native/private switching and restoration. Startup defers an owned base
132
- URL to this reconciliation instead of overwriting preserved user edits. Identical
133
- setup does not rewrite the file. A missing default keeps its identity and does
134
- not prevent a safe native route repair. User model/base edits remain protected.
135
- Reconciliation never writes `auth.json` or replaces native credentials.
136
-
137
- Non-GitHub deployments retain the private provider/local-key route. Existing
138
- native sign-in or credential-store policy keeps `requires_openai_auth = true`;
139
- a fresh API-only profile remains usable without ChatGPT login. Native account
140
- operations retain their own authentication. App custom-provider controls can
141
- differ from native OpenAI controls; CLI catalogs do not prove App UI parity.
142
- Reopen Codex after an owned provider/authentication configuration change.
143
-
144
- GitHub-only explicit bindings preserve the legacy native loopback access contract,
145
- including requests from a process that has not yet reloaded its configuration.
146
- Their catalog comes from the selected deployments, not a second live Copilot read.
147
- Adding any non-GitHub deployment requires the private Codex key for the entire
148
- catalog and all bound inference requests. Unselected models remain refused.
149
- A supplied non-Codex bearer receives a local 403, not a ChatGPT 401 refresh
150
- challenge. Missing credentials still receive 401; neither denial reaches upstream.
151
- Temporarily unavailable selected models remain visible in the application editor.
152
- Saving them fails without changing prior settings; refresh the catalog or explicitly
153
- clear the affected selection. A missing directory entry never means deselection.
154
-
155
- GitHub catalog reads in Model sources share the running model registry and endpoint cache with Codex. A successful read updates available candidates without selecting new models, changing defaults or rewriting client files. Concurrent reads join one refresh. An explicit failed refresh remains an error while the prior catalog is retained; an account change during the read prevents publication under the new identity.
156
-
157
- A manual Codex provider includes an authenticated `model_catalog_url` on the same
158
- listener. Native app-server catalogs list configured names; the App may still use
159
- its custom-provider UI for non-GitHub selections. Unknown names
160
- use conservative metadata without borrowed model instructions, invented context,
161
- vision, web search or Fast claims. API-specific Auto Review uses its configured
162
- model and advertised efforts; following the client does not synthesize low.
163
- See the official [provider configuration](https://learn.chatgpt.com/docs/config-file/config-advanced#custom-model-providers)
164
- and [gateway catalog requirements](https://learn.chatgpt.com/docs/enterprise/roll-out-a-gateway#use-a-model-catalog-for-custom-names).
165
-
166
- Responses namespaces include API configuration/key identity. Managed native
167
- histories retain at most 1,024 HMAC-only correlation/owner pairs in
168
- `conversation-sources.json`. No prompt, raw session ID or key is stored. A known
169
- session or first-message correlation that changes source/key returns 409 before
170
- forwarding history. This is bounded observation, not proof of the provenance of
171
- unseen external history. Start a new conversation after source/key changes; do
172
- not transfer opaque reasoning, compaction or signed history between services.
173
- There is no automatic load balancing, fallback or cross-source history replay.
174
-
175
- `/_ccdx/ui/connections` requires loopback, the dashboard header, same-origin JSON
176
- POSTs and a 256 KiB body bound. It returns redacted configuration and explicit
177
- action results. Invalid/conflicting files are retained. The ordinary two-second
178
- status returns compact source/client summaries, not all model records. Metrics
179
- allow the two built-ins plus 16 APIs (18 labels plus bounded `other`). Aggregate
180
- Claude observation covers all Messages sources; M365 counts keep their own scope.
1
+ # CCDX reference
2
+
3
+ For installation and first use, start with the [README](../README.md). This reference covers operations and the limits that affect them. Supported systems are macOS and Windows, x64 and ARM64.
4
+
5
+ ## Commands
6
+
7
+ `ccdx` is the only executable. Commands and help use one grammar. Use `ccdx help <path>` or append `--help`; old roots and flag aliases are not accepted. Existing saved settings remain readable.
8
+
9
+ | Group | Operations |
10
+ | --- | --- |
11
+ | `ccdx` / `ccdx start` | Start or reuse the foreground gateway |
12
+ | `ccdx web` | Open the Web UI, or start management without signing in |
13
+ | `ccdx status` | Show runtime and app configuration; `--details` expands diagnostics |
14
+ | `ccdx source list` / `source add` | List sources or add an API |
15
+ | `ccdx source <id> status` | Read saved account and catalog evidence |
16
+ | `ccdx source <id> models [--refresh]` | Read cached models, or explicitly refresh the source |
17
+ | `ccdx source <id> check` | Check source access without inference |
18
+ | `ccdx source <id> access --edit` | Choose allowed apps |
19
+ | `ccdx source <id> enable` / `disable` | Change source access; disabling reviews affected apps |
20
+ | `ccdx source <id> edit` / `remove` | Edit an API, or remove a disabled, unbound API |
21
+ | `ccdx source github login` / `reauth` / `logout` | Manage the saved GitHub account |
22
+ | `ccdx source m365 accounts` / `account` | List local company accounts or select one |
23
+ | `ccdx app list` | Show client setup and observed activity |
24
+ | `ccdx app <id> status [--details]` | Read client configuration and scoped features |
25
+ | `ccdx app <id> models --edit` | Choose visible models and a default |
26
+ | `ccdx app <id> sync --preview` | Preview the model/configuration plan |
27
+ | `ccdx app <id> sync` | Write client settings owned by CCDX |
28
+ | `ccdx app <id> enable` / `disable` | Change access without quitting the app |
29
+ | `ccdx app codex prediction …` | Native suggestion setup and diagnostics |
30
+ | `ccdx app codex image …` | Image setup and diagnostics |
31
+ | `ccdx app codex review status` / `select` | Read or choose the review model |
32
+ | `ccdx config show [--effective]` | Read saved preferences and effective state |
33
+ | `ccdx config set <key> <value>` | Save a validated preference |
34
+ | `ccdx config terminal` / `animation` | Choose terminal appearance |
35
+ | `ccdx config limits [--decoded MiB]` | Read or change the decoded request limit |
36
+ | `ccdx config reset --preview` / `restore` | Preview defaults or restore the pre-reset backup |
37
+ | `ccdx requests [--failed] [--active]` | Inspect retained requests |
38
+ | `ccdx requests show <request_id>` | Read one retained request |
39
+ | `ccdx usage [--scope all\|run] [--provider ID]` | Read recorded usage or current-run usage |
40
+ | `ccdx doctor [--online] [--compat] [--fix] [--json]` | Check local setup; optional access checks and repairs |
41
+ | `ccdx doctor config` / `network` / `report` | Read configuration, routing or a redacted local report |
42
+ | `ccdx doctor cache [--limit MiB\|default]` | Inspect runtime buffers or change their limit |
43
+ | `ccdx doctor cache --clean [--history] [--yes]` | Clear rebuildable data; history cleanup requires confirmation |
44
+ | `ccdx update check` / `update github` / `update npm` | Check or install an update |
45
+ | `ccdx version` | Show the installed package version |
46
+
47
+ Client IDs are `codex`, `claude-app` and `claude-code`. Source IDs are listed by `source list`. Read-only management commands support `--format table|plain|json`. They do not start an app or a gateway. Native image/suggestion status also reads local setup when the gateway is stopped; JSON includes the saved configuration flag and the same public details. Management operations need the running service; use `ccdx web` to start it without launching a client.
48
+
49
+ `start` supports `--no-browser`, `--verbose` and `--show-request-id`. The normal TUI has one source summary and one app table. It labels the Web UI address directly. `Unchanged` means existing client settings were kept; `Configured` means the configuration write/check succeeded. Neither is proof that a client process has loaded that configuration. Warnings and sign-in instructions remain visible during startup. The final activity row reflects observed model work. Ctrl+C stops the foreground service.
50
+
51
+ For scripts, source access accepts `--apps codex,claude-app` with `--edit`; edits use confirmation or `--yes`. API/model edits accept `--file`. An API key uses the private prompt, `--key-stdin`, or an environment reference, never a command argument or metadata file. Source removal requires a disabled API with no client binding. Disabling an in-use source requires explicit replacement choices in scripts; `--yes` alone does not choose them.
52
+
53
+ An app model file contains `deployments: [{"source":"github","model":"<model-id>"}]`, with optional `default_model` and `auto_sync`. An explicit empty array clears the default and pauses access. A file without `deployments` is rejected. Unavailable saved selections remain visible until the user changes them.
54
+
55
+ ## Sources and client access
56
+
57
+ Upgrades retain saved account bindings, source IDs, key references, model choices/defaults and capability overrides. Native account stores keep their existing owner; bookkeeping does not request another login. Unchanged client settings need no repeat save or synchronization. Explicit user changes and ordinary credential renewal keep their current behavior.
58
+
59
+ Sources own accounts, API addresses, keys and model capabilities. Apps own visible models and defaults. Allowing an app to use a source does not select all its models. Selecting no models pauses that app. Settings owns service preferences and appearance, not model routing. An unchanged graph save keeps the file bytes and modification time; explicit sync, refresh and credential actions still run. Existing v1 configuration is backed up byte-for-byte before its first v2 write; reads do not migrate files.
60
+
61
+ In the Web UI, **Model sources → Add API** saves the source and immediately reads its catalog. A failed read keeps the saved source and editor. Select supported models and their declared interfaces before assigning them to apps. Catalog details expand without shifting columns. API-editor capability details open below their model row; manual overrides are separate from reported metadata.
62
+
63
+ Manual APIs require HTTPS. Codex requires Responses; Claude requires Messages. CCDX does not invent an interface, token-count result, reasoning level or web-search capability absent from the source declaration. Returned maker/name metadata is displayed separately from the source name. Model IDs are not used to guess a maker.
64
+
65
+ A running request stays with its original source, credential revision and capabilities. Refreshing a catalog does not select models or change defaults. Failed reads keep last-good data with failure evidence; they do not trigger inference, re-login or source switching. Normal API refresh uses a 30-minute cache and a one-minute minimum interval after explicit reads or failures.
66
+
67
+ Codex selections containing only GitHub models keep native OpenAI mode and readable names. Other selections use the client's private local gateway credential. Paused access is rejected before credential validation. CCDX does not write or clear native ChatGPT sign-in data. When models are missing after a client update, check the selected models and run `ccdx doctor`; fully quit and reopen the app before changing credentials.
68
+
69
+ Claude App and Claude Code use separate keys on `http://127.0.0.1:2026/anthropic`. Compatibility aliases are internal; visible model names follow source metadata. Client synchronization respects manual/managed fields and records ownership for restoration. Already-running clients may need a normal restart.
70
+
71
+ Claude App can continue an existing conversation on another selected, authorized source when complete Messages history is available. Unfinished tool turns, unavailable attachments and company-account isolation are checked before transfer. Opaque signed or compacted history is not transferable between services. Codex and Claude Code keep their existing continuation rules. A 409 is a history/isolation conflict; it does not by itself mean the selected model is unavailable.
72
+
73
+ ## Microsoft 365
74
+
75
+ Supported company environments discover local accounts at startup. Access depends on the account, tenant, device policy and service entitlement. Optional failure does not block another source.
76
+
77
+ Choose consuming apps under **Model sources → Microsoft 365 → Allowed apps**. Read the company catalog with `ccdx source m365 models --refresh`; this sends no inference. Use `source m365 accounts` to list accounts or `source m365 account` to choose one. Existing explicit account selection takes priority, followed by an exact Windows work-account match or the single available company account. Account changes require a new conversation.
78
+
79
+ Catalog diagnostics distinguish local cached data from an online response and expose check time, service origin, HTTP status, last success and service request ID when available. Model counts can differ across environments. A 403 alone does not prove a stale cache, an expired account or a changed endpoint. Do not repeatedly sign in or probe inference to diagnose catalog failures.
80
+
81
+ ## Checks and troubleshooting
82
+
83
+ - **Saved account, access denied:** use source status/check to distinguish the saved credential from current access. `source github reauth` replaces sign-in only after a successful new login. Other apps' credentials are read-only.
84
+ - **No client models:** inspect allowed sources, selected models and unavailable selections. An empty selection means paused access, not missing credentials.
85
+ - **Configuration unchanged:** CCDX kept existing settings. Preview the intended plan before syncing; do not overwrite managed settings to force success.
86
+ - **Request failure:** use Requests or `ccdx requests --failed`. HTTP failures and model completion outcomes are separate. A successful HTTP transport can still carry a model error.
87
+ - **Token counting unavailable:** an observed API count-endpoint 404 is cached briefly per model/header scope. Inference and token counting are separate capabilities; no synthetic count is returned.
88
+ - **Local checks:** `doctor` is read-only by default. `--online` checks access; `--compat` sends minimal inference and consumes usage. `--fix` backs up owned configuration and performs bounded repairs. It does not enable optional features, change company policy or force-restart apps. Partial repairs exit 1.
89
+ - **Cache cleanup:** adding `--history` can break the next continuation. It does not delete client transcripts or generated images.
90
+
91
+ Request inspection covers bounded retained records, not a full conversation archive. Unidentified clients stay unidentified. Routine diagnostics omit secrets, prompts and error bodies. Explicit error excerpts use bounded, redacted collection. The usage JSON `requests` field counts recorded usage rows, not HTTP calls. Usage is returned token metadata; cache hit is reused input divided by input, with unknown/partial data indicated. It is not a request-based cache rate or a billing receipt.
92
+
93
+ ## Settings and appearance
94
+
95
+ Settings separates saved preferences from effective state. Auto-save applies changes by default; required restarts remain explicit. Restore-defaults creates a backup first and keeps accounts, keys, model plans and chats. CLI preference reset/restore uses its own service-only backup; it does not change browser appearance or replace the Web UI's backup.
96
+
97
+ Web and terminal colors are independent. Web appearance is browser-local. The terminal keeps its selected color and animation; NO_COLOR, dumb/non-TTY and narrow output remain supported. Reduced motion disables decorative movement. Closed tabs and hidden views stop scheduled work. Model/usage data loads on demand; the Web UI adds no inference calls.
98
+
99
+ ## Installation and updates
100
+
101
+ Use the installers linked in the [README](../README.md) when Node.js is unavailable. They support macOS and Windows on x64/ARM64, reuse a compatible Node.js, or install verified Node 24.22.0 privately. They do not install Git, compilers or system package managers, or change company registry/proxy/certificate/shell policy.
102
+
103
+ Complete Release packages include locked runtime dependencies. The updater verifies package identity, version and digests before installation, backs up the discovered package and launchers, and restores them on installation/runtime-check failure. A busy installation fails in place. Lock errors include the lock path; do not delete a lock held by another install.
104
+
105
+ `ccdx update github` uses the latest stable Release. Normal source-package installation uses the configured registry. After npm EALLOWREMOTE, the updater can use a verified same-version complete platform package without relaxing npm policy. Other failures are not retried across arbitrary sources. Explicit `--allow-remote` grants URL downloads to that installation's whole dependency tree, not one hostname; use it only if policy permits. No persistent npm setting changes.
106
+
107
+ Finish active work before updating the active installation, then restart CCDX normally. The installed package version can differ from the running process. No interruption-free upgrade is promised for an ordinary foreground service.
108
+
109
+ Overnight updates are opt-in. The supervised service checks within its local midnight window, stages only eligible patches in the same minor version, and waits for idle work before handoff. Candidates must be published for at least 24 hours. Failed preparation/handoff retains or restores the previous service. Enabling this feature requires its documented normal restart; it does not attach a supervisor to an existing ordinary process. Minor upgrades such as 1.2 → 1.3 remain manual.
110
+
181
111
 
182
112
  ## Model capabilities and Claude synchronization
183
113
 
@@ -283,256 +213,8 @@ sync shows declared capabilities, supported budgets and limitations. Reopen the
283
213
  client after its owned configuration changes. All tests using sample capabilities
284
214
  are isolated; they do not assign sample limits to a user's real models.
285
215
 
286
- ## Microsoft 365 provider
287
216
 
288
- Starting with 0.10.0, CCDX can discover authorized M365 models independently of
289
- Copilot CLI. This is not restoration of the retired personal-GitHub Claude profile
290
- or PM Studio patch. The core Codex provider remains GitHub until explicitly changed.
291
-
292
- ```bash
293
- ccdx m365 status
294
- ccdx m365 models
295
- ccdx m365 accounts
296
- ccdx m365 account
297
- ccdx m365 account --id aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
298
- ccdx m365 switch
299
- ccdx m365 switch m365 --model gpt-6-sol --auto-review-model gpt-6-sol
300
- ccdx m365 switch github
301
- ccdx m365 off
302
- ccdx m365 on
303
- ccdx m365 remove
304
- ccdx usage --provider m365
305
- ccdx usage --provider github
306
- ```
307
-
308
- The model IDs above are examples, not guaranteed entitlement. `switch` checks the
309
- current M365 catalog before committing. Interactive mode asks for the provider,
310
- Codex GPT model and Auto-review model; scripts must supply available IDs (or reuse
311
- previously saved valid choices). Switching requires the running updated adapter.
312
- It affects subsequent requests, not in-flight streams. Existing Codex threads keep
313
- their selected model: choose an available M365 model in the App. Unavailable
314
- models return a clear error instead of being aliased. There is no automatic
315
- cross-provider failover, quota borrowing or organization/account substitution.
316
-
317
- Startup uses the official optional `@azure/msal-node-runtime` 0.20.6 package in a
318
- short-lived Node helper. It discovers OS broker accounts and calls silent token
319
- acquisition only. It neither launches a login UI nor reads Copilot CLI tokens.
320
- macOS requires MDM enrollment and a working Microsoft Enterprise SSO broker;
321
- Windows uses its Microsoft account broker. Tenant policy, device compliance,
322
- account authorization and Loki entitlement still decide access. Saved bindings remain selected, including bindings created before account selection was added. Without a binding, Windows runs its system `whoami.exe /upn` once when multiple candidates exist (2.5-second limit) and accepts only a unique exact case-insensitive match with a discovered company account. It does not use the device enrollment identity, environment username, email suffix or list order. Local sign-ins, unsupported UPN lookup and shared UPNs fall back to a single company account or explicit selection. The Node broker has no explicit current-OS-account flag; a UPN match is not a SID/object-ID or device-compliance check. Entra/hybrid enterprise environments still need their own validation.
323
-
324
- Duplicate stable account/tenant records are merged only when their identity metadata agrees. Conflicts and multiple remaining accounts require user action. Personal Microsoft consumer-tenant accounts are excluded. Windows local sign-in with an Office company account works only when the broker can discover that account; Office's sign-in UI does not prove broker visibility or model entitlement.
325
-
326
- Use **Model sources → Microsoft 365 → Company account** or `ccdx m365 account` to choose. `ccdx m365 accounts` performs local discovery only; its opaque IDs can be passed as `ccdx m365 account --id ID`. These commands require the updated running service. Selection rediscovers accounts, rejects stale IDs, authorizes only the selected account and fetches its catalog once before committing. Failure retains the previous binding/catalog. Active M365 requests or startup work prevent selection; new M365 requests are refused during validation, while GitHub remains independent. Account changes apply to both M365 GPT and Claude; the selected Codex provider and saved model choices are not silently changed. Models missing from the new catalog require an explicit model choice. No interactive Microsoft sign-in UI is opened automatically. Interaction requirements, policy refusal or a missing native package leave M365 unavailable. None of these invalidate GitHub credentials.
327
- The GitHub-selected Codex path retains its existing first-run GitHub login flow.
328
-
329
- The optional package download is approximately 14.6 MB, contains prebuilt binaries
330
- and has no install script or runtime dependencies. It is not bundled Copilot CLI.
331
- If this optional broker alone is unavailable, core GitHub/prediction/image behavior
332
- remains available with the existing dependencies installed. Do not use a blanket
333
- `--omit=optional` workaround: sharp still needs its platform-specific optional binaries.
334
- M365 is enabled automatically only on macOS/Windows; Linux reports it
335
- unsupported. The `CCDX_M365` environment control accepts `0` to suppress M365 startup for that process. It does not
336
- restore existing client settings; use `m365 off` for that explicit operation.
337
-
338
- Entra tokens are retained in memory until renewal/close, never saved in a CCDX
339
- credential file. Renewal is silent and single-flight, with a 28-second helper
340
- deadline and one-minute failure backoff. The provider uses only
341
- `https://loki.delve.office.com/api/v1/llmapi`; discovery uses `/models` and
342
- inference uses its advertised native Responses or Messages endpoints. This is a
343
- private service, not a promised public SLA. Its fixed origin is shared by the Node and Windows target policies; authentication resources and company network policy are unchanged. No request is redirected to another
344
- origin. Model caches and replay namespaces are bound to this service origin and account. A legacy cache with no origin, or one from the prior dogfood origin, is preserved on disk but is not published as this environment’s catalog; a successful discovery replaces it. Disabled sources and saved client/model selections are not automatically changed. Explicit proxy/trust settings are preserved. Windows delegates system
345
- PAC/WPAD and integrated authentication to its own isolated WinHTTP worker;
346
- unsupported macOS dynamic PAC is reported rather than bypassed.
347
-
348
- System `ExceptionsList` entries such as `169.254/16`, `10/8`, `172.16/12` and `192.168.1/24` are normalized to full four-octet IPv4 CIDRs before the existing shared Node/PAC matcher. Missing octets become zero only when the supplied octets cover the prefix; invalid octets, ambiguous leading zeros, out-of-range or underspecified prefixes remain errors. User-supplied `NO_PROXY` retains its existing strict syntax. No system setting, proxy bypass policy, DNS lookup or network probe is added. The shared system-input correction also applies to prediction environment parsing.
349
-
350
- M365 proxy-setup failures retain their existing outer category (`m365_proxy_settings_unsupported`, `m365_proxy_discovery_failed`, or the existing environment-failure category `m365_network_error`) and add an optional `network_diagnostic`: fixed `source` (`system`/`environment`), `stage` (`proxy_discovery`/`proxy_config`) and `cause_code`. Causes distinguish discovery, dynamic PAC/WPAD, invalid bypass rules, invalid static settings and invalid/unsupported proxy addresses; unknown causes stay generic. CLI/startup explain the specific cause without suggesting a new sign-in for a known network setup failure. WebUI shows the bilingual reason in source status (codes in its tooltip) and the existing model-check details, with source/stage/cause fields. Proxy URLs, credentials, raw settings and raw nested errors are never projected. These local setup failures happen before the model HTTP request; a local 502/503 does not establish a model-service denial. Successful transport setup or a later unrelated refresh failure clears the previous setup diagnostic. Failed catalog reads still remain failures and preserve last-good data; they are not successful empty catalogs. No automatic route substitution or extra polling is added.
351
-
352
- The M365 profile under `~/.local/share/codex-copilot-dx/profiles/m365/` contains
353
- `settings.json`, nonsecret `account.json`, account-bound `models.json`, a private
354
- local `gateway.json` key, and `client-config.json` field ownership. JSON reads are
355
- bounded at 4 MiB and regular files only; new owned files use private permissions.
356
- Codex source and M365 review choices live separately in
357
- `~/.config/codex-copilot-dx/providers.json` (or under `XDG_CONFIG_HOME`). Existing
358
- GitHub auth/cache/preferences, Codex auth, prediction trust and image keys are not
359
- copied into the M365 profile. The system's Microsoft SSO account is never deleted.
360
-
361
- M365 catalogs refresh at startup and on explicit lookups. Existing model-list
362
- reads and Claude Messages traffic start a background refresh after two hours;
363
- disk caches older than seven days are rejected. `ccdx models` and Auto-review's
364
- selector follow the selected Codex source. Dashboard tabs query a registered
365
- Provider independently of that selection; M365 uses a fresh provider catalog
366
- lookup and labels the returned catalog timestamp. Its disabled/hidden or
367
- ineligible models remain visible as directory metadata, with no eligible client.
368
- Client discovery and request validation still exclude wrong publishers/protocols
369
- and disabled/hidden models. A listing does not prove inference access or quota.
370
- M365 Fast is unverified and `priority` requests fail explicitly; choose Standard.
371
- GitHub Fast behavior is unchanged.
372
-
373
- M365 Auto-review has its own required model choice and defaults to low reasoning.
374
- `ccdx auto-review-model` changes that provider's model/effort without touching the
375
- GitHub preference or falling back to its cached catalog. Native prediction still
376
- uses the conversation's selected model through the normal Codex endpoint. The
377
- optional image MCP/skill/API remains separately configured and off by default.
378
-
379
- ### Claude gateway and client ownership
380
-
381
- Claude App ordinary model synchronization compares the model-list JSON by its
382
- structure. The App-owned boolean `prefer1m` may change without blocking managed
383
- model additions or removals; its explicit true/false value is preserved by exact
384
- model identity while 1M support remains declared. New entries with declared 1M
385
- support default to `prefer1m: true`, so the App shows one 1M option rather than
386
- separate standard/1M rows. Unknown or smaller windows are not promoted to 1M.
387
- Names, display overrides, effort caps, unknown fields and meaningful model order
388
- changes retain strict ownership protection. Invalid JSON, duplicate identities or
389
- invalid preference types are preserved rather than rewritten.
390
-
391
- When a prior manual recovery already exactly matches the generated selected list,
392
- a previous ownership record may be refreshed without rewriting the App profile.
393
- Surviving old entries must retain their non-preference fields and relative order;
394
- the original restoration value is kept. An unowned model list is not claimed just
395
- because it happens to match. Non-model fields and restoration keep their existing
396
- strict ownership checks. Restart the App normally if its loaded model menu is
397
- older than the saved profile. Source/key changes in an existing conversation still
398
- require a new conversation; this patch does not relax that isolation.
399
-
400
-
401
- Company-account history is isolated. `conversations.json` stores at most 1024 hashes of conversation identifiers (or the first user item when no native identifier exists) and their account fingerprints; no messages, raw session IDs or tokens are stored there. Each new conversation writes its ownership once; known conversations use memory. After changing accounts, known foreign conversations are refused before forwarding. Unknown requests containing old history are also refused, including after restart; use a new conversation. Clients without stable conversation IDs can collide when their first user item is identical, so supply a unique native session ID. Evicted/unrecognized history fails closed after a switch. The history-isolation marker is saved with the binding and survives token renewal. Removing the M365 profile clears this ownership file, but never removes system sign-in or usage history.
402
-
403
- Account selection stages the new authorization/catalog before replacing the old provider. Catalog and binding writes use the existing locked atomic writer with restoration on failure; this is not a crash/power-loss transaction. Client configuration remains a separate readiness state: its failure does not claim that account authorization failed or overwrite custom/managed fields. Previously saved model preferences are not substituted when the new account lacks those models.
404
-
405
- Since 1.1.0, Claude mounts under the main HTTP listener at
406
- `http://127.0.0.1:<ADAPTER_PORT>/anthropic` (default main port 2026).
407
- It exposes `GET /anthropic/v1/models`, `POST /anthropic/v1/messages` and
408
- `POST /anthropic/v1/messages/count_tokens`. The Claude Base URL excludes the final `/v1`.
409
- The local socket, loopback Host, native-client Origin rejection and private Bearer
410
- or `x-api-key` checks remain independent of any main-listener LAN opt-in.
411
- Messages tools, thinking, signatures, image blocks, beta headers and SSE retain
412
- their native protocol and backpressure/cancellation handling. Provider-specific
413
- cache policy is described below; the local gateway key is never forwarded upstream.
414
-
415
- The protocol handler owns only its responses, never the shared server. Codex,
416
- WebUI and Claude share the main port; native prediction keeps its CONNECT/PAC
417
- transport and saved port. Root `/v1/messages` remains retired, including on a
418
- custom main port. Claude requests never reach GitHub. M365 GPT-only catalogs do
419
- not configure Claude. Optional Claude setup failure leaves the Codex backup independent.
420
-
421
- Unchanged CCDX-owned Code/App addresses migrate from 2027 to the shared prefix,
422
- with the original restoration values preserved. User-edited fields, managed
423
- settings and explicit environment routes remain preserved. CCDX does not keep
424
- a permanent 2027 compatibility listener; migrate hand-written old URLs explicitly.
425
- Already-running clients may need a normal restart to reload their base URL.
426
- Disabling/removing M365 is rejected while its Codex or Claude inference is active,
427
- so an accepted disable does not cut off those requests.
428
-
429
- Loki explicitly rejects one-hour prompt-cache retention. M365's request policy
430
- caps standard `cache_control: {type: "ephemeral", ttl: "1h"}` fields to `5m`,
431
- logs that limitation once and counts adjustments in its status. Prompt bytes,
432
- breakpoint positions, tool input, thinking and approval settings do not change.
433
- This is a retention/cost limitation of the new M365 path, not an equivalent
434
- one-hour cache guarantee. GitHub caching is unchanged.
435
-
436
- The gateway publishes canonical Claude version IDs such as `claude-opus-5-5`,
437
- while M365 receives its exact `claude-opus-5.5` ID. Existing raw IDs are still
438
- accepted. Only exact supported family/version spellings are normalized; alias
439
- collisions fail explicitly. Bodies, thinking signatures and native response bytes
440
- remain intact apart from the existing cache-TTL policy and the upstream model ID.
441
-
442
- `capabilities.supports.reasoning_effort` supplies deployment-specific effort
443
- metadata. App `inferenceModels` entries receive the highest recognized advertised
444
- `maxEffort`; Code discovery receives canonical IDs. A successful catalog refresh
445
- reconciles unchanged owned fields outside inference serialization. An owned legacy
446
- Code default can migrate to its matching canonical ID; valid user model/effort
447
- preferences are preserved. Reads after a profile change invalidate page catalogs.
448
- Unknown metadata stays unknown. Unknown effort names remain visible as upstream
449
- metadata and are not invented as App caps. When an explicit effort list exists,
450
- requests for absent efforts fail before inference, without dropping the field or
451
- substituting a lower level. Missing metadata leaves the upstream authoritative.
452
-
453
- App effort controls also depend on its model knowledge. Supported versions can
454
- read Anthropic's signed catalog under the App's existing network and management
455
- policy; CCDX neither replaces that signed document nor changes its URL/policy.
456
- `maxEffort` is a ceiling, not an arbitrary discrete allowlist: client-visible
457
- options may differ from an upstream's sparse list, while exact request validation
458
- remains authoritative. Unknown model identities or new protocol semantics can
459
- still need a client or CCDX update. A displayed control alone is not an inference
460
- verification. See [Claude model configuration](https://claude.com/docs/third-party/claude-desktop/configuration)
461
- and [gateway behavior](https://code.claude.com/docs/en/llm-gateway-protocol).
462
-
463
- For Claude Code, CCDX owns only its gateway environment fields in
464
- `CLAUDE_CONFIG_DIR/settings.json` or `~/.claude/settings.json`. For Claude App it
465
- uses the installed client's third-party config library, with one named
466
- `CCDX Microsoft 365` profile and the normal third-party deployment setting.
467
- macOS stores the owned App configuration below `~/Library/Application Support/Claude-3p`;
468
- Windows uses `%LOCALAPPDATA%/Claude-3p`. First-party Claude configuration is not modified.
469
- See the [official desktop configuration contract](https://claude.com/docs/third-party/claude-desktop/configuration).
470
- Existing foreign gateways,
471
- cloud-provider choices, other selected App profiles and detected managed desktop
472
- policies are preserved. No binary patch, system certificate, execution-policy
473
- change or forced App restart is performed. An already-running client can require
474
- its normal restart to read the saved settings; “configured” is not proof of a
475
- visible chat or successful reply.
476
-
477
- Claude Code 2.1.295 emits experimental fields that this Loki API rejects with
478
- `invalid_body`. Owned gateway setup therefore supplies the documented
479
- `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` compatibility option when no explicit
480
- environment override exists. Existing user values are preserved. This leaves
481
- standard tools, thinking and prompt-cache fields available; first-party-only beta
482
- features are not promised. CCDX does not silently delete conversation content,
483
- disable approval checks, or retry inference with reduced semantics. See the
484
- [official variable reference](https://code.claude.com/docs/en/env-vars).
485
- For Codex, both verified providers reject native image-generation declarations;
486
- their explicit request policy retains CCDX image function/MCP tools instead.
487
-
488
- `off` selects GitHub, stops M365 and restores only unchanged owned Claude fields.
489
- `remove` additionally removes CCDX's account/catalog/gateway/ownership files,
490
- while retaining the disabled preference and historical usage. Active M365 requests
491
- block removal; user-modified fields block full cleanup and are reported, not
492
- deleted. Neither operation clears Codex transcripts or shared image output.
493
-
494
- ### Isolation and measurements
495
-
496
- Each request is pinned to its provider. Response IDs/history are namespaced by
497
- provider and account inside the existing shared history-byte limit; this is not a
498
- second unbounded history cache. Explicit switching can replay complete visible
499
- history. Foreign encrypted reasoning is not forwarded; opaque tool/compaction
500
- state requires verified local plaintext recovery, otherwise the request fails
501
- without discarding earlier context. No automatic cross-source retry is performed.
502
-
503
- CLI usage and WebUI include source filtering; historical records without a source
504
- are treated as GitHub. Claude's cache-read/cache-write input is included in its
505
- normalized total input, with raw reported usage retained. Missing counts remain
506
- unknown. Combined totals are labeled; identical model names across providers can
507
- be separated with the filter. The M365 status card separates auth/catalog state,
508
- gateway availability, client configuration and selected Codex source. Observed
509
- client requests are not claimed to prove the App's UI state. `doctor --online`
510
- checks the selected provider; `doctor --fix` does not reimport inactive GitHub auth.
511
- Claude gateway outcomes are displayed separately; core HTTP totals retain their
512
- existing main-listener meaning rather than mixing in another protocol's counts.
513
-
514
- CCDX is a local compatibility adapter for Codex App. It configures Codex to use an OpenAI Responses API on loopback while GitHub authentication, model discovery, and inference stay backed by GitHub Copilot.
515
-
516
- ## How it works
517
-
518
- ### Retired prediction integration
519
-
520
- The manual prediction MCP, automatic Stop hook and dashboard panel are removed.
521
- CCDX does not install a prediction skill or replacement predictor. Startup disables
522
- the old `suggestion.json` preference and removes only unchanged CCDX declarations
523
- from the active `CODEX_HOME/config.toml` (or `~/.codex/config.toml`).
524
- `CCDX_SUGGESTION_CONFIG` still identifies the legacy settings path for cleanup.
525
- For an immediate cleanup without starting the adapter, run `ccdx suggestion off`.
526
- The old `suggestion on` and `suggestion model` commands cannot re-enable it.
527
-
528
- Modified, inline and profile-specific declarations are preserved. Cleanup failures
529
- do not block the core adapter. Saved model preferences and old candidate files are
530
- not deleted; they are inactive. Native Codex preference settings, hook trust records,
531
- other hooks and the optional image MCP are untouched. Two inert compatibility
532
- entrypoints prevent user-modified registrations from invoking a removed module:
533
- the old Hook exits with an empty result, and the old MCP exposes no tools or panel.
534
-
535
- ### Optional native predictions
217
+ ## Optional native predictions
536
218
 
537
219
  Native next-message predictions are **off by default** and use no MCP, Hook, skill,
538
220
  panel, renderer injection, or client-program modification. This compatibility
@@ -638,15 +320,15 @@ have the separate restart/setup requirements described below.
638
320
 
639
321
  ```bash
640
322
  # Fully quit Codex App first.
641
- ccdx prediction on
323
+ ccdx app codex prediction setup
642
324
  # Restart the running CCDX process, then launch Codex through ccdx.
643
325
  ccdx
644
- ccdx prediction status
326
+ ccdx app codex prediction status
645
327
  # Repair only an already-enabled bridge in a compatible running CCDX service:
646
- ccdx prediction fix
328
+ ccdx app codex prediction repair
647
329
 
648
330
  # To remove the optional setup, fully quit Codex first:
649
- ccdx prediction off
331
+ ccdx app codex prediction remove
650
332
  ```
651
333
 
652
334
  Enabling explicitly adds a private certificate trust record to the selected App
@@ -746,7 +428,7 @@ requests can fail during an outage and are never replayed by this supervisor.
746
428
  Disabled prediction startup creates no recovery timer. The existing in-memory
747
429
  overlay switch still observes explicit on/off changes independently.
748
430
 
749
- `ccdx prediction fix` asks the running adapter for one explicit repair, without
431
+ `ccdx app codex prediction repair` asks the running adapter for one explicit repair, without
750
432
  starting another core service or forcibly restarting Codex. Disabled predictions
751
433
  remain off. Healthy/current bridges with unchanged environments are kept; a failed bridge or changed App identity
752
434
  reuses the saved port, certificate and verified profile. Compatibility, certificate,
@@ -820,417 +502,13 @@ route state, recovery attempts and recoveries. These are independent of the
820
502
  unknown candidate-visibility value. A successful recovery only means the bridge
821
503
  was recreated on the original address, not that gray text appeared.
822
504
 
823
- ### Configuration ownership
824
-
825
- Core setup, image setup/guidance, config doctor, optional history compression and
826
- legacy prediction cleanup resolve the same `CODEX_HOME/config.toml`; absent
827
- `CODEX_HOME`, they use `~/.codex/config.toml`. An explicit function-level file path
828
- still takes precedence for embedders. App-profile trust is a separate location
829
- selected by `CODEX_ELECTRON_USER_DATA_PATH`, not by `CODEX_HOME`.
830
-
831
- CCDX-owned config mutations share an owner-recorded cross-process lock, reread
832
- under the lock, and retain existing atomic replacement/rollback checks. User
833
- settings updates use a separate lock for their shared JSON file; prediction
834
- on/off uses its own settings lock. Readers take no lock and write no lock file.
835
- Contention fails with a retry message instead of stealing a live lock. Other
836
- applications do not participate in these locks, so snapshot conflict checks still
837
- apply; the locks do not claim a global filesystem transaction.
838
-
839
- Since `0.9.33`, local settings/auth metadata reads are capped at 1 MiB, token
840
- files at 64 KiB, and saved model catalog files at 9 MiB including metadata.
841
- Oversized files remain untouched. Existing strict readers reject them; optional
842
- cache readers treat them as unusable. Conversation files, HTTP request limits
843
- and runtime history/cache limits are unchanged.
844
- Full `ccdx doctor` reports npm's global installation target and readonly credential
845
- permission evidence. Windows checks existing NTFS allow entries for other
846
- identities, without changing ACLs. This is not a full effective-access audit;
847
- unavailable checks warn. `doctor config` performs neither npm nor ACL probes.
848
-
849
- ### Core adapter
850
-
851
- One in-process adapter listens on `127.0.0.1:2026` by default and exposes:
852
-
853
- - `POST /v1/responses`
854
- - `POST /v1/responses/compact`
855
- - `GET /v1/models`
856
-
857
- Responses-only models and compaction use Copilot's Responses transport directly. For requests routed through Chat Completions, CCDX converts the supported text, image, and function-tool subset and rejects incompatible message content rather than turning it into JSON text. Chat `length` and `content_filter` finish reasons become incomplete Responses in both streaming and non-streaming modes. Both streaming SSE and non-streaming responses are supported.
858
-
859
- Chat conversion maps an explicitly supplied `reasoning.effort` to `reasoning_effort`.
860
- Known effort values are checked against the existing model catalog when it advertises
861
- an effort array; without that metadata, upstream validation remains authoritative.
862
- No extra model lookup is made. Malformed function tools, forced undeclared functions,
863
- unsupported tool-choice strings and unknown text formats receive a local compatibility
864
- error instead of being dropped. Native Responses request fields are not changed by this check.
865
-
866
- The adapter handles response history, encrypted reasoning state, function/custom tools, images, compaction, cancellation, retries, and usage metadata within the compatibility boundaries below. Routing prefers endpoint metadata from Copilot's live or cached catalog; when metadata is unavailable, a small built-in set identifies known Responses-only GPT models.
867
-
868
- ### Local compaction recovery
869
-
870
- `0.9.28` adds bounded local recovery; the affected user's real chat still needs
871
- verification. After the exact decoded HTTP 400 `input item does not belong
872
- to this connection` rejection, or its HTTP-200/pre-output Responses failure
873
- equivalent, a request containing encrypted compaction can attempt one verified
874
- plaintext rebuild. Healthy encrypted histories remain unchanged.
875
-
876
- The reader is loaded only after this failure. It requires a loopback peer and
877
- Host, no browser Origin, and LAN mode disabled. It binds a UUID from native
878
- `thread-id` / `client_metadata.thread_id`, or an exact UUID session/cache key
879
- when primary metadata is absent. Conflicting primary IDs are rejected. It reads
880
- only UUID-matching rollout filenames under the service's configured
881
- `CODEX_HOME/sessions` and `archived_sessions`; it does not search by conversation
882
- title, similarity, arbitrary request paths or another machine's filesystem.
883
-
884
- Supported source files are complete JSONL logs and their `.jsonl.zst` variants,
885
- decoded with Node's built-in Zstandard support. Header identity, the exact
886
- compaction ciphertext, retained message order and function/custom-tool pairs
887
- must match. A history-base reference, fork reference, rollback/reset marker,
888
- missing plaintext tool content, malformed data or multiple matching sources
889
- stops recovery. Referenced/split histories are not assembled by this recovery;
890
- the caller must have a complete standalone source prefix.
891
-
892
- The request replaces the rejected compaction with recorded plaintext before it,
893
- retains current instructions and post-compaction input, and removes unavailable
894
- reasoning. It does not decrypt or claim to reproduce hidden encrypted reasoning.
895
- Normal preparation, image limits and upstream model/context limits still apply.
896
- The reader has a five-second deadline, a 4,096-entry directory lookup bound and
897
- a 16-candidate bound. Decoded reads and the rebuilt body are bounded by the
898
- running adapter's decoded-body limit; history admission reservations cover
899
- recovery preparation. Requests cannot retry after visible output has begun.
900
-
901
- Overlapping equivalent recovery readers share in-flight source discovery/decoding,
902
- with independent cancellation and independent restored requests. Every caller retains
903
- its admission reservation; exclusive admission can serialize reads instead of sharing.
904
- Successful plaintext is not retained after the flight settles. Up to 32 failure-code
905
- records last two seconds, keyed by the exact source file identity/size/timestamps,
906
- thread, compaction digest and byte limit. Directory discovery still runs; missing
907
- sources, cancellation, deadlines and unstable snapshots are not cached. Source changes
908
- invalidate reuse. No transcript index, watcher or healthy-request scan is added.
909
-
910
- Neither the original rollout nor client configuration is rewritten. Recovery
911
- diagnostics contain type/count/status metadata, not transcript text, ciphertext
912
- or file paths. If verification fails, `ccdx_history_rebuild_required` includes
913
- `recovery.local_status`; "not modified" does not imply CCDX has backed up complete
914
- plaintext. Cross-machine/LAN recovery is intentionally unavailable. A full
915
- plaintext replay can still exceed the upstream context window; this recovery
916
- does not silently truncate it or add chunked re-compaction.
917
-
918
- ### Reasoning usage declaration
919
-
920
- Native Responses success replies preserve `X-Reasoning-Included: true` only
921
- when the upstream explicitly returns a case-insensitive literal `true`.
922
- Missing, false or other values are not forwarded: current Codex treats header
923
- presence as a declaration that historical reasoning is already counted.
924
- CCDX does not infer that declaration from `output_tokens_details`, invent it,
925
- add it to Chat-converted replies or HTTP/JSON failures, or change token totals.
926
- Streaming headers describe the upstream declaration, not a guarantee that the
927
- stream will later complete. This is compatibility metadata, not proof of lower
928
- context use, faster inference or fewer compactions on every client.
929
-
930
- ### Fast and Standard modes
931
-
932
- Codex can select Standard or Fast without changing CCDX configuration. When the client requests a model with `service_tier: "priority"`, CCDX uses its exact `-fast` model only when the live Copilot catalog advertises that variant as enabled, selectable, OpenAI-owned, and Responses-only. Standard mode continues to use the base model; CCDX does not invent Fast availability when the upstream catalog does not provide it. This retains the established `gpt-5.6-sol` / `gpt-5.6-sol-fast` mapping and applies the same exact-match rule to future models.
933
-
934
- Codex Auto-review uses the hidden `codex-auto-review` model ID. CCDX maps it to Copilot's `gpt-6.1-sol` Responses model by default, independently of the interactive Fast/Standard selection, and logs both model IDs when the mapping is used. Without a saved reasoning override, an omitted Auto-review effort defaults to `low`; explicit client efforts are preserved. A saved override changes only review effort, preserving other reasoning fields. The review target and effort can be changed interactively without reinstalling or restarting a current CCDX adapter.
935
-
936
- ### GPT-6 model catalog
937
-
938
- Codex App requests a versioned, capability-rich model catalog that is different from Copilot's raw model list. CCDX reads the complete catalog bundled with the installed Codex App and preserves every other model entry and capability. It exposes each managed GPT-6 entry only when Copilot advertises that exact model as enabled, selectable, OpenAI-owned, and Responses-capable.
939
-
940
- When an installed 0.155.x catalog does not yet contain `gpt-6-sol` or `gpt-6-luna`, CCDX derives their client-compatible entries from that catalog's GPT-6 Astra schema and the published OpenAI Codex model definitions at commit `0a2eb4696c26ac33204bcd255721ab30220a4774`. When an installed 0.158+ catalog contains `gpt-6-sol` but not `gpt-6.1-sol`, CCDX derives only the missing 6.1 entry from that client's Sol schema and OpenAI Codex model identity/defaults at commit `ab84d71f5767e4a565ce81c2c426287cb48c7918`. Fallback reasoning controls are intersected with Copilot's advertised efforts; every other bundled entry retains its established behavior. A newer client-provided entry supplies its schema and future fields while CCDX still gates its visibility, speed tiers, and 6.1 Sol reasoning controls against Copilot.
941
-
942
- CCDX exposes GPT-6 Standard paths and removes unverified speed-tier metadata. Existing GPT-6 bundled reasoning-effort options remain unchanged; 6.1 Sol is limited to efforts advertised by Copilot. Fast follows the exact upstream-variant rule above. Versioned model discovery matches the bundled catalog to the client's `client_version`, including the nested Codex CLI binary in current macOS App bundles, caches it by application binary identity, and reloads it after an App update. If a matching usable catalog cannot be loaded, the versioned models request returns `503`; an unversioned request returns the Copilot-style list.
943
-
944
- `/v1/models` still attempts live discovery first. With a usable in-process catalog, it limits that upstream wait to 1.5 seconds (or a shorter configured upstream timeout) before falling back to last-known-good data. Without a catalog it retains the regular upstream timeout. Received HTTP `401`/`403` responses remain errors, not cached successes; fallback does not grant inference access. This does not change the explicitly live `ccdx models` command.
945
-
946
- ## Prerequisites
947
-
948
- - A GitHub account with Copilot access to the desired models
949
- - Node.js 22.15 or newer, for built-in Zstandard request decompression
950
- - Codex App on macOS
951
-
952
- ## Install and start
953
-
954
- ```bash
955
- npm install -g codex-copilot-dx@latest
956
- ccdx
957
- ```
958
-
959
- `ccdx` is the primary launcher. The old `codex-copilot-dx` executable remains temporarily as a compatibility shim: it prints a deprecation warning at most once every seven days in interactive terminals, runs `ccdx`, and remains silent in scripts. The warning timestamp is stored under `XDG_CACHE_HOME` or `~/.cache`; `doctor config` bypasses that warning cache to remain read-only. The alias will be removed in a future breaking release.
960
-
961
- For a one-off run without a global install:
962
-
963
- ```bash
964
- npm exec --yes --package=codex-copilot-dx@latest -- ccdx
965
- ```
966
-
967
- On a normal launch, CCDX:
968
-
969
- 1. Prints the installed package version and checks GitHub's latest stable release in the background (not npm).
970
- 2. Reuses a compatible running adapter when available; otherwise it reuses a compatible local Copilot credential or starts GitHub Device Flow when authentication is required.
971
- 3. Loads a usable model cache or attempts a live refresh, then starts listening. A cache older than two hours refreshes in the background; a fresh cache can be used immediately. A failed refresh retains the last-known-good list when one is available.
972
- 4. Checks the startup-managed settings in `CODEX_HOME/config.toml` (default `~/.codex/config.toml`), including the local `/v1` endpoint.
973
- 5. Attempts to open Codex App on macOS unless `CCDX_AUTO_LAUNCH` disables it.
974
-
975
- The `OPENAI_API_KEY=dummy` value used in the Codex shell environment is only a client-side placeholder. It is not a GitHub credential. CCDX exchanges the saved GitHub OAuth credential for short-lived Copilot service tokens internally.
976
-
977
- On startup, CCDX also adds `context_management = true` under `[features]` when the key is missing, creating the section if needed. Existing values, including `false`, are preserved. Existing inline or dotted `features` declarations and nested context-management settings are left intact to avoid conflicting TOML definitions. This opts unconfigured users into Codex context management; support and behavior depend on the installed Codex version. A configuration that already matches is not rewritten.
978
-
979
- Startup and adapter reuse also attempt an optional `local_thread_store_compression = true` default under `[features]`. CCDX probes installed macOS App runtimes with `features list`, using an empty temporary Codex directory, no inherited credentials/provider overrides, a 1.5-second timeout per runtime and a 128 KiB output limit. All discovered App readers must advertise a supported, disabled feature; missing/removed/unknown/default-on features or failed probes skip setup. Existing user settings (including `false`, inline/dotted forms and legacy profile overrides) are preserved without probing. Alternative feature-table declarations that cannot be safely extended are left intact. The shared config is reread after probing, and only this key can change. Temporary probe directories are removed; no user transcript is read or compressed by CCDX itself, and no upstream or npm lookup is added. Ready and core requests do not wait for this optional task; its failures never abort the main service. On a first launch, the App may read the config before this background task finishes; the setting is available on its next config load/restart.
980
-
981
- This remains an experimental Codex storage feature. Current Codex compresses cold local transcript files, including shared histories, with Zstandard; every external reader of that Codex directory must also support the format. It does not reduce model context, request-body limits or CCDX's in-memory history cache, and CCDX does not promise faster inference. Existing third-party transcript readers are not detected. `ccdx doctor config` remains a config-only preview of essential startup settings; it does not spawn runtimes or predict this optional compatibility-gated default.
982
-
983
- If a compatible adapter is already running, a later launch reuses it and checks the local Codex configuration. Reuse requires the same package version, protocol version, and required capabilities. After updating the package, stop the old adapter before starting the new version. Installing or updating the package alone does not restart the adapter or update Codex configuration.
984
-
985
- ### Codex configuration writes
986
-
987
- Normal startup and reuse of an existing adapter check `CODEX_HOME/config.toml` (default `~/.codex/config.toml`) once, after startup prerequisites succeed. There is no file watcher or periodic configuration rewrite. Startup, image setup, config doctor, compression and legacy prediction cleanup share this path. CCDX does not edit project-level Codex files.
988
-
989
- | Setting | Existing file | New file |
990
- | --- | --- | --- |
991
- | Top-level `openai_base_url` | Add or update to the adapter's `/v1` address | Set to the adapter address |
992
- | `model_context_window` | Add `1000000` only when missing | `1000000` |
993
- | `model_auto_compact_token_limit` | Add `900000` only when missing | `900000` |
994
- | `[shell_environment_policy.set]` OpenAI URL/key | Update `OPENAI_BASE_URL` and set `OPENAI_API_KEY="dummy"` when this section is recognized; leave an absent section absent | Create the section and set both keys; set `shell_environment_policy.inherit="core"` |
995
- | `[features]` `context_management` | Add `true` when missing; preserve explicit values and alternative declarations as described above | `true` |
996
- | `[features]` `local_thread_store_compression` | Optional compatibility-gated default; preserve existing values, skip already-on/unsupported/unavailable runtimes | `true` only after a successful probe |
997
- | `[mcp_servers.ccdx_image]` | Added in a marked CCDX-owned block only after `ccdx enable-image`; removed by `ccdx disable-image` | Absent by default |
998
-
999
- The two token limits are fixed defaults, not detected model capabilities. Existing custom values are retained. Writes target the listed keys with format-preserving edits and atomic replacement; this is not a general TOML formatter. Quoted keys, quoted table headers, and explicit dotted shell-environment declarations are recognized; inline shell-environment tables are left intact. Startup and image configuration commands validate UTF-8/TOML and verify that unrelated settings retain their values before writing. An unsafe edit leaves the original file unchanged. Use `ccdx doctor config` to inspect parsed values and preview what this writer would do with the current file. No actual change means no file rewrite.
1000
-
1001
- Interactive image setup rereads the shared config after prompts and network validation, so unrelated changes made during setup are preserved. It checks the snapshot again before committing and rejects conflicting image declarations. Identical configuration bytes are not replaced; private file permissions may still be corrected. These checks reduce lost-update risks but are not a filesystem-wide transaction with other applications that do not share a lock.
1002
-
1003
- ## Version 0.7.0 migration
1004
-
1005
- CCDX 0.7.0 retired the former personal-GitHub Claude App, Claude Code, Anthropic Messages API, isolated Claude account, and PM Studio patch integrations. Their old setup, status, restore, profile, and routing commands remain unsupported. Version 0.10.0 adds a separate M365-only Claude gateway; it does not reactivate these old routes or PM Studio support.
1006
-
1007
- If PM Studio is still patched by an older CCDX release, update or reinstall PM Studio to restore its official application bundle. CCDX 0.7.0 does not patch PM Studio and does not provide a restore workflow.
1008
-
1009
- The upgrade intentionally does not delete or rewrite retired Claude or PM Studio configuration, historical patch backups, or isolated credentials created by older versions. Normal Codex configuration updates continue as documented above. Review and remove obsolete retired-integration state yourself only if you no longer need it.
1010
-
1011
- ## Commands
1012
505
 
1013
- Run `ccdx <command> --help` or `ccdx help <path>` for command behavior and
1014
- side effects. On supported interactive terminals ordinary startup checks use one
1015
- transient row. Device authorization instructions and warnings remain visible.
1016
- The foreground live region then owns one listener/uptime line, enabled sources,
1017
- peer client setup/activity, returned usage, notices and a separate animation line.
1018
- Source names start in column one immediately below `Enabled sources: N`.
1019
- Small terminals compact summaries without changing metric meaning. The atom,
1020
- colors, plain/NO_COLOR/dumb output and verbose paths remain.
1021
-
1022
- Enabled sources are not inferred online-authorized. Configured client settings
1023
- are not App process liveness or proof that all visible models were adopted.
1024
- Codex legacy startup writes expose only their observed configured/preserved state;
1025
- managed model-plan state keeps priority. No new App probe is started by rendering.
1026
- The live region uses existing model activity, including actual image generation,
1027
- not image MCP tool-listing traffic. The model-request table retains its three
1028
- text-inference routes; HTTP/capability counters stay in detailed diagnostics.
1029
- Unknown outcomes appear when nonzero. Failed reads keep timestamped prior usage
1030
- and mark current activity unknown rather than clearing counters or showing Idle.
1031
-
1032
- Supported TTY output replaces redundant Ready/Web/Claude summaries. Non-TTY,
1033
- verbose and short-lived existing-service paths retain their compatible startup
1034
- output. `Ctrl+C` stops only the foreground-owned service. Logs remain available
1035
- through explicit file logging or verbose mode, without growing the live region.
1036
-
1037
- ### Live models
1038
-
1039
- ```bash
1040
- ccdx models
1041
- ```
1042
-
1043
- With GitHub selected, this performs a fresh, read-only GitHub Copilot model-directory lookup without starting the adapter, opening Device Flow, reading the local model cache, or consuming an inference request. It lists selectable GPT model IDs, providers, advertised APIs, and preview status. With M365 selected it reads the running provider's isolated GPT catalog. Catalog availability does not guarantee that a later inference request will avoid quota, rate-limit, or policy enforcement.
1044
-
1045
- Concurrent identical live lookups share only the active request. Caller
1046
- cancellation is independent; results are not retained as a fresh catalog after
1047
- completion. The dashboard cancels its waiter when the read is abandoned.
1048
-
1049
- Interactive terminals use aligned tables for `models`, `auth status`, and `usage`. Redirected or piped output retains the plain-text layout for scripts; use `--format table` or `--format plain` when a command offers an explicit format override.
1050
-
1051
- `ccdx usage` and the dashboard Model Usage table show token cache hit rate for each model and the aggregate: recorded cached input tokens divided by recorded input tokens, weighted by token count rather than averaging request percentages. This describes the upstream prompt cache; the local history and image-transform caches are separate. Incomplete historical records do not hide a computable ratio: `~` marks a rate derived from incomplete counts. A rate is `—` when input tokens are zero, usable totals are missing, or token counts are invalid. Older logs may omit explicit zero cache counts; new Responses usage records retain reported zeros. CLI tables keep existing token columns on narrow terminals and show rates below the table when the extra column does not fit.
1052
-
1053
- ### Auto-review model
1054
-
1055
- ```bash
1056
- ccdx auto-review-model
1057
- ```
1058
-
1059
- With GitHub selected, the selector first queries the running adapter, including its last-known-good model list when live refresh is unavailable, then falls back to a local model cache no older than seven days. It offers model IDs that advertise a Responses endpoint and are not explicitly hidden from the model picker. M365 selection uses only that running provider's catalog and separate saved preference, with no GitHub cache fallback. This selection does not itself verify policy or inference access.
1060
-
1061
- Enter a model number, then a reasoning-effort number. The second menu reuses the same model-directory lookup and lists only advertised efforts. GPT-6.1 Sol excludes `none` and `minimal`, even if upstream metadata incorrectly lists them. Enter keeps the current valid effort or selects `low` for a new selection when advertised; `0` follows the client (or `low` if the request omits effort). If effort metadata is absent, only `0` is offered. Enter `q` at either step to cancel without saving either choice.
1062
-
1063
- Both choices are saved together in `~/.config/codex-copilot-dx/config.json`, or under `XDG_CONFIG_HOME` when set. Choosing `gpt-6.1-sol` clears the model override and restores the package default. A selected effort is saved as `auto_review_reasoning: { "model": "gpt-6.1-sol", "effort": "medium" }` and applies only when its model matches the effective review target. Existing saved models, including `gpt-5.5`, and environment model overrides retain their precedence; changing the model via an environment variable does not transfer another model's effort. Choose `0` to clear the effort override; its `null` marker remembers client-following so Enter preserves that choice next time. Users who do not configure effort retain their existing behavior. Adapters running 0.9.13 or newer read both settings on the next Auto-review request; older adapters must first be upgraded and restarted. No client patch, foreground-model change, Fast mapping, permission or approval-policy change is involved.
1064
-
1065
- ### Runtime caches
1066
-
1067
- ```bash
1068
- ccdx cache
1069
- ccdx cache --limit 128
1070
- ccdx cache --limit default
1071
- ccdx cache --clean
1072
- ccdx cache --clean --history
1073
- ```
1074
-
1075
- `ccdx cache` separates the shared in-memory Responses history from the rebuildable input-image transform cache. The history limit accepts 16–1024 MiB, is saved in the normal CCDX settings file, and applies immediately to a compatible running adapter. `CCDX_RESPONSE_HISTORY_MAX_BYTES` remains the higher-precedence environment override. Lowering the limit below current usage is rejected rather than evicting tasks silently. `ccdx cache -128` is a short alias for `--limit 128`; `-clean` aliases `--clean`.
1076
-
1077
- Plain `--clean` clears only completed image transforms; the next matching request may recompute them. Adding `--history` also invalidates all process-local `previous_response_id` chains and can make a task's next continuation fail, so it requires interactive confirmation or `--yes`. Cleanup refuses active cache users; retry after current requests finish. It never deletes Codex transcripts, generated image files, provider credentials, image edit handles, model catalogs, or usage/debug logs. A stopped or older adapter must be restarted before runtime cleanup; a saved limit applies on the next start.
1078
-
1079
- ### Request-body limits
1080
-
1081
- ```bash
1082
- ccdx limits
1083
- ccdx limits --decoded 256
1084
- ccdx limits -256
1085
- ccdx limits --decoded default
1086
- ```
1087
-
1088
- `ccdx limits` distinguishes the saved decoded request-body limit from the running adapter's active limit. The default is 128 MiB; the opt-in saved limit accepts 128–512 MiB. Changes take effect only after restarting the adapter, never restart it automatically, and do not clear conversations or caches. `CCDX_MAX_DECODED_BODY_BYTES` overrides the saved setting; unset it before changing the saved limit. The separate 64 MiB raw/compressed-body limit is not changed. Larger decoded requests can use substantially more process memory during JSON parsing and image preparation; raising this limit may enable a large thread to compact, but does not guarantee successful inference or compaction. Return to `default` after temporary use.
1089
-
1090
- ### Control console and online settings
1091
-
1092
- The sidebar separates Overview, indented Codex/Claude Apps, Model sources, Usage, Requests, and Settings. Codex owns optional image generation, native
1093
- prediction adaptation and the temporary Responses conversation buffer. That
1094
- buffer supports continuation; it is not a chat archive. Shared HTTP traffic and
1095
- per-protocol model outcomes are distinct. Claude Messages metrics are not labeled
1096
- as all Microsoft 365 traffic. Saved credentials, authorization, catalog discovery,
1097
- client configuration and successful requests are separate evidence.
1098
-
1099
- Interactive desktop starts open the default browser once after core readiness.
1100
- `--no-browser` skips this for one invocation; `open_webui:false` in
1101
- `~/.config/codex-copilot-dx/config.json` disables subsequent automatic opening.
1102
- Query commands do not open it. Headless/CI/SSH or noninteractive starts skip it;
1103
- a browser-launch failure does not stop the service. This is an opening attempt,
1104
- not a guarantee that every browser will reuse an existing tab.
1105
-
1106
- The default TTY display uses wrapping source/Claude summaries, a line-framed usage/inference table, and separate notice/activity rows, without an alternate screen or raw keyboard input. It shows usage returned since this process began; pending
1107
- usage is excluded, missing usage stays partial, and this is not an invoice.
1108
- Business requests drive terminal activity; status/catalog polling does not. The live table fills its existing last usage row with Cache hit, using the same process-local cache_hit_rate and partial marker as Overview. Unknown/invalid rates display —; a known zero displays 0.0%. Existing nine
1109
- animation styles retain their timing and cycle pauses; the default green retains its original palette. `--verbose`,
1110
- `--show-request-id` or `CCDX_LOG_LEVEL=debug` restore detailed terminal output.
1111
- Failed reads show previous-data status and the last successful update time, or that no data has been received. Narrow summaries wrap rather than hiding Claude App/Code state. Non-TTY/CI/dumb/too-small terminals use plain output; repeated identical notices
1112
- are coalesced. File logging retains its existing explicit opt-in and redaction.
1113
- In-memory usage still updates when `CCDX_DISABLE_USAGE=1` disables persistence. `runtime_usage.by_provider` separates returned process-local usage by source. The Requests view contains live Request flow, Requests by source, recent failures and request context; `ccdx status` also lists source/protocol outcomes. Unknown outcomes and partial usage remain distinct. CLI remains English; WebUI keeps English/Chinese.
1114
-
1115
- The Clear conversation buffer action clears all process-local conversation continuation data. If image optimization or conversation history is active, cleanup is refused; retry after current requests finish. Old chats may fail to continue; saved Codex transcripts remain. It invokes the existing image-transform/history cleanup operation, rather than an inactive-only selector.
1116
-
1117
- The source page groups account/access checks and the model list under the selected
1118
- source. Selecting a source tab only browses it; application routing is changed from
1119
- the application page. Model names remain in the main table; maker, protocol,
1120
- reasoning levels, listing state and context limit are in each model's details.
1121
- The Codex choices and source table share one catalog read with freshness,
1122
- cancellation and account-generation checks. Explicit Refresh still checks again.
1123
-
1124
- Selection uses a solid theme fill with centered text, without a preceding check.
1125
- Model-list text uses the normal text color. Selects have square borders and a
1126
- visible keyboard focus indicator. Settings groups webpage appearance, independent
1127
- terminal color/animation, startup and updates. The terminal preview is expandable;
1128
- choosing an animation previews it, while Save applies it to the running terminal.
1129
- Usage trends are separate from the model summary and remain on demand. Request
1130
- rows show an observed HTTP failure separately from the model's terminal result;
1131
- request IDs and attempt counts are available in the same bounded details. List
1132
- timestamps use local 24-hour time in both UI languages.
1133
-
1134
- M365 catalog refusals expose a fixed reason, HTTP status, check/last-success time
1135
- and service request ID when available. `entra_access_disabled` means the server
1136
- reported that Copilot CLI Entra access is not enabled for that account; a generic
1137
- 403 does not establish why access changed. Sign-in, discovery and successful
1138
- inference remain separate evidence. Failed discovery keeps the account-bound
1139
- last-good list. A successful refresh clears old failure evidence. No automatic
1140
- relogin, model call, source switch or policy exception is added.
1141
-
1142
- The settings API is local, requires the dashboard header, bounded JSON and
1143
- same-origin POST. It invokes the same Provider, cache and integration operations;
1144
- it does not spawn a CLI or generic shell command. Settings reads do not reveal
1145
- upstream keys. Each operation reads back saved and effective state. Corrupt saved
1146
- service preferences fail closed for optional calls rather than reopening them.
1147
-
1148
- | Control | Effective scope |
1149
- | --- | --- |
1150
- | Webpage color | Current browser, immediately; independent of the existing dark/light choice |
1151
- | Terminal color | Live supported status table and animation; startup logo on the next launch |
1152
- | Terminal animation | Live supported status terminal; plain/verbose/environment-disabled modes are reported separately |
1153
- | Open WebUI | Next interactive desktop start |
1154
- | Image calls | New local MCP calls; keeps provider credentials and allows an already-started call to finish |
1155
- | Prediction adaptation | Subsequent configuration traffic on an already-provisioned bridge; keeps trust/route, and App caches can remain |
1156
- | Model source | Explicit validated selection for subsequent Codex requests; existing requests retain their binding |
1157
- | Conversation buffer | Live validated limit; cleanup refuses pinned/active data, then clears all buffered continuation IDs |
1158
-
1159
- Boolean allow preferences `terminal_animation_enabled`, `image_enabled` and
1160
- `prediction_enabled` default to true, preserving already configured features;
1161
- they do not provision or enable the default-off image/prediction integrations.
1162
- The existing explicit CLI enable commands resume the corresponding paused gate.
1163
- `disable-image` and `prediction off` retain their documented full cleanup
1164
- semantics, distinct from a WebUI pause. First-time setup and client trust/routing
1165
- changes still use existing compatibility checks and may require a normal App
1166
- relaunch. Environment-controlled limits cannot be overridden through the page.
1167
-
1168
- Visible auto-refresh reads the in-memory status approximately every two seconds,
1169
- and Provider/settings evidence approximately every 16 seconds. Hidden pages stop
1170
- scheduled reads. Catalogs and retained usage are fetched only for their open view
1171
- or an explicit lookup; their normal refresh interval remains 30 minutes. Paused
1172
- auto-refresh still permits manual refresh/settings retry. No history-log scan is
1173
- performed at the status cadence. The atom moves on load/manual refresh only and
1174
- respects reduced motion. Client attribution absent from older records stays unknown.
1175
-
1176
- ### Overview activity
1177
-
1178
- Overview reserves a fixed-height row below its status summary. Six 4px theme-colored dots appear and retract in order while the status snapshot reports active Responses, compaction, Claude Messages or actual image generation. Catalog reads, token counting, image MCP discovery and management calls are excluded; retries do not add another logical request. Active dots have no halo. Idle shows one small dot with a breathing halo. Invalid/missing status or a read older than six seconds shows Activity unknown, without a halo. This reuses the existing two-second status polling; short requests between snapshots may not be shown. No model probing, stream connection or extra polling is added. Hidden pages/views pause motion; reduced motion shows static corresponding states.
1179
-
1180
- ### Color themes
1181
-
1182
- Settings separates Web appearance and Terminal appearance. Both offer Classic green (default), Klein blue and Soft pink. Web appearance also offers Pure white: white page/surfaces with black text and icons in light mode, inverted in dark mode. All WebUI palette tokens, including alerts and charts, are grayscale; status icons and words retain their meaning. Terminal previews continue to reflect the independently selected terminal palette. Green preserves the previous palette and terminal table's original text colors. Blue and pink color the terminal logo, full table and activity animation without changing glyphs, timing or metric definitions. Webpage color is independent of terminal color, and of the page header's dark/light switch.
1183
-
1184
- Web choices use `ccdx.dashboard.palette` (`green` / `klein` / `pink` / `mono`) and the existing `ccdx.dashboard.theme` (`dark` / `light`) in browser local storage. They are applied before the stylesheet, including the atom favicon. Same-origin tabs receive storage updates; other browsers retain their own choices. If storage is blocked, the current tab still changes and explicitly reports that the choice was not saved. No service request is needed to change webpage colors.
1185
-
1186
- Terminal color uses `terminal_color_theme: "klein"` or `"pink"` in the normal CCDX user config. An absent value means `green`; choosing green removes the override. It does not change `terminal_animation` or any capability flag. The same bounded, strict settings read, file lock and atomic writer are reused. Invalid/unreadable existing config is not overwritten with defaults. A successful save applies to the supported live status table; the startup logo uses the saved choice next time. Previously printed terminal lines are not rewritten. Color codes are added after width calculation and clipping. Truecolor, 256-color and ordinary ANSI fallbacks are supported; `NO_COLOR`, dumb terminals and redirected output preserve plain output. A terminal's own palette and background affect the displayed color. Pink uses a darker tone when COLORFGBG explicitly identifies a light background (7 or 15); otherwise its default tone is pale pink. CCDX does not query or change the terminal background.
1187
-
1188
- The terminal sample in Settings is labeled Preview and uses sample numbers, not current usage. Existing nine animation previews and their save operation remain available beneath the color choice. Errors and warnings retain their text and status icons in every webpage theme; the three colored palettes also retain red/amber cues.
1189
-
1190
- ### Version and update information
1191
-
1192
- Settings ends with Version & updates. The current version belongs to the running service, which can differ from a newly installed package until CCDX restarts. Dates are GitHub Release publication dates, not local installation dates; an unavailable date is explicitly unknown. A verified newer stable release shows its version/date and `ccdx update github`. Copying a command never executes it. No background installation or service restart is added.
1193
-
1194
- Opening Settings reads `GET /_ccdx/ui/updates`, protected by the existing loopback/Host/dashboard-header checks. It reads public GitHub REST release metadata without credentials, accepting stable, non-draft releases only. The first successful check needs at most two serial metadata requests: latest, and the exact current tag when different. The current publication date is retained in memory. Concurrent reads share one lookup; successful results are cached for five minutes and failures for one minute. The page reuses the visible-view 30-minute refresh controller, so the two-second status timer never polls GitHub. Manual checks also respect the service cache. Network configuration discovery is asynchronous and reads only npm's named proxy/CA/TLS/offline settings; no registry or policy is rewritten. Each metadata request has a four-second deadline and a 128 KiB decoded-body limit, with no automatic retry.
1195
-
1196
- Failed/rate-limited checks never claim that the installed version is latest. Last-known release details remain labeled as such, separate from the latest check attempt. A failed current-tag date lookup does not hide an otherwise verified available update. The startup web-redirect check remains unchanged and independent of this REST check. If npm/network settings cannot be read or company policy blocks GitHub, the version card reports the check as unavailable.
1197
-
1198
- Expand the recovery instructions to choose macOS Terminal or Windows PowerShell. Commands download the version-pinned Release installer into a unique temporary directory and remove that directory afterward. They use the newer of the running version and last-known stable release, falling back to the running version if no release is known; stale metadata cannot select a downgrade. Installers retain the documented no-Git, minimum-runtime, rollback and configured-registry behavior. Windows instructions keep the current execution policy; if company policy blocks scripts, use its approved installation method. The current installer prefers a complete platform package and installs it offline; source-only old releases require the configured registry.
1199
-
1200
- Model-list failures name the selected source, retain its last successful list when available, and distinguish that list's timestamp from the failed check. Expand Check details for the bounded public reason, source, available HTTP status and check time. A retry time is shown only when the source supplies an actual retry delay; no new retry or automatic provider failover is added. Existing diagnostic redaction and size limits remain.
1201
-
1202
- ### Terminal animation
1203
-
1204
- Choose the terminal activity animation interactively:
1205
-
1206
- ```bash
1207
- ccdx animation
1208
- ```
1209
-
1210
- The selector is ordered numerically:
1211
-
1212
- 1. Comet (default)
1213
- 2. Twin
1214
- 3. Shuttle
1215
- 4. Chase
1216
- 5. Mirror
1217
- 6. Pulse
1218
- 7. Stack — short light trails arrive, accumulate, then leave as one bundle
1219
- 8. Relay — fixed nodes receive and pass a short light trail
1220
- 9. Split — one incoming light trail divides into two outgoing trails
1221
-
1222
- All nine rows preview their animations together while you enter a number to select one. The live previews keep each theme's original timing and leave the input cursor in place; selection ends them immediately. Small terminals, disabled animation, CI and dumb terminals retain static previews. Resizing or clearing the terminal pauses the live gallery so input stays usable. When the gallery cannot run, CCDX retains the selected animation's one-cycle confirmation when supported. The setting is saved in `~/.config/codex-copilot-dx/config.json`, or under `XDG_CONFIG_HOME` when set.
1223
-
1224
- All nine animations use the same 20-column colon track and cyan/blue palette. They indicate activity, not completion percentage. Braille was removed in 0.7.7. A saved `terminal_animation: "braille"` falls back to Comet without rewriting the settings file; choosing another animation replaces it, and explicitly choosing Comet clears it. Other settings remain intact.
1225
-
1226
- Running 1.1.0+ services pick up a changed saved theme without restarting. The WebUI applies it directly; the CLI gallery save is picked up by the status renderer within about one second. Older services still need a restart after upgrade. `CCDX_TERMINAL_ANIMATION=0` (also `false`, `no`, or `off`) remains the boolean gate that disables terminal animation regardless of the selected theme.
1227
-
1228
- ### Optional image generation
506
+ ## Optional image generation
1229
507
 
1230
508
  Image generation is disabled by default. Configure it interactively only when you want Codex App to receive the local CCDX image tool:
1231
509
 
1232
510
  ```bash
1233
- ccdx enable-image
511
+ ccdx app codex image setup
1234
512
  ```
1235
513
 
1236
514
  The command accepts an HTTPS base URL or a full `/images/generations` endpoint, then asks for an API key without echoing the key. A bare origin such as `https://api.example` expands to `/v1/images/generations`; `https://api.example/v1` expands to the same endpoint. Custom base paths are retained, and existing full endpoints remain unchanged. CCDX uses GET for the corresponding `/models` catalog and POST for image requests; there is no endpoint-search or automatic fallback. It asks for a numeric model selection only when multiple image models are available, then detects either the standard OpenAI Images request format or the supported `input.messages` format for the selected model only. Its single validation request omits the prompt and does not generate an image.
@@ -1250,8 +528,8 @@ Direct MCP generations and edits retain their original inline image content and
1250
528
  Inspect or disable the optional provider with:
1251
529
 
1252
530
  ```bash
1253
- ccdx image-status
1254
- ccdx disable-image
531
+ ccdx app codex image status
532
+ ccdx app codex image remove
1255
533
  ```
1256
534
 
1257
535
  `image-status` never prints the API key and performs only a local, non-generating tool-readiness check. It lists generation and editing separately based on the local tools/list response; a configured model name alone does not prove editing is available. Disabling removes the stored provider credential, the CCDX-owned MCP block, and unmodified skill, reference, and helper files; user-modified files are preserved. Cached tool calls then fail closed. The Node helper creates a new file under the task's `output/imagegen` directory by default and reports its absolute path; it never overwrites an existing file or automatically repeats a failed generation. The image endpoint is contacted only by `enable-image` validation and by explicit `generate_image` or `edit_image` tool calls. Ordinary Responses, models, authentication, Fast, Auto-review, compaction, and image-input paths remain on their existing routes.
@@ -1268,573 +546,6 @@ With `qwen-image-3.0-pro` or `qwen-image-3.0` using either supported protocol, C
1268
546
 
1269
547
  Editing references are opaque IDs bound to the provider configuration, not paths or URLs. Source images up to 10 MiB are kept in a 64 MiB byte-bounded in-memory LRU. IDs expire on eviction, provider/credential changes, or adapter restart; restarting Codex App alone does not clear them. A missing or expired ID fails before upstream dispatch. This feature does not import arbitrary local images or provide masks, transparent output, or an `/images/edits` endpoint. Other providers retain their existing generation behavior. The helper accepts `--image-id` for the same edit operation; its stdout remains the saved absolute file path and stderr reports the new ID. Normal host approvals still apply, and failed edits are never replaced with an automatic new generation.
1270
548
 
1271
- ### Update
1272
-
1273
- Choose a source interactively:
1274
-
1275
- ```bash
1276
- ccdx update
1277
- ```
1278
-
1279
- Or choose directly:
1280
-
1281
- ```bash
1282
- ccdx update npm
1283
- ccdx update github
1284
- ```
1285
-
1286
- Since 1.2.1, the GitHub channel resolves the latest stable Release, downloads
1287
- `codex-copilot-dx-VERSION.tgz` and `SHA256SUMS` from that exact release, checks
1288
- SHA-256 and the packed package name/version, and gives the verified local file
1289
- to npm. **Git is not required.** It never installs `main`, falls back to another
1290
- channel or automatically grants remote-download permission. Each asset has a
1291
- 60-second download deadline and bounded size (64 KiB manifest, 16 MiB package,
1292
- 64 MiB decompressed metadata scan). The checksum comes from the same HTTPS
1293
- release; it detects corrupt/mismatched files and is not a separate signature.
1294
- Source packages use npm's configured registry, including a company mirror. A confirmed EALLOWREMOTE in a GitHub update permits one verified complete-package attempt offline, without changing that registry or policy.
1295
- This is not a fully offline or registry-free distribution.
1296
-
1297
- Windows runs `npm.cmd` through system `cmd.exe` with AutoRun and delayed expansion
1298
- disabled. Its fixed tarball basename is passed separately from the temporary
1299
- working directory, including when that path has spaces or shell metacharacters.
1300
- Use `ccdx.cmd` if PowerShell blocks npm's `.ps1` entry. No PowerShell policy,
1301
- registry, proxy, certificate setting or persistent npm permission is changed.
1302
- macOS/Linux keep direct npm execution with separate argument arrays.
1303
-
1304
- Before npm changes a discovered global target, CCDX backs up only its package
1305
- and two command entries and acquires an exclusive install lock. A linked target
1306
- is preserved and refused. Installer or runtime-verification failure restores the
1307
- old package/commands; successful installation removes the backup. A failed restore
1308
- reports the retained backup and lock for manual recovery. New lock records include
1309
- the installer PID, creation time and backup directory. Existing-lock errors name
1310
- the exact file; other lock-creation failures retain their actual I/O error rather
1311
- than claiming another install. Old empty locks remain owner-unknown. A lock left
1312
- by a killed installer requires checking that no installation is running and
1313
- inspecting its retained backup before recovery. Locks are not removed merely
1314
- because they are old; an incomplete restore must be completed first.
1315
- There is no promise of crash/power-loss atomicity. Other apps, credentials,
1316
- settings, caches and the running service are not replaced. Readonly/busy Windows
1317
- files can prevent installation; finish use of that installation and retry.
1318
-
1319
- The selected target must have the correct name/stable version (exact version for
1320
- GitHub), a working version command and working sharp. A previously installed
1321
- native M365 broker must remain loadable. A mismatched npm prefix warns and retains
1322
- the caller's choice; if the target cannot be discovered, verification/rollback
1323
- cannot be guaranteed and the command explicitly says so. Restart CCDX separately.
1324
-
1325
- Normal startup still checks GitHub's `releases/latest` web redirect once in the
1326
- background, with a two-second deadline and no npm/REST/PAT access. It validates
1327
- only the redirect header, cancels the body and silently skips errors; it never
1328
- installs, polls or retries. Explicit GitHub updates use a ten-second lookup.
1329
- `ccdx update gh` is shorthand. `ccdx update npm` keeps the configured registry and
1330
- installs `codex-copilot-dx@latest`; it never silently switches to GitHub.
1331
-
1332
- npm policy is read using bounded named global fields, without printing credentials.
1333
- An unrelated project's `.npmrc` cannot grant permission. npm 12's
1334
- `allow-remote=none` can reject a mirror's cross-origin dependency URL with
1335
- `EALLOWREMOTE`. GitHub updates restore the previous package, then try one
1336
- same-version complete platform package from the official Release. Its SHA-256,
1337
- version, platform marker and bundled dependency declaration must validate before
1338
- an offline installation. Missing/corrupt complete assets stop the fallback;
1339
- authentication, integrity and other npm errors do not trigger it. Nightly updates
1340
- perform this fallback in their candidate directory before any service handoff.
1341
- No registry, proxy, CA, download permission or saved client selection is changed.
1342
- Explicit npm-source updates keep their selected source and do not silently use GitHub.
1343
-
1344
- If the complete package is unavailable, only if company policy permits and you
1345
- trust this entire package tree, use the explicit one-install exception:
1346
-
1347
- ```sh
1348
- ccdx update github --allow-remote
1349
- ccdx update npm --allow-remote
1350
- ```
1351
-
1352
- This grants URL downloads throughout that installation's dependency tree, not a
1353
- hostname allowlist. It does not change `.npmrc`, add further retries, allow every script
1354
- or override other administrator policy. Older npm receives no unsupported flag.
1355
- Unknown support prevents an explicitly requested exception from starting.
1356
-
1357
- For an older updater that still requires Git, install the Release tarball directly:
1358
-
1359
- ```sh
1360
- npm install -g https://github.com/DaleXiao/codex-copilot-dx/releases/download/v1.2.33/codex-copilot-dx-1.2.33.tgz
1361
- # Windows PowerShell: use npm.cmd instead of npm.
1362
- ```
1363
-
1364
- This manual npm URL command relies on npm/HTTPS and does not perform CCDX's
1365
- separate SHA-256 check. Under strict remote policy, use the verified bootstrap or
1366
- an administrator-approved local package/cache; do not automatically broaden policy.
1367
- A failed old `github:owner/repo#tag` install with `spawn git ENOENT` means npm
1368
- could not launch Git, often because Git was absent from the terminal's PATH.
1369
- It is unrelated to Wave styling; unknown-option warnings are separate.
1370
-
1371
- ### Install without Node or Git
1372
-
1373
- The Release also contains `install.sh`, `install.ps1`, `ccdx-install.mjs` and
1374
- `SHA256SUMS`. Download the platform script from the intended release and run it
1375
- with the current shell policy. The scripts reuse compatible Node/npm and the
1376
- configured global prefix. If unavailable, they download **only official Node
1377
- 24.22.0 LTS** for the current platform, verify the pinned official SHA-256,
1378
- and keep it inside CCDX's private directory. macOS arm64/x64, Windows arm64/x64
1379
- and glibc Linux arm64/x64 archives are selected explicitly. Linux musl users can
1380
- reuse an existing approved compatible Node; this bootstrap does not add libc.
1381
- Unsupported platforms fail before installing a system runtime.
1382
-
1383
- Default private prefixes are `${XDG_DATA_HOME:-~/.local/share}/ccdx` and
1384
- `%LOCALAPPDATA%\CCDX`; an explicit `npm_config_prefix` takes precedence. No global
1385
- Node, Git, Python, compiler, Build Tools or package manager is installed. Native
1386
- packages use prebuilt dependencies with install scripts disabled. The bootstrap
1387
- verifies sharp and the native broker on macOS/Windows; a missing required prebuilt
1388
- component fails and restores the old CCDX package. The private Node remains
1389
- available for a retry if a later package download is blocked.
1390
-
1391
- The helper and package are verified against the release checksum list. The
1392
- bootstrap script itself is initially trusted through the selected HTTPS release;
1393
- review it or compare its checksum through an independent trusted copy if needed.
1394
- The helper reuses the selected npm's bundled `make-fetch-happen` downloader and
1395
- bounded named proxy/no-proxy/CA/TLS/offline settings, with no automatic retries.
1396
- It adds no downloader dependency, forwards no registry credentials and refuses
1397
- network downloads in npm offline mode. A nonstandard npm missing that component
1398
- fails with local-package guidance. Outer platform-script downloads use curl or
1399
- Windows' download tool under their existing network/certificate policy; managed
1400
- PAC-only/offline environments may require administrator-provided Release files.
1401
- The bootstrap keeps user/global npm configuration, proxy and certificate choices.
1402
- Unavailable downloads or restrictive policy stop with no channel fallback.
1403
- It still needs approved access to GitHub Release assets, Node downloads when
1404
- needed, and the configured registry for dependencies. For offline/managed devices,
1405
- ask the administrator to pre-stage these exact files and dependency cache or use
1406
- an approved existing Node/npm distribution; CCDX does not bypass network policy.
1407
-
1408
- Private launchers bind the chosen Node and set `CCDX_PRIVATE_INSTALL_PREFIX` for
1409
- future updates. Windows bootstrap uses these validated commands even with an
1410
- existing Node, so spaces and shell metacharacters in the prefix do not break npm's generated batch commands. Exact npm-owned PowerShell launchers are removed; custom scripts and script policy stay unchanged. They supply a private `npm_config_prefix` only when the caller has
1411
- not set one. Updates preserve those launchers. PATH and shell profiles are not
1412
- rewritten: the installer prints the full command path and the directory to add
1413
- for `ccdx` shorthand. Compatible POSIX installations keep npm's normal commands. Windows PowerShell
1414
- expands percent signs in batch command filenames, before CCDX can run. The
1415
- Windows bootstrap refuses an install prefix containing `%` before modifying it;
1416
- choose a writable prefix without `%` using `npm_config_prefix`. Unicode, spaces,
1417
- `&` and `!` are covered, including a legacy console code page. This avoids shipping
1418
- an additional native executable just to bypass the shell's path parsing.
1419
- No install hook is added to the npm package.
1420
-
1421
- The current verified bootstrap chooses a complete platform package when the
1422
- Release manifest contains one, then installs it offline with scripts disabled.
1423
- Source-only old releases retain the previous registry-based path. Complete packs
1424
- are separate from the lightweight npm artifact and contain the locked runtime
1425
- dependency closure, including the applicable sharp/libvips and Broker files.
1426
- Supported complete targets are macOS/Windows x64 and ARM64, and Linux x64/ARM64
1427
- with glibc or musl. Selection follows the running Node architecture. Other Node
1428
- platforms retain the source installation path without claiming a complete package.
1429
- An old 1.2.29 updater does not learn this fallback until updated; use the current verified
1430
- bootstrap once when the old path cannot install under its saved npm policy.
1431
-
1432
- The scripts accept only `sh install.sh [--allow-remote]` or
1433
- `./install.ps1 [-AllowRemote]`; the permission is explicit and applies to that
1434
- one installation, with the same whole-tree meaning described above. Do not use
1435
- it when company policy forbids it. Interrupted runtime downloads stay in a cleaned
1436
- temporary directory; installed private runtime cleanup is a separate user choice.
1437
-
1438
- ## Diagnostics
1439
-
1440
- `ccdx doctor` is read-only by default and makes no inference request. It checks
1441
- local credentials/configuration, Node/platform, installation target, Windows
1442
- command launchers, enabled optional feature settings and the running adapter.
1443
- Disabled image/prediction features do not trigger provider or routing setup.
1444
- `--online` checks GitHub/Copilot access and a nonempty model directory; `--compat`
1445
- explicitly consumes model usage and requires completed Responses/SSE, not just
1446
- HTTP 200. Probe bodies are bounded to 4 MiB.
1447
-
1448
- `ccdx doctor --fix` makes one repair attempt per supported area and verifies its
1449
- result: exact owned Windows command shims, startup-managed Codex settings, a
1450
- verified existing GitHub credential when none is saved, and the already-enabled
1451
- prediction bridge through its existing management API. Credential recovery can
1452
- contact GitHub without `--online`, but never starts Device Flow. Existing tokens,
1453
- user-modified/invalid configuration, unrelated MCPs/hooks and company routing or
1454
- security policy are not replaced. Existing changed config is transactionally
1455
- backed up to `config.toml.ccdx-doctor.bak` (the latest repair backup only). Repairs
1456
- do not install optional image tools, enable prediction, renew certificates or
1457
- force-restart Apps. A required normal App/service restart remains an explicit
1458
- partial result. Partial repairs exit 1; no automatic retry loop is added.
1459
-
1460
- `ccdx doctor --json` emits one redacted JSON report; combine with `--fix` to
1461
- include `before_checks` and final per-operation repair results. Inspect these
1462
- results rather than equating a configured bridge with a visible gray suggestion.
1463
-
1464
- Windows adds no install-time lifecycle script, so npm 12's script-approval policy
1465
- is not expanded. In restricted PowerShell, install with `npm.cmd`, then first run
1466
- `ccdx.cmd` or `ccdx.cmd doctor --fix`. Startup recognizes only the exact npm
1467
- PowerShell shims for the two CCDX commands, checks their matching `.cmd` targets
1468
- and package identity, then removes those `.ps1` shims. Subsequent calls can use
1469
- bare `ccdx` without changing policy or profiles. The updater applies the same
1470
- check only after verifying its installed target/version. Customized, symlinked,
1471
- unexpected or unreadable shims are preserved; optional setup failures do not
1472
- block core startup or turn a verified update into failure. Direct npm reinstalls
1473
- can recreate the shims; a first `.cmd` invocation repairs them again. Read-only
1474
- commands such as version/help/status do not repair them. Aliases/functions and
1475
- another installation earlier in PATH can still override resolution. npm's own
1476
- `.ps1` shim is untouched, so `npm.cmd` may still be needed. macOS/Linux and source
1477
- checkouts are no-ops.
1478
-
1479
- `ccdx status` and the dashboard show the sample count beside each timing. First
1480
- output is observed at the gateway from generated deltas, hidden-reasoning/tool
1481
- announcements or content snapshots; a runtime-only result is marked separately.
1482
- Empty message/envelope frames, client tool results and compaction are excluded.
1483
- `first_output_sources` and each recent request's `first_output_source` describe
1484
- that evidence, not internal model decode or prefill timing. First output is
1485
- displayed in ms, and output speed in token/s. The additive
1486
- `output_tokens_per_second` metric divides the sum of reported output-token
1487
- intervals (`output_tokens - 1`) by their summed first-output-to-finish durations.
1488
- It is a time-weighted per-request estimate, not the inverse of average TPOT, an
1489
- unweighted average of request speeds, or concurrent system throughput. At least
1490
- two integral output tokens and a positive duration are required; missing usage
1491
- is unknown, not zero speed. The existing TPOT histogram remains unchanged for
1492
- API consumers, including its partial-failure samples. Both estimates can
1493
- include hosted-tool and downstream delays. The new
1494
- timing classifier does not change stream forwarding or the existing output
1495
- commitment that gates compatibility retries.
1496
-
1497
- The adapted Codex model catalog preserves valid multi-agent reasoning mappings.
1498
- Only a mapping no longer supported by the final advertised effort options is
1499
- repaired to the last available non-Ultra effort; no model switch or forced
1500
- highest-effort policy is introduced. Client-provided defaults, option order,
1501
- instructions and multi-agent version stay intact.
1502
-
1503
- CI additionally provisions the latest official Codex on its runner and uses an
1504
- isolated app-server to verify configuration, its model list and synthetic direct
1505
- and proxied Responses message delivery. It logs the tested runtime version,
1506
- does not skip installed-version mismatches and does not install clients on user
1507
- machines or use live credentials/models.
1508
-
1509
- `ccdx doctor` also inspects installed macOS App version metadata and running
1510
- Codex/ChatGPT App executable identities, without reading command arguments,
1511
- changing client files or killing processes. It shows the running adapter version,
1512
- upstream model-directory source, and the last client-version/bundled-directory
1513
- match observed by that adapter. These are observations, not proof of the App's
1514
- internal model cache. Fully quit the named App with Command-Q before reopening;
1515
- closing its window alone may leave its App server running. `doctor config` stays
1516
- configuration-only, with no process inspection or adapter request.
1517
-
1518
- The default streaming path sends small downstream SSE comments after 15 seconds
1519
- of silence only once valid stream headers have been sent. Comments do not count
1520
- as model output/TTFT, extend upstream/idle deadlines, start another upstream call,
1521
- or release a held compatibility-retry prelude. They stop on completion, failure
1522
- or cancellation and are skipped while the downstream is backpressured. A valid
1523
- JSON reply to a streaming request is still not silently converted to SSE.
1524
-
1525
- ### Local dashboard
1526
-
1527
- Interactive desktop starts open [http://127.0.0.1:2026/](http://127.0.0.1:2026/)
1528
- once by default, using the configured main port when customized. See
1529
- [control console and online settings](#control-console-and-online-settings) for
1530
- startup preferences, output modes and effective-state rules. Assets require both
1531
- a loopback connection and loopback Host, including when the main listener uses LAN mode.
1532
-
1533
- The sidebar separates Overview, indented Codex/Claude Apps, Model sources, Usage, Requests, Checks & repairs, and Settings. Desktop header rows have explicit heights, the header sticks when it reaches the viewport top, and stable scrollbar space prevents horizontal movement between long and short pages. Narrow screens keep compact navigation and a two-row toolbar. Page switches reset scroll and move keyboard focus to the main content; background/manual data refreshes preserve scroll. Each page has its own purpose description, and data groups carry their own update times rather than a shared page-wide freshness claim. Codex-specific images, prediction integration
1534
- and conversation buffering stay under Codex. Buffer controls and request performance have separate groups. HTTP traffic counts include model
1535
- catalogs and route errors; model outcomes and timing are named by protocol.
1536
- Microsoft 365's Claude Messages summary is not a Provider-wide request total.
1537
-
1538
- The source access table uses bounded local credential metadata and Provider snapshots, showing only the selected source. Switching source tabs also changes the account controls and catalog, never application routing. Overview groups client rows by app and uses an explicitly selected source; it does not substitute a configured but unselected source when the selected source is unavailable. The source card still lists every registered source. Claude App and Claude Code have separate setup/local-service rows, while Messages performance stays combined and is labeled accordingly. A running local service does not prove the app is open.
1539
- A locally saved GitHub credential is not online entitlement. Account names with
1540
- underscores retain their exact display value; identity, keys and environment
1541
- values are not inferred from model names. Client configuration, gateway state,
1542
- recent requests and actual inference are separate observations. The top summary
1543
- describes source/application status without mapping arrows. The source card counts and lists every discovered registered source, including disabled sources; availability and account evidence remain in the detailed tables. Each sidebar tab has a decorative inline SVG icon, with application entries indented. Terminal appearance has one Settings entry, and the animation selector has one separating rule. Settings contains webpage/terminal appearance, startup preferences and version updates. Local memory, queues, notices, raw HTTP traffic and request-size caps live under Checks & repairs → Runtime details. Account-check links identify the source and lead to its existing account tools. Save failures appear beside the affected controls; configuration repair previews and destructive-action confirmations remain in place.
1544
-
1545
- Catalog tabs browse registered Provider directories without changing routing.
1546
- Rows retain protocol, eligible clients, reasoning metadata and directory state.
1547
- Unknown metadata stays unknown; listings are not verified inference access.
1548
- The source form lives under Codex and explicitly applies subsequent routing. GitHub conversation models are selected in Codex, so its conversation-model field is hidden rather than empty. Auto Review has its own model/effort form under Codex, for either source; choices use the same advertised-effort policy and preference storage as the CLI. First source setup initializes the review choices atomically; later conversation-model saves preserve the saved review choice, and review changes use their own Save button. The GitHub model environment override is shown and locked. Microsoft 365 enable/disable stays under Model sources; disabling confirms that Claude local access stops, unchanged CCDX-owned settings are restored and Codex returns to GitHub. Active requests still block disabling.
1549
- Existing active streams keep their Provider binding. User/organization client
1550
- configuration is not overwritten by browsing or by a pause operation.
1551
-
1552
- Top Refresh updates local evidence and open data groups, plus current-page settings.
1553
- Auto-refresh defaults on and is browser-local. Small status snapshots update about
1554
- every two seconds; source/settings evidence updates every eight status ticks.
1555
- Catalogs and retained usage load only on demand or in their open view, with the
1556
- existing 30-minute cadence and short freshness gate. Hidden pages stop scheduled
1557
- reads. Catalog requests are deduplicated, stale tab reads are cancelled and late
1558
- results rejected. Failed reads preserve last-good data and label it as stale.
1559
- Service-setting errors are visible on the current page and can be retried manually.
1560
-
1561
- ### Settings saving and restore
1562
-
1563
- Settings → **Save & restore**, after Version & updates, controls only this page’s
1564
- preferences. **Save changes automatically** defaults on. Terminal palette,
1565
- animation, animation enablement, opening the webpage at startup and overnight-update
1566
- preferences save after a short coalescing delay. Webpage appearance stays in the
1567
- current browser. Turning automatic saving off reveals Save changes and Discard
1568
- changes; enabling it with a draft asks before saving that draft. Invalid or failed
1569
- saves keep the draft. Polls do not overwrite drafts, old responses do not replace
1570
- newer edits, and a conflicting settings revision requires reviewing the current
1571
- settings. Ordinary appearance saves do not enumerate accounts, authenticate or
1572
- refresh provider catalogs. Overnight updates remain off by default and enabling
1573
- them confirms the existing restart risk; saving the preference never installs an update.
1574
-
1575
- Restore defaults confirms the scope, backs up the saved preferences first, then
1576
- writes the settings-page fields in one locked atomic transaction. Defaults are:
1577
- green webpage and terminal palettes, dark webpage appearance, Comet animation,
1578
- terminal animation on, open webpage on startup, overnight updates off and automatic
1579
- saving on. Language, model/source selections, API keys, native sign-in and client
1580
- configuration, review/memory choices, image/prediction access, history, usage and
1581
- network/environment policy are preserved. Environment-controlled effective values
1582
- remain controlled. Pending drafts are explicitly discarded only after confirmation.
1583
-
1584
- The private `settings-preferences-backup.json` beside the settings file contains
1585
- only the six allowlisted service preferences, version, ID and creation time; it
1586
- contains no credentials or provider settings. Restore backup uses the latest
1587
- pre-reset snapshot. Backup failure aborts reset; a failed settings write restores
1588
- the prior settings and prior backup. A repeated reset with its same operation ID
1589
- cannot overwrite the original snapshot after a lost response. Unreadable settings
1590
- or backups are preserved and reported.
1591
-
1592
- Browser appearance has its own origin-local backup linked to the operation ID.
1593
- At most two entries are held while a reset result is uncertain, reducing to the
1594
- matching latest backup after a confirmed settings read. Service and browser storage
1595
- are not one atomic transaction: a browser-storage failure after the service save is
1596
- reported as partial completion and can be retried. Another browser without the
1597
- matching appearance backup reports that limitation rather than claiming a complete
1598
- restore. No periodic backup service, credential export or full configuration reset
1599
- is added.
1600
-
1601
- The full `/_ccdx/status` response remains the default CLI/diagnostic contract.
1602
- Overview and Settings use an explicit `?scope=summary` projection containing service
1603
- identity, uptime, model activity and current-run usage. The browser keeps summary
1604
- and full reads in separate resource entries; summary data cannot replace request
1605
- history or turn missing full fields into zero values. Other pages request full
1606
- status when opened. Hidden data regions skip DOM work, retaining their last data
1607
- until a visible full read; native inference and the selected model are unaffected.
1608
-
1609
- The usage selector retains current and historical sources. Combined model rows
1610
- and daily analytics preserve source identity; old records without a client label
1611
- are not guessed into one. Legacy untagged Provider records retain their historical
1612
- GitHub attribution. Cache-read tokens are included in input, not added twice.
1613
- The separate current-run summary updates from returned usage in memory, without
1614
- rescanning retained logs at the status cadence.
1615
- Overview adds an approximate token cache hit rate: returned reused input tokens divided by returned input tokens, weighted by tokens rather than request percentages. Missing evidence is distinct from an explicit zero; all-unknown cache evidence, zero input and invalid counts display `—`. Mixed complete/incomplete cache evidence displays `~` before the recorded aggregate ratio. This describes recorded input reuse, not a request success ratio, invoice or whole-account cache statistic. Missing output alone does not invalidate usable input/cache evidence.
1616
-
1617
- The usage source selector applies to the whole page. Model selection controls both daily trends and the calendar; 7/30/90-day range and bar/line view belong to daily trends, and request/Token measure belongs to the fixed annual calendar. These controls do not redefine the all-history model table; selecting a known day narrows the table and Show all restores retained-history totals.
1618
-
1619
- Usage analytics remains collapsed until opened: 7/30/90-day charts and a bounded
1620
- 365-day calendar in the browser time zone. Model/range/day selection reuses its
1621
- snapshot. Days outside retained history are distinct from zero recorded activity.
1622
- Filters, chart nodes and unsaved animation selection survive unrelated refreshes.
1623
- Dark/light, English/Chinese and reduced motion remain supported. Language changes
1624
- translate page labels in place without fetching models or rebuilding charts;
1625
- commands, identifiers and upstream error text retain their original values.
1626
- Chart view defaults to Bar chart on each page load; its dropdown switches to Line chart without another request or log scan. Both views retain the same input/output values, scale, model/source/range filters and date selection. Lines show separate input/output series, pass through each known day's value, stay between neighboring values and break across unavailable history; a lone known day is a point. The calendar is unchanged by view switching.
1627
-
1628
- Visible bar stacks rise from the baseline once over 450 ms; curves draw left to right over 600 ms (a lone point fades in over 200 ms). Opening/revealing a chart and changing its data, filters or view can replay the entrance. Selecting a day, changing calendar measure and unchanged background refreshes do not replay it. Hidden/collapsed views, page suspension and reduced-motion preferences cancel active chart motion; reduced-motion or unsupported animation APIs retain the complete static chart. Chart motion adds no polling loop, chart library or runtime dependency.
1629
-
1630
- The atom logo stays in the sidebar brand (compact top navigation on narrow screens).
1631
- It rotates once on load and manual Refresh, never on scheduled reads, and respects
1632
- reduced motion. Terminal animation settings are independent of the WebUI logo.
1633
-
1634
- Startup lists the number of discovered cached/live Provider catalogs, their model
1635
- counts and source, and separate Claude Code/App configuration states. Checking,
1636
- unavailable, preserved custom settings and uninspected configurations remain
1637
- distinct. Background discovery does not delay core readiness; its latest state
1638
- appears in the running terminal region. These observations do not prove inference
1639
- access. Normal prediction startup uses one line; exceptions retain reasons and
1640
- required restart guidance. `ccdx prediction status` retains environment/recovery
1641
- details, including routing, CA and TLS verification state.
1642
-
1643
- After Ready, a supported TTY has a bounded region: uptime, source/Claude state,
1644
- a line-framed usage/inference table, one notice row and one activity row below it.
1645
- Input includes reused input; partial usage counts returned records with missing fields.
1646
- Inference HTTP calls exclude catalog/count-tokens requests; model outcomes are
1647
- separate protocol observations, not an HTTP-success total. Activity motion includes
1648
- image MCP traffic; inference counters exclude it. Usage is process-local returned
1649
- data, not a bill or pending estimate. Counts/tokens use compact display.
1650
- Data refreshes about once a second; animation ticks reuse the table and redraw only
1651
- changed rows. Historical notices do not turn a running service into a health verdict.
1652
- Client cancellations remain in verbose/file diagnostics as informational records;
1653
- timeouts and actual failures remain notices. Non-TTY, CI, dumb and terminals under
1654
- 40 columns or 16 rows retain plain output. At 40×16 the compact table keeps all metrics and short source/Code/App states. Larger terminals wrap full state descriptions. No runtime terminal dependency is added.
1655
-
1656
- Terminal appearance lives only in Settings. Preview frames load on opening; closing, hiding the view/page or reduced
1657
- motion stops preview timers. Saving changes the running supported status terminal.
1658
-
1659
- The recent-failure view merges bounded Responses events, main-listener HTTP
1660
- failures and recent Responses/compact/Messages request timelines, with at most ten
1661
- visible entries. Request IDs correlate final outcomes; a retry alone is not proof
1662
- of recovery. It is diagnostic metadata, not a session archive. Original error
1663
- responses remain unchanged. Review upstream diagnostic prose before sharing.
1664
-
1665
- Inspect only the local Codex configuration:
1666
-
1667
- ```bash
1668
- ccdx doctor config
1669
- ```
1670
-
1671
- This command reads `~/.codex/config.toml` and checks UTF-8/TOML syntax, correctly scoped CCDX-managed URL/environment settings, positive integer context limits, their relative ordering, and `features.context_management`. Explicit `false` is valid. A missing optional shell environment section is valid for an existing file. Structured context-management settings are retained and reported as unverified for the installed Codex version.
1672
-
1673
- It also runs the existing startup writer in memory and lists the managed keys that would change. A missing file produces a creation preview. A preview that yields invalid TOML or changes unowned settings is reported as an error rather than applied. No files are written, including debug logs; it does not read credentials, contact the adapter or upstream, start Device Flow, or open Codex App. It uses `ADAPTER_HOST` and `ADAPTER_PORT` for the expected URL. Unrelated startup/probe timeout settings do not affect this config-only command.
1674
-
1675
- The syntax check uses a TOML 1.1 parser and validates only the listed managed fields, not the full installed Codex schema. It does not merge project files, profiles, environment overrides, or command-line overrides into an effective Codex configuration. Syntax errors report line/column without source snippets; configured URL and key values are not printed. The command accepts no `--online`, `--compat`, or write/fix options.
1676
-
1677
- For the broader credential/configuration/adapter diagnostic:
1678
-
1679
- ```bash
1680
- ccdx doctor
1681
- ```
1682
-
1683
- The ordinary doctor reuses the same configuration checks, inspects the saved GitHub credential, and probes the local adapter. It does not start the adapter or modify credentials or Codex configuration; when `CCDX_LOG_PATH` is set, this broader command can write its diagnostics to that log. Both doctor modes exit `1` when any check is an error, and `0` for OK/warning-only results, including missing configuration or an explicit feature opt-out. Unsupported arguments or invalid relevant CLI options exit `2`.
1684
-
1685
- To verify the saved GitHub token, Copilot entitlement, and live models endpoint without starting Device Flow or changing the credential:
1686
-
1687
- ```bash
1688
- ccdx doctor --online
1689
- ```
1690
-
1691
- To exercise the protocol through an already-running adapter:
1692
-
1693
- ```bash
1694
- ccdx doctor --compat
1695
- ```
1696
-
1697
- The compatibility doctor sends a few minimal Copilot requests covering Auto-review, native Responses, streaming history, and compaction. It consumes a small amount of Copilot usage, never starts the adapter or Device Flow, and does not change client configuration. Combine it with `--online` when both checks are needed.
1698
-
1699
- For a concise summary of the running adapter:
1700
-
1701
- ```bash
1702
- ccdx status
1703
- ```
1704
-
1705
- For the complete machine-readable status payload:
1706
-
1707
- ```bash
1708
- curl -s http://127.0.0.1:2026/_ccdx/status | jq
1709
- ```
1710
-
1711
- The status endpoint is restricted to the socket's real loopback address even when LAN binding is explicitly enabled. It reports fixed-size HTTP request counters separately from bounded `completed` / `incomplete` / `failed` / `cancelled` response outcomes by model and origin, plus bounded incomplete-reason counts, TTFT/TPOT histograms, admission pressure, memory use, response-history size/tree concentration/lookup misses, image queue/cache and adaptive-history state, model-cache counts, token expiry state, and the ten most recent upstream `response.failed` diagnostics retained by the running process. HTTP errors without a model terminal remain "without terminal" and retain their known origin; they are not counted as model failures. History eviction markers are not failed-request counts; `ccdx status` warns near the cache limit without deleting or compressing history. Failure diagnostics include the event type, model, error code/message, response/request IDs when supplied upstream, and retry outcome. Common credential forms, long opaque encrypted values, and explicitly labelled input/prompt/tool-content echoes are redacted. They are cleared when the adapter restarts. Whole request/response bodies, credential fields, and account profiles are not archived in status. Explicit HTTP diagnostic mode can retain a bounded error excerpt; see HTTP error diagnostics below. Arbitrary upstream prose cannot be guaranteed free of sensitive content; review diagnostics before sharing them.
1712
-
1713
- `stream_performance.by_route.*.empty_stream_completions` counts completed streams
1714
- with no observed output and an explicit zero output-token count. The recent request's
1715
- `empty_stream_completion` flag records the same condition. Missing usage is not zero;
1716
- non-streaming replies and observed tool/refusal output are excluded. This diagnostic
1717
- does not change completion status, trigger a retry or reject legitimate empty replies.
1718
-
1719
- `image_mcp` has its own HTTP route counter. After the image handler has been used, `image_generation` separately reports active, succeeded, failed, busy, cancelled, and chat-file delivery-failure counts, including tool errors returned with HTTP 200. A delivery failure can accompany a successful generation; it never causes another generation. Before handler initialization this field is `null`, meaning not observed, not necessarily disabled. Status never initializes that handler, reads its provider credential, installs guidance, or probes the provider. Input-image optimization metrics remain separate. `logging` reports pending records/bytes, queue caps, overflow drops, and write failures for usage and enabled debug-file logging.
1720
-
1721
- `stream_performance.by_route` also reports `request_ttft_ms`, measured from adapter entry to the first observed output delta, including local preparation. The existing `ttft_ms` continues to start at upstream dispatch. Neither timestamp means the client has drained or displayed the output. `preparation_ms` contains bounded histograms for admission (including history reservations), body reading/decompression/JSON parsing, history materialization/compact preparation, image optimization, and request serialization. Each sample measures one operation, including failed operations; retries can add samples. These are diagnostic intervals rather than a complete breakdown of request time: body reading includes internal decoded-body admission waits; authentication, routing, and other preparation are not individually timed. Non-streaming requests contribute preparation samples without inventing a first-token measurement.
1722
-
1723
- `stream_performance.recent_requests` retains at most 20 finished Responses/compact requests. Each entry contains a CCDX-owned request ID, start timestamp, bounded model/route labels, HTTP status, final model outcome, known error origin, last observed phase and provider-call count. `timings_ms` includes cumulative preparation durations and offsets from adapter entry for the first upstream dispatch, latest upstream headers, first output, latest observed upstream activity, terminal and finish. Null means not observed, not zero. Stage durations can overlap and should not be added into a total. Provider-call counts include compatibility attempts but exclude OAuth exchanges and low-level connection retries. Streams update a single activity timestamp per read; no content, headers, opaque state or unbounded event list is retained. Entries are process-local and reset on restart; normal status refresh reads them without new upstream calls or background polling.
1724
-
1725
- `http_errors` separately counts HTTP failures on tracked API routes and retains
1726
- the latest 20. Entries contain HTTP status, technical code when safe, observed
1727
- model, route/source and request IDs; the message is a fixed local explanation.
1728
- They never retain the original body, prompt, URL query or headers. Original
1729
- errors are still returned unchanged. Management/dashboard reads are excluded.
1730
- The recent-error panel merges these entries with model failures and request
1731
- timelines, retaining at most ten visible items. HTTP counts do not change model
1732
- terminal counts; unknown sources/models remain unknown.
1733
-
1734
- Every API response includes a safe `X-Request-Id` for correlation. To include the same ID in related terminal and file log lines, start with:
1735
-
1736
- ```bash
1737
- ccdx --show-request-id
1738
- ```
1739
-
1740
- ### Authentication recovery
1741
-
1742
- The dashboard's **RECENT REQUESTS** section opens by default and reuses the same
1743
- status snapshot. It shows at most 20 finished request observations: time, source, model, outcome and returned input tokens, with serialized
1744
- upstream payload bytes, image count, reported input tokens, the advertised model
1745
- window and terminal outcome, plus process-local compaction outcome counts. Missing
1746
- fields are unknown, not zero; input/window is a reference ratio, not an exact live
1747
- session measurement. No prompts, image bytes, files, tool results or extra session
1748
- scan are retained. Technical fields are folded into each row. Expanded fields survive unchanged reads and retained matching request observations; closed/hidden request groups defer row rebuilding without another API call.
1749
-
1750
- When the saved token is missing, `ccdx` looks for compatible local Copilot GitHub tokens, validates them with GitHub and Copilot, and imports a valid one before starting Device Flow. It checks explicit token sources (`CCDX_GITHUB_TOKEN`, `CCDX_GITHUB_TOKEN_PATH`, and `CCDX_GITHUB_TOKEN_PATHS`) plus common local `auth.json` layouts. Generic discovery refuses to choose silently when valid credentials for multiple GitHub accounts are found.
1751
-
1752
- Discovery also reads legacy OpenCode's `$XDG_DATA_HOME/opencode/auth.json`
1753
- (otherwise `~/.local/share/opencode/auth.json`), specifically `github-copilot`
1754
- OAuth `refresh`, and an installed GitHub CLI's noninteractive
1755
- `gh auth token --hostname github.com`. It does not import unrelated API keys,
1756
- enterprise-host OAuth, browser cookies, subscription credentials or a newer
1757
- OpenCode database format. `APPDATA` and `LOCALAPPDATA` auth.json roots are included
1758
- where present. GitHub CLI is optional, not a runtime dependency; its output/time
1759
- are bounded and no login prompt is started. Other apps' files remain read-only.
1760
- Source reads are bounded, discovery validates at most 24 distinct tokens within
1761
- a 12-second overall validation budget, and each candidate has a 4-second budget.
1762
- Directory/profile scans have explicit caps; hitting a cap or a network failure
1763
- reports incomplete discovery rather than silently selecting an account or
1764
- starting another login. Set an explicit source/account to resolve ambiguity.
1765
- An existing saved-token startup path performs no extra discovery/network calls.
1766
- Package reinstallation does not clear that user-owned credential. Copilot's short-lived
1767
- access token is obtained again when needed; it is not the saved GitHub credential.
1768
- For the default credential store, Copilot HTTP 403 preserves the credential and
1769
- reports access/network policy rather than recommending deletion. Copilot HTTP 401
1770
- performs a bounded GitHub identity check only if compatible local recovery did not
1771
- succeed. Only an identity HTTP 401 permits reauthorization guidance; an unavailable
1772
- check does not establish expiry. Neither case automatically deletes the credential
1773
- or starts Device Flow. Denials are not hidden by a cached Copilot token. A discovery
1774
- HTTP 403 also stops before Device Flow, preserving external sources and account
1775
- selection. Isolated/custom credential clients retain their own recovery contract.
1776
-
1777
- After an account is selected, automatic `401`/`403` recovery and in-process token rotation accept only that same GitHub account. Concurrent callers share token refresh work without sharing cancellation, and a still-valid Copilot token may be used briefly after a transient refresh failure. Explicit token variables remain the intentional way to select another account.
1778
-
1779
- If refresh still fails with Copilot `401` or `403`, preserve the saved credential.
1780
- Run `ccdx auth status --online` only when you explicitly want an online diagnosis;
1781
- check account entitlement and company routing policy separately. Reauthorization
1782
- is appropriate only after independent GitHub identity rejection or an explicit
1783
- account-change decision, not merely a Copilot denial, package update, or failed
1784
- network probe. Existing same-account recovery and explicit source selection are
1785
- unchanged.
1786
-
1787
- ## Account and repair tools
1788
-
1789
- `ccdx auth` defaults to local status. `auth check` is the explicit online alias: it checks GitHub identity, Copilot authorization and a bounded model directory without inference. `auth status --online` remains available. A saved file is not proof of online access. Copilot denial and network failures do not recommend reauthentication merely because access failed.
1790
-
1791
- `ccdx auth login` starts GitHub device authorization when no sign-in is saved. `ccdx auth reauth` / `ccdx reauth` explicitly replaces an existing sign-in. `auth login --reauth` is also accepted. The existing account binding is required by default; `--login ACCOUNT` explicitly requests a different account, which needs a service restart before it can become the running inference account. The device request has a 30-second deadline, GitHub's interval/slow-down responses govern polling, and the device lifetime is limited to 15 minutes. Candidate identity, entitlement and directory validation has a 15-second deadline. No candidate is saved before all checks pass. A final cross-process lock and comparison prevent overwriting a concurrently changed credential. Cancellation, denial, mismatch, expiration or validation failure preserves the prior sign-in. One WebUI flow runs per service, with a 30-second minimum between starts; connection checks coalesce and retain a same-credential result for 10 seconds.
1792
-
1793
- New explicit-tool sign-ins use `~/.local/share/ccdx/github_token` and fingerprint-bound `.account.json` metadata, with private permissions and the existing atomic paired writer. When present, this owned store takes precedence over `~/.local/share/copilot-api/github_token`; existing startup/discovery compatibility remains supported. `auth logout` requires interactive confirmation or `--yes`, writes an empty owned credential, and does not delete or revoke other apps' legacy credentials. This intentionally blocks inference's legacy fallback. New login or normal startup can perform the existing explicit discovery/sign-in process again. CLI changes notify a compatible running local service; if notification is unavailable, the CLI asks for a service restart. In-flight model requests are not replayed or forcibly stopped. A token cache invalidation preserves its running account binding, so switching accounts still requires a restart.
1794
-
1795
- Model sources uses one source selector for the selected source controls, account and catalog. Disabled sources remain under its collapsed list; there is no second list of enabled source cards. Selecting a tab is browsing only. GitHub offers sign-in, independent connection checks and cancellation; sign-out is under More actions. The browser opens only the fixed GitHub device authorization URL after the user chooses Copy & open GitHub. Its copy icon writes only the displayed short user code. The originating sign-in click prepares one asynchronous clipboard write; browsers that reject it retain an explicit copy action and selectable text. Re-rendering/polling does not repeatedly overwrite the clipboard. Clipboard reads are never requested, failed writes never show Copied, and cancelled/obsolete flow completions cannot update the new flow. Opening the link retries the copy in the click without delaying the native link activation. No token or password entry field is added. Microsoft 365 retains local account discovery/selection and source controls; its corporate SSO is not replaced with a GitHub-style login. Raw codes remain under details and last-good model lists retain their previous timestamp after failures.
1796
-
1797
- `ccdx web` opens an existing compatible dashboard or starts a management-only local listener without sign-in, app configuration, app launch, prediction setup or automatic M365 startup. It does not claim normal startup integrations are active. Stop that management listener with Ctrl+C before running normal `ccdx` for application routing and optional integrations. Opening the dashboard does not initiate a GitHub Device Flow or model inference.
1798
-
1799
- Checks & repairs performs the existing local doctor checks without adapter/client online checks. Configuration repair uses the existing owned-key writer: the preview lists scope and backup filename, a revision check rejects changes since preview, and the writer rechecks that revision under its existing config lock. It preserves unowned TOML and refuses invalid/unsafe configurations. A changed existing file is backed up as `config.toml.ccdx-doctor.bak`; an unchanged file or a missing original has no previous file to back up. The page does not expose arbitrary commands, forced restarts, certificate setup or an automatic repair loop. Compatibility probes remain the explicitly displayed `ccdx doctor --compat` command and consume usage.
1800
-
1801
- `ccdx doctor network` and the page's Network settings read proxy/trust summaries without external HTTP requests or policy edits. Linux reports environment routing; Windows/macOS also inspect their supported system settings. `ccdx doctor report` prints the local report as JSON; Export report downloads the same bounded redacted projection. Home paths and account email addresses are replaced, and credentials, arbitrary check fields, chats and request bodies are omitted. Reports include only local checks, not a full network trace or proof of provider entitlement.
1802
-
1803
- `ccdx image pause|resume` and `ccdx prediction pause|resume` use the existing service preference gates. They keep credentials, trust and routes and cannot provision a feature that has not been configured. Running image requests may finish. Offline changes apply on service startup; online prediction adaptation uses the running service's settings action. The existing full `disable-image` / `prediction off` cleanup semantics are unchanged. `ccdx source` is an alias for `ccdx m365 switch`, with the same model validation and explicit selection rules.
1804
-
1805
- The protected `/_ccdx/ui/account` and `/_ccdx/ui/checks` APIs require loopback, a local Host and `X-CCDX-Dashboard: 1`. POST actions additionally require the matching Origin and JSON content type; bodies are capped at 4 KiB with a five-second body deadline, and unknown actions/fields are rejected. GET reads only local/process state. Sign-in polling GETs read in-memory operation state and do not trigger extra GitHub polling. Device-flow controllers are cancelled when the owning listener closes. SVG state icons are shipped locally and load no external icon library; an empty circle means unknown/not checked, a circle-minus means unavailable, and running uses circle-play rather than the success check.
1806
-
1807
- ## HTTP error diagnostics
1808
-
1809
- `http_errors.recent` keeps its 20-record rolling view. Independent
1810
- `actionable_recent` (20 generation/other failures and actionable count errors),
1811
- `capability_recent` (20 count/explicit-access notices), `route_recent` (eight path errors)
1812
- and `protocol_recent` (eight image-MCP HTTP 405 records) prevent route/method noise from erasing inference
1813
- evidence. `by_category` counts inference, capability, protocol, route and other HTTP failures;
1814
- classification does not discard errors, grant access or retry requests.
1815
- The WebUI defaults to reply issues and provides separate capability/access and connection/path views. Explicitly unselected models and turned-off access remain refused with their original HTTP status, but are notices rather than model-generation failures. Client disconnects remain in recent requests rather than being promoted to the issue list. Known non-model HTTP paths show Not applicable in the UI; unknown paths are retained, not assumed harmless. Repeated capability/path notices are grouped within the bounded retained records, with their occurrence count and latest request details; raw HTTP counters remain visible. A count-endpoint 404 is not a failed generation. Count authentication, rate-limit and server failures remain actionable.
1816
-
1817
- Before model resolution, safe requested model IDs and the client hint are retained even for local rejection. Known binding failures include a specific reason: model not selected, ambiguous name, unavailable catalog entry or disabled access. These diagnostics never authorize a model or replace it with a default. Claude records propagate the actual model/source and distinguish a cached capability result from an upstream HTTP failure. Upstream attempts count logical calls; shared counts are marked `shared_upstream`, and cached 404s report zero calls. No prompt or key is retained.
1818
-
1819
- New records retain safe error code/type/parameter paths, method, an allowlisted
1820
- endpoint without a query, and upstream attempt count. Requested/served model
1821
- IDs are distinct; only the explicit Auto-review alias identifies that request
1822
- purpose. Other purposes remain unknown, not guessed from a model name.
1823
- Known enum/numeric options
1824
- include reasoning effort, service tier, output format, max output tokens and
1825
- input/tool counts; no prompt, schema or tool values are kept. `error_body` says
1826
- whether the upstream provided empty, structured or unstructured error details.
1827
- Recent request `attempts` and HTTP `attempt_timings` retain the first and last two
1828
- provider dispatch/header offsets and statuses; these are not TCP-retry counts.
1829
-
1830
- By default arbitrary upstream error prose is not copied into HTTP diagnostics.
1831
- For a specific investigation, start a **new** service with
1832
- `CCDX_HTTP_ERROR_DETAILS=1` to retain a redacted error-message excerpt, capped at
1833
- 500 characters, in those bounded in-memory records. In Windows PowerShell set
1834
- `$env:CCDX_HTTP_ERROR_DETAILS='1'` before `ccdx.cmd`. This does not reconfigure an
1835
- already-running service, enable file logging, retain whole requests, or guarantee
1836
- that arbitrary upstream prose contains no private context. Review before sharing;
1837
- unset the variable after the investigation. Records disappear on service exit.
1838
549
 
1839
550
  ## Security
1840
551
 
@@ -1842,7 +553,7 @@ unset the variable after the investigation. Records disappear on service exit.
1842
553
  - Enabling LAN binding exposes a Copilot-backed API to other reachable machines. Provide your own host firewall and network isolation; do not expose the listener to an untrusted network.
1843
554
  - Inference POSTs reject any browser `Origin` header before reading the body or contacting upstream, including simple `text/plain` requests. Native Codex/Node requests without Origin and deliberately enabled native LAN clients keep their existing access. This is not authentication or protection against untrusted local native programs.
1844
555
  - Explicit auth tools store GitHub OAuth credentials at `~/.local/share/ccdx/github_token`, with precedence over the compatible legacy `~/.local/share/copilot-api/github_token` store. Short-lived Copilot service tokens remain in process memory and are refreshed as needed. See Account and repair tools for safe replacement/sign-out behavior.
1845
- - The optional image API credential is stored separately with mode `0600` only after `ccdx enable-image`; it is never placed in Codex configuration or diagnostic output.
556
+ - The optional image API credential is stored separately with mode `0600` only after `ccdx app codex image setup`; it is never placed in Codex configuration or diagnostic output.
1846
557
  - Runtime status and usage records retain metadata by default; explicitly enabled HTTP error excerpts can contain private context. Diagnostic logging records status and error messages; it is not a general redaction layer for arbitrary error text. See Debug logging before sharing logs.
1847
558
  - Request/response bodies, request-admission queues, retained history, image work, SSE buffers, log queues, retries, and shutdown have explicit limits. These component limits are not a single process-wide memory ceiling; completed image files are persistent user artifacts, not an automatically evicted cache.
1848
559
 
@@ -1884,7 +595,7 @@ unset the variable after the investigation. Records disappear on service exit.
1884
595
  | `CCDX_AUTO_LAUNCH` | enabled | Set to `0`, `false`, `no`, or `off` to start without opening Codex App |
1885
596
  | `CCDX_GITHUB_TOKEN` | unset | Explicit GitHub Copilot OAuth token to validate and import before Device Flow |
1886
597
  | `CCDX_GITHUB_TOKEN_PATH` | unset | Explicit file containing a GitHub Copilot OAuth token |
1887
- | `CCDX_GITHUB_TOKEN_PATHS` | unset | Multiple token files separated by the platform path delimiter (`:` on macOS/Linux, `;` on Windows) |
598
+ | `CCDX_GITHUB_TOKEN_PATHS` | unset | Multiple token files separated by the platform path delimiter (`:` on macOS, `;` on Windows) |
1888
599
  | `CCDX_GITHUB_LOGIN` | saved account | Require automatic discovery and recovery to use this GitHub login |
1889
600
  | `CCDX_DISABLE_TOKEN_DISCOVERY` | unset | Set to `1` to skip local token discovery and use the saved token or Device Flow |
1890
601
  | `CCDX_TOKEN_LOCK_TIMEOUT_MS` | `600000` | Maximum time to wait for another process to finish GitHub token login or import |
@@ -1892,7 +603,7 @@ unset the variable after the investigation. Records disappear on service exit.
1892
603
  | `CCDX_EXISTING_ADAPTER_TIMEOUT_MS` | `500` | Timeout for detecting an already-running local adapter during startup |
1893
604
  | `CCDX_MODEL_REFRESH_TIMEOUT_MS` | `5000` | Timeout for Copilot model refresh or live Auto-review model lookup |
1894
605
  | `CCDX_MODEL_REFRESH_INTERVAL_MS` | `7200000` | Periodic model refresh interval; `0` disables periodic refresh, while startup cache/refresh behavior still applies |
1895
- | `CCDX_RESPONSE_HISTORY_MAX_BYTES` | `67108864` | Higher-precedence total in-memory byte budget for locally expanded Responses history; `ccdx cache --limit` provides a persistent 16–1024 MiB setting when this is unset |
606
+ | `CCDX_RESPONSE_HISTORY_MAX_BYTES` | `67108864` | Higher-precedence total in-memory byte budget for locally expanded Responses history; `ccdx doctor cache --limit` provides a persistent 16–1024 MiB setting when this is unset |
1896
607
  | `CCDX_RESPONSE_HISTORY_MAX_ENTRIES` | `4096` | Maximum stored incremental Responses history nodes |
1897
608
  | `CCDX_USAGE_PATH` | `~/.local/share/codex-copilot-dx/usage.jsonl` | Local JSONL token-usage log |
1898
609
  | `CCDX_USAGE_MAX_BYTES` | `33554432` | Rotate the usage log at this size and retain one `.1` backup; set to `0` to disable rotation |
@@ -1919,6 +630,7 @@ Diagnostic redaction removes Basic authorization payloads and URL userinfo, and
1919
630
 
1920
631
  Set `CCDX_LOG_PATH=1` to record diagnostic logs independently of quiet terminal presentation to `~/.local/share/codex-copilot-dx/debug.log`, or provide a custom path. Add `CCDX_LOG_LEVEL=debug` for upstream attempts, retry causes, status codes, and timings. The adapter does not deliberately dump request/response bodies or authorization headers. File diagnostics redact common credential forms and labelled content echoes, but this cannot identify every secret in arbitrary external prose; review logs before sharing them. File writes are asynchronous and batched with a 4096-record / 2 MiB pending-and-in-flight ceiling. Overflow drops excess file records with one warning and a status counter; terminal output continues. CLI exit paths flush for at most 1.5 seconds. `ccdx doctor config` bypasses file logging entirely.
1921
632
 
633
+
1922
634
  ## Large histories and images
1923
635
 
1924
636
  Long computer-use sessions can accumulate screenshots that are sent again on later turns. This can increase local preparation time, upstream handshake latency, and the chance of a `413 Payload Too Large` response.
@@ -1963,533 +675,22 @@ Newer Codex App builds can advertise an `image_gen` namespace that already exist
1963
675
 
1964
676
  ## Development
1965
677
 
1966
- ```bash
1967
- npm ci
1968
- npm run verify
1969
- npm run bench:payload
1970
- ```
1971
-
1972
- `bench:check` covers both SSE parsers, including native Responses identity rewriting, 1/4/8 MiB fragmented events, write batching, and slow-client backpressure. It also repeats four concurrent image preparations across six rounds using a desktop-sized synthetic screenshot and a public-domain photograph. Checks enforce content preservation, single-pass JSON parsing, bounded copying, cache reuse, settled work, and bounded retained heap/ArrayBuffers after warm-up and GC. Sampled RSS and absolute timings remain report-only because allocators, runtimes, and machines differ; the fixtures do not establish production latency or visual model accuracy.
1973
-
1974
- `npm test` runs unit, handler, CLI, and documentation-contract tests. `npm run test:smoke` starts a real local adapter with fully injected offline upstreams. `npm run bench:check` enforces linear SSE scanning, image/tool processing, and request-admission resource limits. `npm run pack:check` verifies npm tarball contents without publishing. `npm run bench:payload` is a report-only isolated-process benchmark for 5–60 MiB synthetic padded-image payloads and does not contact Copilot. CI runs the complete `verify` gate on Node 22.15.0 and 24.x.
1975
-
1976
- The [documentation index](https://github.com/DaleXiao/codex-copilot-dx/blob/main/docs/README.md) distinguishes current guidance from historical release evidence. Release reports retain the measurements and limits of their specific versions; they do not establish current live-provider compatibility.
1977
-
1978
- From a source checkout, `node scripts/codex-message-id-replay.mjs --codex /absolute/path/to/codex` checks message identity against an installed Codex runtime using only synthetic SSE, a local mock server, and automatically cleaned temporary Codex directories. It does not use the real client configuration or call Copilot.
678
+ Run `npm run verify` for unit tests, streaming smoke, resource budgets and package checks. Native Windows and macOS CI verifies installers, credential/configuration ownership, client protocols and the browser UI. Keep inference tests synthetic unless an online probe is explicitly requested. Release evidence stays in dated release notes; architecture proposals are separate from implemented guarantees.
1979
679
 
1980
680
  ## License
1981
681
 
1982
682
  MIT
1983
683
 
684
+ ## Common environment controls
1984
685
 
1985
- ### Live request flow and timing estimates
1986
-
1987
- Request flow is a read-only view of active Responses, Responses compaction and
1988
- Claude Messages requests observed by CCDX; it excludes image-MCP, token counting,
1989
- catalog and management calls. It groups
1990
- apps and source/model pairs; a model used through two sources stays separate.
1991
- `X-CCDX-Client` recognizes `codex-app`, `codex-cli`, `claude-app`, `claude-code`;
1992
- known Codex `originator` values also provide labels, including the actual
1993
- `Codex Desktop` spelling. Explicit client hints take precedence, followed by known
1994
- originators, then known versioned Codex User-Agent prefixes. A generic `codex`
1995
- prefix identifies only the Codex family, not App versus CLI. Unknown clients are
1996
- shown as Unidentified app (the existing `api` metadata ID is retained); unmarked
1997
- Messages requests remain Claude (app unspecified). These are client-reported
1998
- presentation hints, never verified identities, authorization or routing inputs.
1999
- Only bounded scalar strings are inspected; no User-Agent/header text is retained.
2000
- An unrelated agent containing the word Codex does not match.
2001
-
2002
- Only observed first output starts moving dots. A started attempt without output
2003
- is waiting, a subsequent attempt is retrying, and terminal evidence awaiting
2004
- connection completion is finishing. No fresh status for six seconds means unknown,
2005
- not idle or successful. Auto refresh off therefore expires the view. Hidden pages
2006
- pause animation; reduced-motion uses static dots. Idle retains bounded last-known
2007
- nodes with zero counts; unknown retained counts are dashes. Initially up to 12
2008
- model groups are visible, with an explicit show-more control. Snapshots retain up
2009
- to 64 details per metrics instance; exact active totals may be higher and omitted
2010
- details are reported. With omitted details, observed group counts use ≥; retained
2011
- nodes with no current detail use dashes, even while the exact total is active. Short requests between two status reads can appear only in
2012
- the finished table; the diagram does not fabricate or replay them.
2013
-
2014
- A single app/source-model route has aligned name/hub anchors and straight paths,
2015
- even when multiple requests share that route. Branches alone use rounded curves.
2016
- Known singleton and idle-zero node counts are hidden. Concurrent counts read
2017
- “2 requests” beside the name and outside its selected area; lower bounds retain ≥
2018
- and missing/stale counts remain dashes. The exact active total appears once in
2019
- the flow header, not again below the logo.
2020
-
2021
- Clicking an app or model name filters only active details. Counts, source totals,
2022
- all five terminal outcomes (including unknown), last 20 finished requests and
2023
- issues remain available. No prompt/image/credential is added to active telemetry.
2024
- The existing local-dashboard host/origin protections apply to the new flow asset.
2025
-
2026
- Codex and Claude request-performance panels show approximate first-output P50/P95
2027
- in milliseconds with sample counts. Values come from existing histogram buckets,
2028
- not raw samples; the highest bucket uses the observed maximum. These are the
2029
- upstream first-output observations already used for the mean, include failures
2030
- after partial output, and do not measure user-perceived completion or promise a
2031
- routing improvement. No samples displays a dash.
2032
-
2033
-
2034
- ### Account shortcuts and compact toolbar (1.2.12)
2035
-
2036
- Checks & repairs offers equal-height GitHub account / M365 account shortcuts.
2037
- Both open the corresponding model-source page; neither starts a connection check,
2038
- account enumeration, login or model call. Actual checks stay on that source page.
2039
- The M365 shortcut retains link semantics and the shared button appearance.
2040
-
2041
- Auto refresh has content-based width, sized for the longer localized on/off label
2042
- so toggling it does not shift nearby controls. The language control has a 40px
2043
- minimum width, cannot flex-shrink and keeps 中文 / EN on one line. Compact toolbars
2044
- wrap when required rather than compressing text; header position remains stable
2045
- between modules in the same language and viewport.
2046
-
2047
- ### Application editing and keyboard behavior (1.2.20)
2048
-
2049
- Codex, Claude App and Claude Code keep separate page-local model/default/sync
2050
- drafts. Switching clients, navigating within the dashboard or reading current
2051
- settings preserves unsaved drafts. Save and Discard changes affect that client
2052
- only; reloading the browser discards page-local drafts. Model selection restores
2053
- focus to the corresponding checkbox/default button. Add API focuses its first
2054
- field; Cancel restores the entry control. Narrow layouts stack source, context
2055
- and reasoning below each model while retaining the same table semantics.
2056
-
2057
- Reading a catalog marks only its Read models button busy and offers Cancel.
2058
- Cancelling leaves the editor and its draft intact. No inference is sent. Source
2059
- saves report persistence separately from subsequent metadata refresh. Background
2060
- read failures retain existing messages; key read/save states use polite live
2061
- announcements. Account labels and values stay paired, and request summaries use
2062
- configured source names. Technical IDs remain available in request details.
2063
-
2064
- ### Codex App updates and model selection
2065
-
2066
- After an App update, completely quit and reopen the App once if the model list is
2067
- empty, then inspect `ccdx doctor`. On macOS, doctor reads bundled CLI package
2068
- metadata and the optional model-cache version without executing a binary or
2069
- altering the cache. A version mismatch is a diagnostic hint; it does not prove
2070
- that the cache caused a failed catalog. HTTP catalog `models` and app-server RPC
2071
- `model/list.data` are different layers, not evidence by themselves of a format
2072
- regression between client versions.
2073
-
2074
- The Responses WebSocket protocol is not implemented by CCDX. Upgrade requests
2075
- are refused promptly so supported native clients can fall back to HTTP/SSE.
2076
- This is tested separately from model-directory and provider-identity behavior;
2077
- SSE events are not relabeled as a WebSocket protocol.
2078
-
2079
-
2080
- ### Nightly updates (opt-in)
2081
-
2082
- Available from 1.2.22 after one manual upgrade. Settings → Version & updates →
2083
- Update overnight writes the boolean `nightly_updates`, false when absent. Enabling
2084
- it requires a normal CCDX restart; disabling it cancels pending automatic work in
2085
- a supervised service. Management-only `ccdx web` never installs updates. The risk
2086
- text explains that automatic installation/restart can affect conversation
2087
- continuation. The feature does not promise zero downtime or infallible rollback.
2088
-
2089
- Only an owned, writable npm installation with recognized command launchers can
2090
- use the supervisor. Standard execution stays unchanged when disabled. When enabled,
2091
- a foreground parent runs the gateway from an immutable private package tree;
2092
- Ctrl+C stops both, and no launchd/systemd/Windows service or boot task is installed.
2093
- Stopping CCDX, sleeping or powering off does not start a separate updater. After
2094
- a long observation gap, a new ten-minute idle interval is required.
2095
-
2096
- The parent observes bounded local state once a minute. A release check occurs at
2097
- most once per local calendar day, within 00:00–04:00, after ten observed idle
2098
- minutes. The new version must be a stable patch in the same major/minor series
2099
- and have been published at least 24 hours earlier. No prerelease or automatic
2100
- minor/major migration is accepted. Active inference, image work, configuration
2101
- operations, discovery or sign-in defer the update. New work during preparation
2102
- also defers it. Checks do not invoke models.
2103
-
2104
- Preparation uses the official pinned GitHub Release tarball and checksum, an
2105
- independent npm prefix, the configured registry/proxy/CA/TLS/offline policy and
2106
- ignored lifecycle scripts. Existing private-runtime launchers are regenerated;
2107
- custom launchers are not silently claimed. No Git, new Node installation,
2108
- permission override, certificate change or public-registry fallback is added.
2109
- A policy refusal, unavailable dependency or runtime check failure leaves the
2110
- current service running. The supported native broker is checked when already
2111
- present in the original installation.
2112
-
2113
- Before switching, the parent compares client/configuration fingerprints and
2114
- authorized model/default selections, backs up the global package and commands,
2115
- and validates the candidate on an internal loopback-only ephemeral listener while
2116
- the current instance continues serving. Previously healthy selected sources must remain healthy, every previously
2117
- published model must remain available, and defaults/credential scopes must match.
2118
- Additional upstream models are allowed. API discovery publication and client
2119
- writers are paused during this warmup. Only then is the old gateway quiesced.
2120
- A bounded private IPC message transfers Responses
2121
- history, source-scoped parent links/opaque items, image-edit references and
2122
- already-cached API keys limited to unchanged configured references.
2123
- Conversation payloads, image references and cached keys are never written to a
2124
- handoff file or diagnostics. Ordinary process-local counters begin a new run;
2125
- retained usage files remain available.
2126
- The combined serialized state is limited to 64 MiB; oversized/busy state defers
2127
- the update without eviction. New requests during the brief switching interval
2128
- can receive a temporary failure with `Retry-After: 1`.
2129
-
2130
- The warmed replacement imports state before taking over the same main port. Its
2131
- maintenance startup preserves client configuration, skips interactive GitHub
2132
- login, and opens neither browser nor client. Model/default selections and
2133
- configuration fingerprints must match before it accepts normal traffic. Failed
2134
- startup, discovery or a mismatched candidate leaves the original instance
2135
- alive. A failed port/prediction handover attempts package rollback and resumes
2136
- that same instance with its original caches. Cleanup of a retired runtime is
2137
- best-effort; pending cleanup suspends further automatic transitions. The old
2138
- process is retired only
2139
- after the replacement has acknowledged acceptance. A deliberate Ctrl+C
2140
- never starts another worker. Unexpected later worker exits are reported once;
2141
- this is not a general crash-respawn mechanism.
2142
-
2143
- The private `nightly-update-state.json` beside settings stores only the attempted
2144
- local day and paused version. Installed candidates that fail verification are
2145
- not repeatedly attempted; a newer version or explicit manual update is needed.
2146
- Unreadable records pause automatic updates without stopping the gateway. A
2147
- failed package rollback or failed restoration can require manual recovery;
2148
- Settings retains the full platform installation commands.
2149
-
2150
- ### Web resilience and resource versions
2151
-
2152
- Optional status/usage/animation views contain local initialization/render errors,
2153
- retain the surrounding shell and expose a local retry. Retry replays only the
2154
- latest bounded call state per view method. Network errors retain their existing
2155
- last-successful snapshots and explicit unknown/error status. Request-flow detail
2156
- rows are keyed and updated in place, retaining selection and DOM identity.
2157
-
2158
- The flow atom's thin ring is static while idle and rotates once per five seconds
2159
- while fresh active requests are observed, including waits/retries. The atom itself
2160
- does not rotate; counts do not accelerate the ring. Hidden/stale views stop it,
2161
- and reduced motion disables rotation. Existing curves, tables, palettes,
2162
- client identification and authorization remain unchanged.
2163
-
2164
- Static dashboard bytes are snapshotted together on first use and reused by the
2165
- process. HTML remains `no-store` and stamps script/style URLs with the service
2166
- version. Other assets use content-derived ETags and `no-cache` revalidation;
2167
- matching validators return 304. A mismatched version query returns 409 rather
2168
- than mixing resources, requiring a page reload. If the installed package changed
2169
- before a coherent bundle could be loaded, the optional page fails explicitly;
2170
- inference remains separate. Protected JSON/account/settings routes stay
2171
- `no-store`. No API-body caching, compression worker or new dependency is added.
2172
-
2173
- `CCDX_SUPERVISED_SERVICE` is an internal inherited worker marker. It is used only
2174
- with a private parent IPC channel; do not set it as a user preference. It grants
2175
- no network action and is not a replacement for the saved nightly-update opt-in.
2176
-
2177
-
2178
- ### Manual API token counting
2179
-
2180
- Messages support does not establish support for `POST /v1/messages/count_tokens`.
2181
- CCDX forwards the configured Messages endpoint plus `/count_tokens`. A manual
2182
- API's observed HTTP 404 is remembered in memory for 60 seconds, separately for
2183
- each model and Anthropic version/beta-header scope. This is an observed endpoint
2184
- failure, not a declaration that the model source is down. Cached and initial
2185
- results return HTTP 404 with `ccdx_api_count_tokens_unavailable`; no estimated
2186
- or synthetic count is returned. Changing the source configuration/key creates
2187
- a new scope. Other statuses, including 401/403/405/429/5xx, are not cached by
2188
- this compatibility mechanism; status and safe Retry-After metadata survive.
2189
-
2190
- Identical concurrent count requests share one bounded upstream operation.
2191
- Each caller cancels independently; the last cancelled waiter aborts shared
2192
- work. Before a model/header scope has a capability observation, distinct inputs
2193
- wait for its first real admitted count request. An observed 404 is reused by
2194
- those waiters; success is reused only for identical inputs. Distinct inputs
2195
- then run their own counts. Capability waiting has at most 16 in-flight scopes
2196
- and remains under normal gateway body/queue admission. Capability waiting and
2197
- the caller's own count share its existing upstream timeout budget. Identical-result sharing
2198
- is limited to bodies up to 1 MiB, 16 operations and 4 MiB of shared request text.
2199
- Larger supported inputs and overflow use their normal admitted path. Count responses are capped at 64 KiB. At most 128 capability observations are retained. A 404 expires after one
2200
- minute; a positive observation permits normal concurrency and a later 404 can
2201
- replace it. Successful results and request bodies are not retained
2202
- after the operation. Counts neither invoke generation nor fail over to another
2203
- source. This does not supply a missing tokenizer or guarantee every Claude App
2204
- context-management feature on a third-party model.
2205
-
2206
- Background manual-API catalog failures back off for 1, 5, 30 and then 120
2207
- minutes; successful publication resets the sequence. Explicit refresh retains
2208
- the existing one-minute minimum interval rather than the longer background
2209
- backoff. A valid upstream Retry-After also applies, bounded to 24 hours. These
2210
- are read eligibility gates, not added background retry timers. Revision changes
2211
- invalidate prior eligibility and obsolete results never publish.
2212
-
2213
- Claude Code's validated `x-claude-code-agent-id` separates a child task's local
2214
- source guard from its parent's guard when a session is identified. Parent keys
2215
- without that header remain unchanged. This header is correlation only: model
2216
- access and the company's account/history checks remain authoritative.
2217
-
2218
-
2219
- ### Claude App cross-source continuation
2220
-
2221
- In Claude App, choose another model that you have selected and authorized for
2222
- that app. CCDX can continue the same conversation across Messages sources using
2223
- the complete history supplied by the client. This is explicit model selection,
2224
- not automatic failover. Codex and Claude Code retain their existing source rules.
2225
-
2226
- CCDX preserves the original client conversation. In the forwarded request it
2227
- keeps visible messages, available image/document content, and completed native
2228
- tool calls/results; it removes incompatible old-source thinking and records a
2229
- hashed history checkpoint. Subsequent thinking from the new source is retained.
2230
- A changed/compacted client prefix is rebuilt only between completed tool turns.
2231
- No automatic summary, tool execution, history truncation or hidden inference is
2232
- added. Target capabilities and input/output limits still apply; unsupported
2233
- upstream behavior is reported without retrying another source.
2234
-
2235
- Finish a running response/tool operation before changing sources. Incomplete
2236
- tool pairs, source-owned file/container handles and unrecoverable encrypted
2237
- history require completing the operation or restoring the original content.
2238
- Known history belonging to a different company account remains blocked. Model
2239
- validation and token counting do not move a conversation's source. A failed
2240
- request before usable output leaves its prior checkpoint; partial output keeps
2241
- the actual new-source checkpoint and is never automatically replayed.
2242
-
2243
- `conversation-transfers.json`, beside `connections.json`, stores at most 1024
2244
- HMAC-keyed entries with source/prefix hashes and message counts, within a 512 KiB
2245
- read limit. It stores no prompts, files, raw session IDs or credentials. Records
2246
- survive ordinary service restart; corrupt records are preserved and reported,
2247
- not replaced with empty defaults. This does not persist Responses history or
2248
- change Codex login/provider/model-list configuration.
2249
-
2250
- `conversation-prefixes.json` adds a second bounded receipt with protocol-equivalent
2251
- block fingerprints. A string and its single text block compare equally, and
2252
- combining adjacent same-role messages preserves the proved block prefix. This
2253
- changes only comparison, not the client's messages. Text/code whitespace and
2254
- tool argument values remain significant. Each semantic receipt is tied to the
2255
- legacy owner/count/hash; an older writer makes stale semantic proof ineligible.
2256
- The pair commits atomically. Legacy receipts upgrade only when their prefix is
2257
- proved, and the original legacy file remains readable by older versions. Each
2258
- file is limited to 1024 keys and a 512 KiB read. No tool or private state is
2259
- replayed to work around an unknown prefix or account mismatch. Rejections report
2260
- whether the source changed or the prefix changed, and whether a tool result is
2261
- missing/unmatched or a tool turn is active.
2262
-
2263
- ### Explicit M365 app access and directory read receipts
2264
-
2265
- Model sources → Microsoft 365 → Allowed apps grants the current source to one,
2266
- several or no enabled apps. Granting access does not choose models or change the
2267
- current source. Removing access removes only that source's selected routes,
2268
- preserving other source selections and an unavailable default until explicitly
2269
- replaced. The runtime enforces revoked access even if a client retains its old
2270
- model menu. Shared legacy Claude-key migration reports which retained consumers
2271
- need reopening. Existing saved grants/owned legacy setups are retained; first-time
2272
- discovery/sign-in alone does not connect all apps. An explicit CLI M365 source
2273
- choice authorizes Codex only. Ordinary grants do not synchronize unrelated Codex
2274
- configuration, authentication or catalogs.
2275
-
2276
- M365's explicit directory refresh always requests the network, even when a
2277
- usable local model cache exists. `Cache-Control: no-cache` and `Pragma: no-cache`
2278
- request HTTP revalidation through the existing transport. They do not bypass
2279
- enterprise proxies, certificates, account policies or change token refresh.
2280
- The read summary distinguishes network from CCDX cache, records the data time,
2281
- raw total, compatible GPT/Claude counts and locally excluded count. Collapsed
2282
- details include sanitized upstream/client correlation IDs, HTTP status and a
2283
- bounded upstream Age value when returned. A network response containing five
2284
- models replaces an older fifteen-model cache; a failed check preserves and
2285
- labels prior data. Directory access is not inference authorization. There is no
2286
- automatic empty-directory substitution, fabricated Claude entry, extra polling
2287
- loop or inference probe. Correlation IDs are receipts, not proof that every
2288
- intermediate proxy honored revalidation.
2289
-
2290
- ### Upstream maker metadata
2291
-
2292
- Manual API discovery accepts bounded text from publisher, vendor, owned_by, display_name and name.
2293
- The model maker shown in lists/details prefers publisher, then vendor; owned_by
2294
- is shown separately as ownership and is not treated as the maker. Absent maker
2295
- information is Not provided; no name-based inference is performed. These are
2296
- upstream declarations, not proof of backend identity.
2297
-
2298
- Rebuildable per-source files under `api-model-display/` beside settings are
2299
- scoped by source ID and deployment revision. They preserve at most 500 models,
2300
- 512 KiB per file and 16 in-memory sources. They contain only model IDs and
2301
- identity declarations, no key or response body. Old versions ignore them;
2302
- connection v2 metadata remains readable during rollback. The new read-only
2303
- `model_display` source field and per-discovery `display` field are ignored if
2304
- round-tripped into Save API; unknown configuration fields still fail validation. Missing display
2305
- evidence triggers the existing normal catalog read rather than requiring key
2306
- entry or model reselection. Failed discovery retains valid prior evidence for
2307
- the same revision; invalid optional display cache does not block inference.
2308
-
2309
- ### Memory-extraction dependency notices
2310
-
2311
- The Codex model editor reads [`memories.extract_model`](https://learn.chatgpt.com/docs/customization/memories#configure-local-memories) when explicitly configured
2312
- in the native Codex config. Otherwise, it may show a recently observed extraction
2313
- model from a bounded read-only correlation of native Phase 1 task failures and
2314
- one unambiguous local HTTP 400 model. No prompt, memory text or model-name
2315
- heuristic is used. Explicit configuration is labelled Configured in Codex;
2316
- observations are Recently observed. The current client does not expose its
2317
- compiled default in the queried interface, so CCDX does not label a guessed
2318
- model as Codex default. With memory generation explicitly enabled but no model
2319
- evidence, the editor shows Chosen by Codex and Default model ID not available;
2320
- this does not infer a model from the checked model list or claim a successful
2321
- memory write. With generation explicitly disabled it shows Memory generation is
2322
- off. Unknown generation state and no model evidence remain Not detected.
2323
-
2324
- The optional native log helper runs only on startup/connection-view reads (including an explicit WebUI refresh),
2325
- coalesced and at least one minute apart, with a 2.5-second limit. It reads up to
2326
- eight task records and sixteen candidate HTTP records each, clipped to 8 KiB,
2327
- from the prior 24 hours. It uses the bundled Node SQLite API in a separate
2328
- read-only process; missing/locked/unsupported stores remain optional. Only a
2329
- model ID and observation time can enter `codex-memory-observed.json`, scoped by
2330
- the Codex profile, with a 24-hour freshness bound. No periodic log scanner,
2331
- account lookup, native Codex process or inference is started by this helper.
2332
-
2333
- Closing a known extraction model or its source in WebUI prompts about new-memory
2334
- generation and preserves your explicit decision. The draft is separate from the
2335
- saved selection. Existing memories are not deleted. Native memory generation
2336
- settings, model aliases, defaults, authentication and authorization are not
2337
- changed to satisfy a dependency. Confirmations are WebUI guidance, not a new
2338
- requirement on existing CLI/API operations. A notice does not identify every
2339
- background task or prove that memory generation succeeded.
2340
-
2341
- ### Messages stop and network evidence
2342
-
2343
- Recent Messages records retain declared context size, requested and forwarded
2344
- output budgets, normalized returned input/output usage, and an allowlisted stop
2345
- reason when supplied. Missing values remain unknown. `max_tokens` is shown as
2346
- output-limit termination; CCDX does not raise an undeclared GLM output limit or
2347
- use context length as an output ceiling. HTTP success and complete generation
2348
- remain distinct.
2349
-
2350
- API transport errors retain fixed safe code, DNS/connect/TLS/request/response
2351
- phase and reused-socket state in HTTP diagnostics. They do not retain raw
2352
- exceptions or URLs, and do not trigger automatic POST or cross-source retries.
2353
-
2354
-
2355
- ### Model presentation and source impact (1.2.31)
2356
-
2357
- Model upstream IDs, source-qualified routes and client aliases retain their existing identities. Presentation follows a valid upstream display_name, then name, then the upstream ID. The shared client plan adds a source suffix only for ambiguous display labels; same-source display collisions include the upstream ID. No capability or backend identity is inferred from a name. The display cache stays separate from connection v2 and is bound to the source deployment revision. Display-only changes invalidate the client plan and reconcile selected consumers without changing their grants or defaults. Claude configuration uses labelOverride even when a mixed binding's default source is not an API. Existing client list order, user context preferences and configuration ownership are retained. The gateway directory and written configuration share display labels; user-preserved ordering is not replaced with a vendor-family ranking.
2358
-
2359
- Application pages distinguish saved selections from configuration-write results. A written configuration is not evidence that an already running App adopted it. Reopen the client to load changes. Manual-sync settings, preserved fields, missing defaults and failed writes retain separate statuses. When client capability controls are unverified, existing shared capability settings are kept; this does not assert support for those controls in the new version.
2360
-
2361
- Closing a source reviews selected deployments for every enabled app, including nondefault and temporarily unavailable selections. The preview reports selected-model counts and whether the default needs replacement. A still-valid default stays unchanged. Losing the default or the last selection requires an explicit replacement or pause through the existing access semantics. The WebUI submits an impact revision; changes to bindings or source identity invalidate that confirmation. Mere authorization without selected models is not counted as model consumption.
2362
-
2363
- ### Disclosure motion and scoped interface changes (1.2.31)
2364
-
2365
- Native details/summary controls use one theme-colored SVG chevron: down while closed, up while open. Rotation takes 160 ms; visible content uses a 160 ms opening and 110 ms closing opacity/translation transition, without height animation. Keyboard activation, cancellation by rapid toggling, translated summaries and dynamically inserted disclosures remain supported. Reduced-motion mode uses native immediate toggles, and backgrounding finishes pending transitions. The animation script is a versioned same-origin dashboard asset.
2366
-
2367
- The existing palettes, sidebar, atom, solid selected controls and usage views remain. All retained usage totals, source/model filters, 7/30/90-day trends, bar/line views and 365-day activity are retained. Checks hide the empty results header until results exist. Animation style has one specific disclosure title; saved/effective differences are expressed on one line. Coarse-pointer switch labels and toolbar icon targets expand without enlarging the drawn switches.
2368
-
2369
- ### Successful HTTP transport carrying model errors (1.2.31)
2370
-
2371
- A native Messages JSON error envelope under HTTP 200, or an SSE error event under a successful HTTP status, is recorded as model.error with the original HTTP status and a bounded structured error code/type. Existing failed-model accounting remains. The original response bytes/status are preserved; no automatic retry or replay is added. Normal output carrying incidental error-like fields is not reclassified. Token-count errors remain in their separate capability category. Request issue summaries lead with known plain-language causes, while technical codes, IDs, original diagnostic fields and clipboard export remain available in details.
2372
-
2373
-
2374
- ### Flow alignment and system fonts (1.2.32)
2375
-
2376
- Applications, request counts and their status lines share a right-aligned edge;
2377
- source/model nodes retain their shared left edge. Application wire anchors no
2378
- longer move with label width or mixed singleton/group counts. The existing
2379
- rounded turns, dashed activity, selection and reduced-motion behavior remain.
2380
- Narrow layouts keep counts below the application name and aligned to the same
2381
- text edge.
2382
-
2383
- The WebUI retains its Latin monospace stack and explicitly names Chinese
2384
- sans-serif system fallbacks before generic monospace: Microsoft YaHei UI/YaHei,
2385
- PingFang SC, Noto Sans CJK SC/Noto Sans SC and WenQuanYi Micro Hei. Form controls
2386
- inherit the page family; code and terminal samples reuse the same stack. No font
2387
- is downloaded or installed. Available system fonts determine the exact glyphs;
2388
- unsupported scripts still use browser fallback.
2389
-
2390
- Pure white uses the existing independent light/dark toggle, browser persistence,
2391
- cross-tab updates, automatic/manual saving, and pre-reset backup/restore. It does
2392
- not change the default green palette or the terminal palette and does not change
2393
- Codex/Claude routing, credentials or model selections.
2394
-
2395
-
2396
- ### Command groups (1.2.33)
2397
-
2398
- Canonical groups separate source identity/catalogs, client model plans and service
2399
- preferences. The compact route definition drives parsing, nearby/deep help and
2400
- explicit legacy mappings. Existing legacy handlers continue to own their original
2401
- arguments, output and effects. New CLI handlers use the loopback management API;
2402
- read-only commands do not start a service or launch an App.
2403
-
2404
- ```text
2405
- ccdx source list
2406
- ccdx source add [--file FILE] [--key-stdin] [--preview] [--yes]
2407
- ccdx source ID status [--format table|plain|json]
2408
- ccdx source ID models [--refresh] [--format table|plain|json]
2409
- ccdx source ID check [--format table|plain|json]
2410
- ccdx source ID edit [--file FILE] [--key-stdin] [--preview] [--yes]
2411
- ccdx source ID access [--edit] [--apps codex,claude-app,claude-code|none]
2412
- ccdx source ID enable|disable|remove [--preview] [--yes]
2413
- ccdx source github login|reauth [--login ACCOUNT]
2414
- ccdx source github logout [--yes]
2415
- ccdx source m365 accounts
2416
- ccdx source m365 account [--id ID]
2417
-
2418
- ccdx app list
2419
- ccdx app ID status [--details] [--format table|plain|json]
2420
- ccdx app ID models [--edit] [--file FILE] [--preview] [--yes]
2421
- ccdx app ID sync [--preview] [--yes]
2422
- ccdx app ID enable|disable [--preview] [--yes]
2423
- ccdx app codex prediction status|setup|remove|pause|resume|repair
2424
- ccdx app codex image status|setup|remove|pause|resume
2425
- ccdx app codex review status|select
2426
-
2427
- ccdx requests [--active|--failed] [--app ID] [--source ID] [--limit 1..100]
2428
- ccdx requests show REQUEST_ID
2429
- ccdx status [--details] [--format table|plain|json]
2430
- ccdx usage --scope run|all [--provider ID] [--format table|plain|json]
2431
- ccdx config show [--effective] [--format table|plain|json]
2432
- ccdx config set KEY VALUE [--preview] [--yes]
2433
- ccdx config terminal
2434
- ccdx config animation
2435
- ccdx config limits [--decoded MiB|default]
2436
- ccdx config reset|restore [--preview] [--yes]
2437
- ccdx doctor cache [existing cache options]
2438
- ccdx update check [--format table|plain|json]
2439
- ```
2440
-
2441
- Client IDs are `codex`, `claude-app`, `claude-code`; backend binding IDs are unchanged.
2442
- Only APIs support generic edit/remove. Removal requires a disabled source with no
2443
- retained client binding, including disabled clients. Built-in M365 profile cleanup
2444
- remains the explicit legacy `m365 remove`, with its existing effects. Source
2445
- `check`/model `--refresh` contact a source only when requested and never send inference.
2446
- Cached built-in catalogs are read directly from the source, without filtering
2447
- through client selection. API default catalogs describe saved model configuration;
2448
- explicit refresh returns discovery results. Neither proves inference access.
2449
- Source grants do not choose visible client models. Disable uses the existing
2450
- source-impact revision and replacement/pause review; scripts must give explicit
2451
- `--replacements` JSON for affected clients. It never silently chooses another source.
2452
-
2453
- Client models describe the saved selected plan, not the upstream directory.
2454
- Unavailable selections remain explicit and are not silently dropped; a changed
2455
- plan containing unavailable selections is refused until the catalog returns or
2456
- the user explicitly removes them. Removing an observed Codex memory dependency
2457
- shows its existing warning before confirmation; no model name is guessed. New access toggles retain legacy source/model
2458
- bindings and do not materialize deployments. `sync --preview` reports the model
2459
- and managed-configuration plan, not a byte-level file diff. Explicit sync can write
2460
- once while `auto_sync` is false; the preference stays false. Writers retain current
2461
- ownership checks and do not restart client programs or imply App adoption.
2462
-
2463
- Source and client writes carry the current revision. Old running services without
2464
- the new management capability are refused before new connection mutations. This
2465
- is not an automatic restart or a package/process hot handoff. New JSON output
2466
- contains no ANSI or startup chatter; failures exit nonzero. Existing 0/1/2 exit
2467
- conventions and legacy non-TTY/machine paths remain.
2468
-
2469
- For scripts, API files contain only `config` and `allowed` (backend client IDs).
2470
- Configuration includes name/base_url/endpoints/auth_header/models and optionally
2471
- key_env. A key uses a bounded private stdin stream with `--key-stdin` or an existing
2472
- environment reference; it is not a command argument or echoed in output. App model
2473
- files require an explicit deployments array (empty pauses access) and allow
2474
- default_model/auto_sync. Both forms use the same
2475
- backend validation and authorization as WebUI. Interactive creation retains a saved
2476
- source after discovery failure, reports partial failure, and allows explicit retry;
2477
- model interfaces missing upstream must be chosen explicitly.
2478
-
2479
- `config` only manages the settings-preference allowlist. It does not reset browser
2480
- local storage, accounts, API credentials, model plans, chats or image/prediction
2481
- access. CLI reset/restore reuse the existing atomic backup writer with a separate
2482
- `service-settings-preferences-backup.json` in the same CCDX config directory.
2483
- The original WebUI backup file and version-one format are retained. The CLI uses
2484
- `config restore`; WebUI keeps its own appearance-paired backup. Invalid or stale
2485
- files are not overwritten. Overnight-update risk needs explicit confirmation;
2486
- `--yes` is an explicit script choice. Saved/effective state and normal restart
2487
- requirements remain distinct. No new background service, stop or restart command
2488
- is introduced.
2489
-
2490
- Requests use existing bounded active/recent performance and structured error
2491
- snapshots. They retain original request IDs, source, route, codes and attempts;
2492
- missing records return Not retained. Notices are not treated as failed request
2493
- counts, and no new transcript/history database is added. Only observed application
2494
- identity is used. Codex App/CLI observations share the Codex binding; unidentified
2495
- clients stay separate.
686
+ | Variable | Use |
687
+ | --- | --- |
688
+ | `ADAPTER_HOST` | Listener host; default loopback |
689
+ | `ADAPTER_PORT` | Main listener port; default 2026 |
690
+ | `CCDX_AUTO_LAUNCH` | Set to 0 to skip opening Codex |
691
+ | `CCDX_M365` | Set to 0 to disable the company source for this run |
692
+ | `CCDX_USAGE_PATH` | Recorded usage file path |
693
+ | `CCDX_LOG_LEVEL` | Optional diagnostic logging level |
694
+ | `CCDX_LOG_PATH` | Optional diagnostic log path |
695
+
696
+ Internal supervisor and installer environment fields are not user settings.