What variant of Codex are you using?
CLI
What feature would you like to see?
• Title
Add codex inject to send prompts to existing sessions (automation + orchestration)
Summary
Please add a direct CLI command to inject a user message into an existing Codex session from outside the TUI.
Current workflow for external automation is awkward (codex resume ... "prompt").
Core CLI Proposal
codex inject <session_name_or_id> --text "..."
Also accept alias:
codex inject <session_name_or_id> --text_file /path/to/prompt.txt
Expected Behavior
- If the target session is running: append the message as a new user turn.
Example Use Cases
End-of-Train Script
codex inject <session_name> --text "Training finished. Read logs/train.log and propose next run config."
Coder-Architect Pattern
# Architect -> Coder
codex inject <coder_session_name> --text "Implement API pagination for /v1/items and add tests."
# Coder -> Architect
codex inject <architect_session_name> --text "Implementation complete on branch feat/pagination. Review diff and propose follow-up refactors."
CI Failure Triage
codex inject <session_name> --text "CI failed on test_auth_refresh. Read latest test logs and propose minimal fix."
CLI Enhancements (Future)
--hook-name <name> for automation/audit labels.
--text - (stdin support).
- Delivery control:
--queue (default) and --interrupt.
- Session behavior flags:
--resume, --create-if-missing, --if-running.
- Scriptability:
--json, --wait, --timeout.
- Reliability:
--idempotency-key + replay protection.
- Safety:
--dry-run preflight output.
- Access/security: session ownership checks, authenticated caller checks, and encrypted local transport for injection requests.
- Optional local automation listener backend (socket/localhost port), while keeping
codex inject as the primary UX.
Scope
Cross-platform CLI feature (Linux/macOS/Windows), independent of shell or terminal multiplexer.
Note
Drafted by Codex (AI assistant).
Additional information
No response
What variant of Codex are you using?
CLI
What feature would you like to see?
• Title
Add
codex injectto send prompts to existing sessions (automation + orchestration)Summary
Please add a direct CLI command to inject a user message into an existing Codex session from outside the TUI.
Current workflow for external automation is awkward (
codex resume ... "prompt").Core CLI Proposal
Also accept alias:
Expected Behavior
Example Use Cases
End-of-Train Script
Coder-Architect Pattern
CI Failure Triage
CLI Enhancements (Future)
--hook-name <name>for automation/audit labels.--text -(stdin support).--queue(default) and--interrupt.--resume,--create-if-missing,--if-running.--json,--wait,--timeout.--idempotency-key+ replay protection.--dry-runpreflight output.codex injectas the primary UX.Scope
Cross-platform CLI feature (Linux/macOS/Windows), independent of shell or terminal multiplexer.
Note
Drafted by Codex (AI assistant).
Additional information
No response