Skip to content

fix(agent-codex): launch workers with codex exec#2079

Open
NichUK wants to merge 1 commit into
AgentWrapper:mainfrom
NichUK:codex/fix-agent-codex-exec
Open

fix(agent-codex): launch workers with codex exec#2079
NichUK wants to merge 1 commit into
AgentWrapper:mainfrom
NichUK:codex/fix-agent-codex-exec

Conversation

@NichUK
Copy link
Copy Markdown

@NichUK NichUK commented Jun 1, 2026

Summary

  • launch Codex worker sessions with codex exec so AO-created workers run non-interactively
  • keep existing option handling for permissions, model, reasoning effort, config, prompt, and post-launch setup
  • add a patch changeset for @aoagents/ao-plugin-agent-codex

Fixes #2078

Why

The current agent-codex process command starts as codex ..., which opens the interactive Codex UI and ignores AO's prompt-driven worker contract. In local AO smoke testing this left spawned workers idle until they were marked stuck. The Codex CLI's non-interactive form is codex exec <prompt>, which is the expected mode for headless AO worker launches.

Validation

  • corepack pnpm --filter @aoagents/ao-core build
  • corepack pnpm --filter @aoagents/ao-plugin-agent-codex test
  • corepack pnpm --filter @aoagents/ao-plugin-agent-codex typecheck
  • corepack pnpm --filter @aoagents/ao-plugin-agent-codex build

Note: corepack pnpm install --frozen-lockfile completed, but emitted a local Windows warning about rebuilding node-pty because the Visual Studio Spectre-mitigated libraries are not installed. That did not affect the Codex plugin checks above.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the Codex agent launch command to use the codex exec subcommand so AO worker sessions run non-interactively.

Changes:

  • Prefixes the generated launch command with exec after the codex binary.
  • Updates unit tests to reflect the new command format.
  • Adds a changeset to publish a patch release for the plugin.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/plugins/agent-codex/src/index.ts Adjusts getLaunchCommand to include exec after the binary.
packages/plugins/agent-codex/src/index.test.ts Updates expected command strings to include exec.
.changeset/fix-codex-exec-launch.md Adds release note for the patch change to the launch command.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agent-codex should launch headless workers with codex exec

2 participants