Goal: provide a minimal, practical Codex SDK starter pattern without forcing repo dependencies unless explicitly requested.
Workflow:
Clarify the use case
- CI triage, PR generation, internal bot, batch refactors, etc.
Provide the minimal TS usage pattern
- Install:
npm install @openai/codex-sdk - Start/resume a thread and call
run()multiple times. - Persist
threadIdfor continuity.
- Install:
Recommend safe operational boundaries
- Limit scope to a repo/workspace.
- Require tests/typecheck before finalizing.
- Avoid destructive operations without explicit approval.
Optional: propose an internal wrapper
- A small module that standardizes thread creation, logging, timeouts, and artifact capture.