Skip to content

Commit d774b28

Browse files
committed
fix: enable Codex questions for interactive hosts
1 parent 3f55a75 commit d774b28

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

‎AGENTS.md‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# Development Rules
22

3-
## Conversational Style
4-
5-
- Keep answers short and concise
6-
- No emojis in commits, issues, PR comments, or code
7-
- When the user asks a question, answer it first before making edits or running implementation commands.
8-
- When responding to user feedback or an analysis, explicitly say whether you agree or disagree before saying what you changed.
9-
- Challenge me and push back and play devils advocate when i want to add implement something that has risks or for a new feature.
10-
113
## Code Quality
124

135
- Read files in full before wide-ranging changes, before editing files you have not fully inspected, and when asked to investigate or audit. Do not rely on search snippets for broad changes.

‎crewcoder-agent/docs/CODEX_CLI_PROVIDER.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,13 @@ ModelStreamCallbacks.onThinkingDelta retains portable text deltas and may also c
179179
Portable text includes blank lines when switching reasoning items, summary sections, raw-content sections or plans. Completion-only text uses the same boundaries; final suffixes within a section append without repeating its body. The adapter forwards provider text verbatim apart from these separators. A heading-only provider summary remains heading-only; receiving it does not establish that a longer summary was available.
180180

181181
The terminal `--json-events` stream keeps the established nonempty `{ type: "thinking_delta", text, emittedAt }` shape. Do not send ACP snapshot metadata or empty completion-only events into that terminal contract. Structured completion corrections remain available over ACP. When completed text differs from streamed text, text-only consumers still receive the exposed final text rather than having it suppressed.
182+
183+
184+
## Structured questions in normal mode
185+
186+
When the host provides `requestQuestion`, the Codex CLI launch adds the process-local
187+
`features.default_mode_request_user_input=true` config override. Codex otherwise
188+
defaults this feature off in normal execution mode even though its app-server can
189+
receive question responses. Non-interactive runs keep the user's configuration.
190+
This does not change native tool, filesystem, or approval policy. ACP clients must
191+
still negotiate `crewcoder/questions` version 1 to collect custom text.

‎crewcoder-agent/src/providers/codex-app-server-provider.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ export async function runCodexCliProvider(input: ProviderRunInput, signal?: Abor
231231
throw new Error(`Codex CLI could not be locked to CrewCoder tools (${detail}).`);
232232
}
233233
}
234-
const args = [...lockdown, "app-server", "--stdio", ...codexAppServerContextArgs(input.modelInput)];
234+
// Default-mode Codex questions are opt-in; enable them only with an interactive host.
235+
const questionArgs = input.stream?.requestQuestion ? ["-c", "features.default_mode_request_user_input=true"] : [];
236+
const args = [...lockdown, ...questionArgs, "app-server", "--stdio", ...codexAppServerContextArgs(input.modelInput)];
235237
let cause: { message: string; code?: string; stderr: string } | undefined;
236238
const result = await runAppServerTurn(input, signal, { command, args, hostedToolsOnly, syncCredentialBack: false, onUnavailable: value => { cause = value; } });
237239
if (!result) throw new Error(codexCliStartFailure(command, cause));

‎crewcoder-agent/src/tests/codex-cli-provider.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ describe("bring-your-own Codex CLI provider", () => {
9494
const argv = entries[0]?.argv as string[];
9595
for (const feature of CODEX_NATIVE_TOOL_FEATURES) expect(argv).toContain(feature);
9696
expect(argv).toContain("web_search=disabled");
97+
expect(argv).toContain("features.default_mode_request_user_input=true");
9798
expect(argv).toContain("agents.max_depth=0");
9899
const catalogArgument = argv.find(arg => arg.startsWith("model_catalog_json="));
99100
expect(catalogArgument).toBeDefined();

0 commit comments

Comments
 (0)