Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .claude/skills/wizard-integrations/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@ The barrel `src/integrations/index.ts` exports:

Only import from the barrel or from specific submodules — never reach into an IDE's `index.ts` directly from outside the integrations module.

## IDE-Specific Runtime Constraints

### Codex: shell environment policy

Codex `exec` mode defaults to a restricted shell environment — commands the agent runs do not inherit proxy settings, npm auth tokens, or registry config from the parent process. Without `shell_environment_policy.inherit="core"`, `npm install` falls back to direct connections that time out on corporate networks, turning a 15-second install into minutes of waiting.

Always pass `-c 'shell_environment_policy.inherit="core"'` in Codex `exec` spawn args so the agent's commands see the core parent environment (PATH, HOME, proxy settings, etc.).

### Codex: `item.completed` event batching

Codex `exec --json` only emits `item.completed` events — not incremental text deltas. Status lines only surface after the agent finishes an entire message turn. If the agent does MCP calls, file reads, or package installs between messages, the user sees nothing until the next completed message. Claude Code and Cursor stream incrementally via `stream-json`, so their status updates appear in real time.

## Coding Conventions

Follow all conventions from the `wizard-architecture` skill. Additionally:
Expand Down
10 changes: 9 additions & 1 deletion __tests__/e2e/onboarding-invocation.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ const IDE_CASES = [
name: 'Codex',
downPresses: 2,
command: 'codex',
expectedArgs: ['exec', '--json', '--sandbox', 'danger-full-access', '-'],
expectedArgs: [
'exec',
'--json',
'--sandbox',
'danger-full-access',
'-c',
'shell_environment_policy.inherit="core"',
'-',
],
expectedPromptSnippets: [
'Confidence SDK',
'$analyze-project',
Expand Down
24 changes: 18 additions & 6 deletions src/integrations/codex/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,24 @@ export function runOnboarding(

let child: ChildProcess;
try {
child = spawn('codex', ['exec', '--json', '--sandbox', 'danger-full-access', '-'], {
cwd: opts.projectDir,
timeout: ONBOARDING_TIMEOUT_MS,
stdio: ['pipe', 'pipe', 'pipe'],
env,
});
child = spawn(
'codex',
[
'exec',
'--json',
'--sandbox',
'danger-full-access',
'-c',
'shell_environment_policy.inherit="core"',
'-',
],
{
cwd: opts.projectDir,
timeout: ONBOARDING_TIMEOUT_MS,
stdio: ['pipe', 'pipe', 'pipe'],
env,
},
);
} catch (err) {
callbacks.onError(spawnErrorMessage('codex', err as NodeJS.ErrnoException));
return null;
Expand Down