Skip to content

feat(agent): add Codex print mode - #148

Open
codeaholicguy wants to merge 6 commits into
mainfrom
feature-codex-print-mode
Open

feat(agent): add Codex print mode#148
codeaholicguy wants to merge 6 commits into
mainfrom
feature-codex-print-mode

Conversation

@codeaholicguy

@codeaholicguy codeaholicguy commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • generalize print agents into a Claude/Codex discriminated union with atomic provider-session binding and legacy store migration
  • add Codex CLI capability probing, JSONL runner, print-agent service, classified errors, and bounded parsing
  • wire agent start/send/list/detail for --type codex --mode print without changing interactive Codex or Claude print behavior
  • add a fake Codex fixture, unit/integration/CLI coverage, and all five AI lifecycle documents

Session identity

Codex agents are created with no provider thread ID. The first successful thread.started event is atomically bound before later output is accepted; subsequent sends resume that exact UUID. Conflicting or malformed identity is rejected.

Verification

  • npx ai-devkit@latest lint --feature codex-print-mode
  • npm run lint
  • npm run build
  • npm test
  • agent-manager coverage: 28 files / 527 tests; new Codex pure logic has 100% line and function coverage, with the probe at 100% across all metrics
  • CLI suite: 79 files / 932 tests

Deferred

  • Pi print mode
  • additional capacity/concurrency policy beyond the existing print-agent model

@codeaholicguy
codeaholicguy force-pushed the feature-codex-print-mode branch from c0887ce to 0f4add7 Compare August 17, 2026 03:30
@codeaholicguy

Copy link
Copy Markdown
Owner Author

Rebased onto origin/main at a643f4a and force-pushed with lease (HEAD 0f4add7). Resolved the single agent list conflict by preserving main's Type/Mode columns and durable mode while retaining the provider-specific (print) distinction.

Fresh local validation:

  • agent-manager tests: 28 files, 555 tests passed
  • CLI tests: 82 files, 986 tests passed
  • agent-manager lint: exit 0
  • CLI lint: exit 0 (5 pre-existing warnings, 0 errors)
  • agent-manager build: exit 0
  • CLI build: exit 0

GitHub CI is green: Test (Node 20) plus all six E2E Node 20/22/24 Ubuntu/macOS jobs passed. Final PR state: MERGEABLE / CLEAN.

@codeaholicguy

Copy link
Copy Markdown
Owner Author

Rebased/adapted PR #148 onto origin/main at 95674c9 and force-pushed with lease (HEAD 497483e).

Architecture adaptation:

  • retained upstream DurableAgent/DurableAgentRepository and SQLite durable_agents migration 003
  • dropped obsolete JSON store/generalization and legacy-import code
  • moved Codex probe/runner/service/tests under durable paths
  • added claude|codex provider discrimination, nullable Codex session binding with token-owned CAS
  • CLI accepts --type codex --mode print and persists/renders canonical durable mode

Fresh local validation:

  • npm ci: exit 0
  • lifecycle lint base + feature: exit 0
  • workspace lint: exit 0 (6 existing warnings, 0 errors)
  • workspace typecheck: exit 0
  • workspace tests: agent-manager 31 files / 576 tests, CLI 84 files / 1021 tests, and all six projects green
  • workspace build: all six projects green

GitHub CI: Node 20 test plus all six E2E Node 20/22/24 Ubuntu/macOS jobs passed.
Final PR state: MERGEABLE / CLEAN.

@codeaholicguy
codeaholicguy force-pushed the feature-codex-print-mode branch from 497483e to 0e207a9 Compare August 20, 2026 04:29
@codeaholicguy

Copy link
Copy Markdown
Owner Author

Rebased onto main through #190 (dabf19f) and force-pushed with lease at 0e207a9. Conflict resolution keeps the new public --mode durable vocabulary while allowing --type codex in durable mode; Codex CLI tests and lifecycle docs were updated accordingly.

Fresh validation: npm ci, workspace build, base/feature lifecycle lint, workspace lint (0 errors), all configured typechecks, and all six project test suites passed (CLI: 84 files / 1,022 tests; agent-manager: 31 files / 576 tests). All seven GitHub checks are green. Final state: MERGEABLE / CLEAN.

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.

1 participant