Install
openclaw skills install acpx-codex-playbookPractical playbook for running Codex through acpx in persistent sessions, especially when the task needs reliable file creation, local dependency installs, s...
openclaw skills install acpx-codex-playbookUse acpx as a structured control plane for Codex. Prefer persistent sessions, prompt files, and shell-based file generation over fragile one-shot prompts and tool-native file writes.
Run this default flow for any non-trivial task:
acpx codex sessions new --name task
acpx codex set-mode -s task full-access
acpx codex -s task -f prompt.txt
Prefer this over acpx codex exec ... when the task needs iteration, file output, validation, or retries.
Use exec only for small one-shot tasks.
Use a persistent session when the task involves any of the following:
.pptx, .docx, reports, videos, or scriptsFor practical work, set mode before prompting:
acpx codex set-mode -s task full-access
Interpretation:
read-only: inspect onlyauto: moderate default behaviorfull-access: broader session capability, including easier file edits and broader path/network freedomDo not assume full-access means sudo or root. It relaxes the ACP session; it does not guarantee system-level privilege escalation.
For long or delicate instructions, always write a prompt file and pass -f:
cat > prompt.txt <<'TXT'
Task: ...
Constraints: ...
Outputs: ...
Validation: ...
TXT
acpx codex -s task -f prompt.txt
This avoids shell quoting failures and makes retries reproducible.
If the task must create or rewrite files, instruct Codex to prefer:
python - <<'PY' ... PYPrefer these over tool-native fs/write_text_file style edits when prior attempts showed permission failures.
Recommended instruction snippet:
If built-in file-editing tools fail, write files via shell heredoc or Python scripts instead of ACP fs write calls.
For fragile generation tasks, write outputs under /tmp first, validate them, then move/copy them into the target workspace.
Recommended pattern:
/tmp/...This is especially useful for generated binaries like .pptx.
Always ask Codex to verify outputs.
Examples:
.pptxFor PPT/report/document generation, require all of the following in the prompt:
See references/ppt-playbook.md for a concrete template.
If non-stdlib packages are needed, prefer project-local installs:
python3 -m venv .venv
. .venv/bin/activate
pip install <package>
Avoid assuming global install rights. Use system-level installs only when explicitly intended and actually permitted by the host.
If touch or shell writes work but ACP file edits fail, treat it as an ACP handler or sandbox-path issue, not proof that Codex itself lacks capability. Switch the generation strategy to shell/Python writes.
exec is acceptable.-f prompt.txt..venv install before changing system state./tmp, validate, then move.Avoid these common failure modes:
full-access equals sudo/rootreferences/ppt-playbook.md when the task is to generate a PPT or similar structured binary deliverable via acpx/Codex.references/troubleshooting.md when acpx sessions start but file creation, mode behavior, or sandbox boundaries are unclear.