The Codex Implementer is the write-enabled stage that runs after Codex Analyzer creates analysis_and_plan.md.
It reads the analyzer plan, maps the plan against the repository, applies the necessary code changes with Codex CLI, and writes implementation artifacts back to the issue export directory.
workers.implementer_worker depends on the Implementer protocol from workers.protocols. CodexImplementerService is the default implementation, but another implementer can be injected into the worker through an alternate factory if it implements implement_plan(payload) and returns the same artifact keys.
The orchestrated flow is:
export_jira_issueexports the Jira issue.analyze_issuewritescodex_analysis/analysis_and_plan.md.- The orchestrator receives the successful analyzer worker result.
- If
safety.auto_execute_after_planis enabled, the orchestrator queuesexecute_plan. workers.implementer_workerruns the Codex Implementer.- The implementer applies code changes and writes
codex_implementation/commit_log.md. - The worker reports success to the orchestrator.
- The workflow moves to
execution_completed.
For an issue export at:
exports/SCRUM-123/
the implementer writes:
exports/SCRUM-123/codex_implementation/
implementer_prompt.md
codex_output.md
codex_implementer.log
implementation_result.json
commit_log.md
commit_log.md must include:
# Implementation Commit Log## Summary## Files Changed## Verification## Observations
The implementer does not commit, stage, push, branch, or open pull requests. It only edits files and records what it did.
The default orchestrator config now enables the implementer stage:
safety:
auto_execute_after_plan: true
workers:
execute_plan:
enabled: true
command: .venv/bin/python
args:
- -m
- workers.implementer_workerStart the orchestrator:
.venv/bin/python -m orchestrator startSubmit a Jira-created workflow manually:
.venv/bin/python -m orchestrator submit-jira-created SCRUM-123 --url "https://example.atlassian.net/browse/SCRUM-123"Watch status:
.venv/bin/python -m orchestrator status
.venv/bin/python -m orchestrator workflow SCRUM-123 --historyTo keep implementation manual, set:
safety:
auto_execute_after_plan: falseThen queue or run execute_plan directly only after reviewing the analyzer output.
Run the worker directly against an existing analysis file:
SPRINTER_WORKER_COMMAND_ID=manual-implement \
SPRINTER_WORKER_COMMAND_TYPE=execute_plan \
SPRINTER_WORKER_WORKFLOW_ID=SCRUM-123 \
SPRINTER_WORKER_RESULT_PATH=/tmp/sprinter-implementer-result.json \
.venv/bin/python -m workers.implementer_worker \
--payload '{"analysis_path":"exports/SCRUM-123/codex_analysis/analysis_and_plan.md"}'Or call the service from Python:
from pathlib import Path
from codex_implementer.service import create_codex_implementer_service
service = create_codex_implementer_service(repo_root=Path.cwd())
result = service.implement_plan({
"analysis_path": "exports/SCRUM-123/codex_analysis/analysis_and_plan.md",
})
print(result["commit_log_path"])Default settings live in:
codex_implementer/config.yaml
Useful environment overrides:
SPRINTER_CODEX_IMPLEMENTER_ENABLED=false
SPRINTER_CODEX_IMPLEMENTER_COMMAND=/absolute/path/to/codex
SPRINTER_CODEX_IMPLEMENTER_SANDBOX=workspace-write
SPRINTER_CODEX_IMPLEMENTER_TIMEOUT_SECONDS=1800
SPRINTER_CODEX_IMPLEMENTER_MODEL=<model>
SPRINTER_CODEX_IMPLEMENTER_PROFILE=<profile>
SPRINTER_CODEX_IMPLEMENTER_REPO_ROOT=/path/to/repo
The implementer rejects read-only sandbox mode because it must edit code and write commit_log.md.
Run implementer-only tests:
.venv/bin/python -m unittest tests.test_codex_implementer -v
.venv/bin/python -m unittest tests.test_orchestrator_implementation -vRun the full suite:
.venv/bin/python -m unittest discover -s tests -vFor a live Codex CLI smoke test, create a temporary repo with an analysis_and_plan.md, then run:
.venv/bin/python - <<'PY'
from pathlib import Path
import json
import shutil
import subprocess
from codex_implementer.service import create_codex_implementer_service
root = Path("/tmp/sprinter-implementer-smoke")
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True)
subprocess.run(["git", "init"], cwd=root, check=True)
issue_dir = root / "exports" / "SCRUM-SMOKE"
analysis_dir = issue_dir / "codex_analysis"
analysis_dir.mkdir(parents=True)
(root / "app.txt").write_text("before\n", encoding="utf-8")
(analysis_dir / "analysis_and_plan.md").write_text(
"# Plan\n\nChange app.txt from before to after. Write commit_log.md.\n",
encoding="utf-8",
)
service = create_codex_implementer_service(repo_root=root)
result = service.implement_plan({
"analysis_path": str(analysis_dir / "analysis_and_plan.md"),
})
print(json.dumps(result, indent=2))
PYExpected result:
app.txtchanges according to the plan.exports/SCRUM-SMOKE/codex_implementation/commit_log.mdexists.implementation_result.jsonreportsstatus: success.
When running from a sandboxed desktop session, Codex CLI may need permission to access its session files.