Skip to content

[P2] Add a Codex adapter behind the secure worker contract #36

Closed

Description

@anthonyandrei

Problem

The current workflow is AGY-specific. Codex workers need a separate adapter that follows the same security, verification, lifecycle, and recording rules.

Deliverable

Implement a Codex adapter using the contract from #31. Use live capability and model discovery where the host supports it. Keep native Codex worker calls inside the adapter.

The adapter must honor the orchestrator's static assignment constraints. Native workers may provide concurrency, but they do not replace the workflow's ownership, verification, or cleanup controls.

Acceptance criteria

  • The adapter launches one bounded Codex worker assignment and returns the normalized result.
  • It reports supported tools, structured output, model availability, effort levels, process identity, and artifacts.
  • It accepts internal preferences such as fast, balanced, and deep without publishing hardcoded model IDs.
  • It cannot create a child assignment or widen the orchestrator's security constraints.
  • It registers every process, worktree, and artifact with the resource ledger.
  • It supports cancellation, timeout, retry, quota handoff, and resume through the shared lifecycle.
  • Execution scope checks and final gates run before any result reaches the caller.
  • Unsupported host capabilities fail closed with a recorded reason.
  • Fake Codex responses cover success, malformed output, cancellation, and scope failure.
  • Documentation states which Codex features are tested and which remain unavailable.

Dependencies

Out of scope

  • Changing Codex itself.
  • Claiming feature parity with AGY.
  • Adding Codex requirements to grill-with-docs.

Verification

Use fake workers and disposable repositories. Do not require live model quota in the test suite.

Activity

  1. anthonyandrei commented on Sep 4, 2026

    @anthonyandrei
    OwnerAuthor

    Resolved by PR #39 (#39). The merged implementation covers this issue, and the targeted acceptance tests pass. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions