You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a6b66b3
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -254,6 +254,8 @@ crewcoder/
254
254
255
255
## Current hard-won notes
256
256
257
+
- Worker identity is off by default and opt-in through `workerIdentityEnabled` and `identity on|off|status`. Preserve `activeWorker` selection while disabled; keep default/custom/host system prompts and propagate identity suppression to delegated runs. Host opt-in must never override the user's opt-out.
258
+
-`codex-cli` is the sole registered Codex provider and fresh-install default; do not restore the managed `codex` provider or its bundled dependency/login flow. Claude model discovery and execution must share the executable resolver: explicit override, installed Claude Code on PATH, then the SDK bundle. An older SDK bundle must not hide models exposed by the user's installed CLI.
257
259
- Provider thinking streams are user-visible behavior. Do not remove or simplify `onThinkingDelta`, `thinking_delta`, or TUI `thinking` blocks without replacing the behavior and tests.
258
260
- Codex/OpenAI reasoning summaries can arrive as live `response.reasoning_summary_text.delta`, final `response.reasoning_*_done`, response-level `output` reasoning items, or completed `response.output_item.done` reasoning items.
259
261
- OpenCode uses the Anthropic-compatible provider path and must request `stream: true` to surface thinking deltas.
Copy file name to clipboardExpand all lines: crewcoder-agent/AGENTS.md
+37-9Lines changed: 37 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,10 @@ CrewCoder should become a best-in-class coding agent with:
20
20
21
21
## CLI aliases
22
22
23
-
The `@openai/codex` dependency uses npm's `latest` tag so new CrewCoder installations receive the current stable Codex app-server. Keep `scripts/release.cjs` from replacing that tag with an exact version. Existing installations update only when their package manager installs again.
23
+
`codex-cli` is the sole registered Codex provider and fresh-install default. It uses
24
+
the user's installed Codex CLI and login; never restore the managed `codex` provider,
25
+
its device login flow, or an `@openai/codex` package dependency through release automation.
26
+
Existing configs naming `codex` must explicitly select `codex-cli`; there is no provider alias.
24
27
25
28
The agent package maps `crewcoder`, `crew`, and `crewcoder-agent` to the same CLI entrypoint. Keep `crew` behavior identical to `crewcoder`, including no-argument TUI launch and all argument-bearing backend commands. Never restore the `cc` alias because it shadows the standard Unix C compiler command.
26
29
@@ -184,7 +187,7 @@ Do not store CrewCoder extensions under `/.crewcode`.
184
187
185
188
```txt
186
189
1. Built-in providers
187
-
- codex
190
+
- codex-cli
188
191
- claude
189
192
- opencode
190
193
@@ -205,6 +208,20 @@ Built-ins are not plugins. They live in `src/providers` and are first-class prov
205
208
206
209
Users add additional providers through CrewCoder extensions.
207
210
211
+
Native model catalogs for `codex-cli` and `claude` come from app-server
212
+
`model/list` and Agent SDK `supportedModels()`. Keep the bundled catalogs as
213
+
offline fallbacks and known context metadata, never as the picker allowlist.
214
+
Update both `models` and `modelCatalog` when hydrating: picker resolution prefers
215
+
the latter. Preserve five-second discovery deadlines, bounded pagination,
216
+
five-minute process caching, account separation, and no-inference discovery.
217
+
Claude catalog probes must disable hooks/tools/MCP/skills and persistence.
218
+
Discovery and execution must share `resolveClaudeExecutable`: explicit override,
219
+
installed `claude` on PATH, then the SDK bundle. Never let an older bundled CLI
220
+
hide models available in the user's installed CLI. Executable changes invalidate the cache.
221
+
ACP model state must await the same discovered registry used by CLI/TUI.
222
+
`auth --json` must use `listProviders({ discoverModels: false })` to avoid
223
+
credential refreshes and discovery subprocesses. See [Providers](docs/PROVIDERS.md#automatic-model-discovery).
224
+
208
225
Thinking/reasoning stream behavior is part of the provider contract:
209
226
210
227
```txt
@@ -245,7 +262,7 @@ Codex / OpenAI Responses:
245
262
- Never treat reasoning token usage as proof the UI received a summary; usage can show reasoning_tokens while no summary was emitted.
246
263
- If successful Codex output leaks raw SSE `data:` lines, normalize it back into CrewCoder assistant JSON before returning.
247
264
- HTTP 200 does not prove a successful Codex turn: SSE `error`, `response.failed`, and `response.incomplete` events are terminal provider failures. A stream ending without assistant text, tool calls, or completion metadata is also a provider/protocol failure, never a successful `(empty Codex response)` placeholder.
248
-
- Codex primarily uses official app-server durable threads stored under CrewCoder's isolated Codex home. Persist only the encoded thread/contract identifier in `providerSessionIds.codex`; never auth tokens. Local app-server turns use its native workspace-write shell/patch capabilities, and provider-native approval requests must route through the active host interaction channel. When `useProviderNativeFileTools` is false for an ACP/SDK virtual filesystem, skip app-server entirely and use the direct Responses transport so built-in local shell/patch tools cannot bypass the host filesystem. Preserve failed native `fileChange` error detail rather than projecting only its proposed patch. The direct connection-cached WebSocket and stateless SSE transports are guarded fallbacks; never replay after app-server `turn/start` has been sent.
265
+
- Codex CLI uses official app-server durable threads in the user's own Codex home. Persist the encoded native thread/contract identifier in `providerSessionIds["codex-cli"]`; never auth tokens. Hosted or virtual-filesystem sessions must lock native tools down and use CrewCoder dynamic tools under a read-only sandbox. Preserve native approval routing and failed tool details. The registered provider has no direct Responses, WebSocket, or SSE fallback; never replay a started native turn.
249
266
- Native Codex approval questions show the reason without appending the shell command; keep command details in tool events and preserve all provider approval decision values. See `docs/CODEX_CLI_PROVIDER.md`.
250
267
- Native Codex command failures must preserve error text and otherwise report declined status or exit code. Empty `aggregatedOutput` is not a useful failure result and must not become an unexplained blank tool row.
251
268
- Provider-native compaction is observable lifecycle, not merely a token-count change. Codex app-server `contextCompaction` item start/completion and legacy `thread/compacted` notifications must emit one deduplicated provider-compaction lifecycle; Claude `compact_boundary` must emit provider completion. ACP projects these through `_crewcoder/compaction_update` without claiming the CrewCoder durable transcript itself was rewritten.
@@ -306,7 +323,7 @@ serialization -> provider adapters read the file + base64 at request time
306
323
into the user text; only the text is rewritten.
307
324
- Encoded per runtime: `anthropic-messages` -> Anthropic `image`/base64 (or OpenAI
308
325
chat `image_url` for OpenAI-shaped models); `openai-responses` and
309
-
`openai-codex-responses` (codex) -> Responses API `input_image` data URI.
-`IDENTITY.md` (per worker) — freeform persona/instructions for that worker. Its body is embedded in the worker identity block in the system prompt. Defines WHO the worker is and HOW it behaves.
1049
1066
1050
-
The **active worker** is stored in `config.json` as `activeWorker` (default `"Crew"`). A default `Crew` worker is auto-created on first use; a legacy single `identity.json` is migrated into it once.
1067
+
The selected worker is stored in `config.json` as `activeWorker` (default `"Crew"`).
`crewcoder identity on|off|status` and TUI `/identity on|off|status` manage it.
1070
+
Disabling preserves worker files and the selected name; ordinary identity-off
1071
+
runs and worker listing must not auto-create a default worker. Explicit worker
1072
+
selections remain validated. See [optional worker identity](docs/WORKER_IDENTITY.md).
1051
1073
1052
1074
### Two instruction layers — keep them separate
1053
1075
@@ -1057,7 +1079,13 @@ Repo AGENTS.md -> rules for the codebase in the working dir (normal AGEN
1057
1079
This AGENTS.md -> CrewCoder package docs/standards, documentation ONLY
1058
1080
```
1059
1081
1060
-
Identity assembly lives in `src/core/identity.ts` (`getActiveWorker`, `buildIdentityPrompt`). The agent loop passes the identity block, including the `IDENTITY.md` body, to `buildSystemPrompt` as `identityPrompt`, so it sits at the top of the system prompt on every run. Fresh installs auto-create `Crew` with owner placeholders `CrewCoder User` / `@CrewCoderUser` and a useful general-purpose starter identity; never overwrite an existing worker's customized files.
1082
+
Identity assembly lives in `src/core/identity.ts` (`getActiveWorker`, `buildIdentityPrompt`).
1083
+
The agent loop includes that block only when both user config and the host/run
1084
+
instruction policy permit it. Neither an explicit worker nor a host enabling its
1085
+
identity policy overrides user opt-out. Delegated children inherit suppression.
1086
+
Keep normal/custom/host system prompts and tool/approval policy intact. Fresh
1087
+
identity-enabled installs create `Crew` with placeholder owner metadata; never
Copy file name to clipboardExpand all lines: crewcoder-agent/README.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,12 +33,17 @@ Layout:
33
33
34
34
## Default worker
35
35
36
-
On first use, CrewCoder creates the global `Crew` worker under `~/.crewcoder/workers/Crew/` (or the configured CrewCoder home). Its starter metadata identifies the owner as `CrewCoder User` (`@CrewCoderUser`), and its `IDENTITY.md` provides a practical general-purpose coding-partner role and working style. Both files are user-editable; existing workers are not overwritten.
36
+
Worker identity is off by default for new users. After `crewcoder identity on`, first use creates the global `Crew` worker under `~/.crewcoder/workers/Crew/` (or the configured CrewCoder home). Its starter metadata identifies the owner as `CrewCoder User` (`@CrewCoderUser`), and its `IDENTITY.md` provides a practical general-purpose coding-partner role and working style. Both files are user-editable; existing workers are not overwritten.
37
+
38
+
Use `crewcoder identity off` or TUI `/identity off` to keep the normal and custom
39
+
system prompts while omitting the worker persona. `identity on` restores it, and
40
+
`identity status` reports the setting. `activeWorker` preserves the selected name;
41
+
`workerIdentityEnabled` stores the toggle. See [optional worker identity](docs/WORKER_IDENTITY.md).
3. CrewCode app plugins: crewcode.plugin.json, generated from /CrewCode/examples/plugins when available
44
49
```
@@ -94,7 +99,7 @@ crewcoder upgrade
94
99
crewcoder update --yes
95
100
```
96
101
97
-
New installations resolve the current npm `@openai/codex@latest` app-server. Existing installations keep their installed Codex version until npm updates them.
102
+
Codex uses your separately installed Codex CLI and its login. Install/update that CLI normally; CrewCoder does not install a second Codex runtime.
98
103
99
104
The scoped agent and TUI packages can still be installed separately for development or custom packaging.
100
105
@@ -104,16 +109,18 @@ The scoped agent and TUI packages can still be installed separately for developm
104
109
crewcoder providers
105
110
crewcoder run --provider opencode "fix this bug"
106
111
crewcoder run --provider claude "refactor this module"
107
-
crewcoder run --provider codex "write tests for this CLI"
112
+
crewcoder run --provider codex-cli"write tests for this CLI"
108
113
crewcoder run --provider claude --model claude-sonnet-5 "review this change"# local Claude Code login
109
114
crewcoder run --provider anthropic --model claude-sonnet-5 "review this change"# direct API key
110
115
crewcoder run --provider openrouter --model openai/gpt-5.4 "fix this bug"
111
116
crewcoder config set defaultProvider opencode
112
117
```
113
118
119
+
Codex CLI and Claude model pickers automatically discover models from their native runtimes. Claude discovery and inference prefer your installed Claude Code over the SDK bundle. New runtime-reported models appear without editing CrewCoder's model list. Discovery uses a five-minute process cache and falls back to the last successful or bundled list when unavailable. See [automatic model discovery](docs/PROVIDERS.md#automatic-model-discovery).
120
+
114
121
CrewCoder resolves model context windows from provider metadata first, then from a strict-match, 24-hour disk cache of OpenRouter's public model catalog. Unknown or offline models remain token-only. See `docs/MODEL_CONTEXT_WINDOWS.md`.
115
122
116
-
The built-in Codex provider uses official app-server threads persisted under CrewCoder's home, so resumed turns send only new input across process and machine restarts. The direct WebSocket/SSE transport remains a guarded fallback. See `docs/CODEX_TRANSPORT.md`.
123
+
`codex-cli` is the sole Codex provider and fresh-install default. It uses official app-server threads in the user's Codex home, so resumed turns send only new input across process and machine restarts. Existing configurations with `defaultProvider: codex` must run `crewcoder config set defaultProvider codex-cli`. See `docs/CODEX_TRANSPORT.md`.
117
124
118
125
Provider adapters use checked process, HTTP/SSE, WebSocket, continuation, fallback, and replay profiles. Built-ins include Claude Code Agent SDK, Grok CLI (ACP stdio), OpenAI, Anthropic, OpenRouter, xAI, DeepSeek, Mistral, Codex, and OpenCode; extensions may select vetted generic transports without receiving CrewCoder-owned OAuth credentials. Models/providers can advertise parallel tool-call support, while only tools explicitly marked parallel-safe execute concurrently; sequential tools remain ordering barriers. See `docs/PROVIDERS.md`, `docs/PARALLEL_TOOL_CALLS.md`, `docs/contributor/PROVIDER_TRANSPORTS.md`, and `docs/ACP_CLIENT_PROVIDER.md`.
CrewCoder owns a detached, provider-independent goal supervisor. Codex is the model provider; `/goal` is not forwarded to the Codex Responses endpoint.
123
130
124
131
```bash
125
-
crewcoder goal start "Complete the migration and stop when contract tests pass" --provider codex --approval review
132
+
crewcoder goal start "Complete the migration and stop when contract tests pass" --provider codex-cli --approval review
Copy file name to clipboardExpand all lines: crewcoder-agent/docs/ACP_ADAPTER.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,6 +157,7 @@ CrewCoder's own instruction sources apply. It accepts
157
157
Without a policy the session behaves as standalone CrewCoder: worker identity on, no global files.
158
158
159
159
-`workerIdentity: false` omits the active worker's identity block (`~/.crewcoder/workers/<name>`).
160
+
-`workerIdentity: true` permits identity only when the user's persistent `workerIdentityEnabled` setting is also on. Host opt-in never overrides user opt-out. See [worker identity](WORKER_IDENTITY.md).
160
161
Hosted text-only sessions never include it either way.
161
162
-`globalInstructions: true` adds the user's `$CODEX_HOME/AGENTS.md` (default `~/.codex`) and
162
163
`$CLAUDE_CONFIG_DIR/CLAUDE.md` (default `~/.claude`) under a "Global user instructions" heading,
Copy file name to clipboardExpand all lines: crewcoder-agent/docs/CODEX_CLI_PROVIDER.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,15 @@
1
1
# Bring-your-own Codex CLI provider
2
2
3
-
The `codex-cli` provider runs the user's own installed Codex CLI (`codex app-server --stdio`) with the user's own Codex login. CrewCoder never reads, copies, refreshes, or stores those tokens. This is the opposite of the `codex` provider, which signs in through `crewcoder login codex` and holds ChatGPT OAuth tokens itself.
3
+
The `codex-cli` provider is CrewCoder's sole Codex provider and fresh-install default.
4
+
It runs the user's installed Codex CLI (`codex app-server --stdio`) with its own
5
+
login. CrewCoder never reads, copies, refreshes, or stores those tokens. The former
6
+
managed `codex` provider and `crewcoder login codex` flow have been removed.
4
7
5
8
## Setup
6
9
7
10
```bash
8
11
codex login # the user's normal Codex CLI sign-in
12
+
crewcoder config set defaultProvider codex-cli # replace a previously configured codex default
9
13
crewcoder auth --json # codex-cli should report "signed-in"
10
14
crewcoder run --provider codex-cli --model gpt-5.6-luna "inspect this repository"
0 commit comments