Skip to content

Codex profile provider plugin is not registered before agent runtime #921

@chubes4

Description

@chubes4

The generic codex-subscription runtime overlay profile mounts the Codex provider plugin, but agent-task-run --json still fails provider preflight because codex is not registered in wp-ai-client after provider plugins load.

Evidence

After Homeboy Extensions #1312, the executor uses the configured WP Codebox binary correctly:

{
  "command": "/home/chubes/Developer/wp-codebox-merged-main-verify/packages/cli/dist/index.js",
  "status": 1,
  "stdout_path": "/home/chubes/Developer/.tmp/homeboy-wp-codebox-artifacts-YlfpYa/wp-codebox-command-stdout.txt"
}

The command now returns structured WP Codebox failure JSON. The current failure is:

Requested provider "codex" is not registered in wp-ai-client after sandbox provider plugins were loaded.

Runtime phase evidence shows the Codex provider plugin was mounted as a normal plugin:

{
  "slug": "ai-provider-for-openai-codex-oauth-provider",
  "pluginFile": "ai-provider-for-openai-codex-oauth-provider/plugin.php",
  "target": "/wordpress/wp-content/plugins/ai-provider-for-openai-codex-oauth-provider",
  "loadAs": "plugin"
}

The task input requested:

{
  "provider": "codex",
  "runtime_overlay_profiles": ["codex-subscription"]
}

Expected

When runtime_overlay_profiles includes codex-subscription, WP Codebox should prepare the runtime so the requested codex provider is registered before the agent ability executes, or fail earlier with a profile/configuration diagnostic that explains why the profile cannot make the provider available.

Likely areas to inspect:

  • Provider plugins created by runtimeOverlayProfileDefaults() are mapped with activate: false and default plugin loading.
  • The provider preflight now runs after plugin mounting, but a mounted inactive normal plugin may not register with wp-ai-client.
  • The fix should be generic to provider profile setup. Avoid caller/orchestrator-specific logic.

Reproduction

Run the Homeboy Lab/Codebox agent task path for Conductor retry9, or directly replay the generated input with the configured WP Codebox binary and runner env:

/home/chubes/Developer/wp-codebox-merged-main-verify/packages/cli/dist/index.js \
  agent-task-run \
  --input-file=/home/chubes/Developer/.tmp/homeboy-wp-codebox-agent-task-input-3ZCRw1/input.json \
  --json

Artifacts:

/home/chubes/Developer/.tmp/homeboy-wp-codebox-artifacts-YlfpYa/wp-codebox-command-evidence.json
/home/chubes/Developer/.tmp/homeboy-wp-codebox-artifacts-YlfpYa/wp-codebox-command-stdout.txt

Scope

Keep this fix inside WP Codebox's generic runtime profile/provider plugin setup. WP Codebox should not know about Homeboy or Conductor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions