Skip to content

fix: run packaged CLI through Node - #2192

Merged
chubes4 merged 1 commit into
mainfrom
fix/2191-nonexecutable-plugin-cli
Aug 2, 2026
Merged

fix: run packaged CLI through Node#2192
chubes4 merged 1 commit into
mainfrom
fix/2191-nonexecutable-plugin-cli

Conversation

@chubes4

@chubes4 chubes4 commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • invoke the WordPress plugin's bundled CLI JavaScript entrypoint through Codebox's validated Node resolver
  • avoid depending on executable mode surviving WordPress plugin ZIP extraction
  • cover the installed-plugin shape with a deliberately non-executable bundled wrapper

Root cause

WP_Codebox_Agent_Sandbox_Runner::command_prefix() already resolved Node for the bundled wrapper, but discarded that result and executed the wrapper path directly. WordPress Studio extracted the packaged wrapper with mode 0644, causing every public agent task to exit 126 before sandbox creation.

Standalone CLI behavior and explicitly configured JavaScript paths are unchanged.

Verification

  • php scripts/php-agent-runtime-execution-smoke.php
  • npm run test:release-package-coverage
  • PHP syntax checks
  • git diff --check

AI assistance

OpenCode using openai/gpt-5.6-sol reproduced the public Codebox task failure, traced the command construction and package extraction boundary, implemented the repair and regression fixture, and ran verification. Chris Huber reviewed and owns the submitted changes.

Closes #2191.

@chubes4
chubes4 merged commit 0cdf93d into main Aug 2, 2026
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.

WordPress plugin agent tasks fail when bundled CLI wrapper is not executable

1 participant