Repository navigation
Closed as not planned
Labels
base-2004-epic-goal-agent-runtimesTarget the resumable goal-agent runtime sub-epic branchenhancementNew feature or requestllm-codex-gpt56-solpropr-planned
Description
Context
Part of #2004 and #2002. Depends on #2007. Codex App Server already provides native thread goal state and automatic continuation; ProPR must use it rather than recreate a planner.
Scope
Run one goal-scoped codex app-server session using generated protocol bindings. Start/resume a thread, set its native goal, stream state/output, and resume the exact thread after failure. Preserve existing codex exec one-shot behavior.
Requirements
- Generate the used App Server bindings from the exact
Dockerfile.agentCodex pin (0.151.0at this issue revision); version-check the running image and required methods, and fail closed on drift. - Start a thread and call
thread/goal/setwith the objective. Usethread/goal/get, native status notifications, andthread/goal/clearas defined by the protocol. - Return the generated thread ID, distinct session ID, active turn identity, and required resume metadata to the Sub-epic: Durable control surface for agent-native goals #2003 SQL controller before recoverability is reported; the adapter owns no separate database.
- Resume the same thread after daemon/container replacement and allow native automatic goal continuation.
- Stream terminal, assistant/tool, native plan/todo, usage, checkpoint, status, and completion events in stable order.
- Deliver FIFO corrections to the same thread and acknowledge after App Server acceptance.
- Pause/resume through native goal status/turn boundaries; cancel separately.
- Apply supported model/reasoning changes at the next native boundary and report requested/effective values.
- Preserve the exact worktree/branch; isolate writable Codex state between goals.
- Pass parallelism/Ultrafix preferences to Codex as goal policy. Codex owns its plan and any subagents.
- Do not implement a ProPR goal planner, node hierarchy, or scheduler.
Acceptance
- Contract tests cover thread start,
thread/goal/set|get|clear, automatic continuation, persisted ID, fresh-container resume, FIFO steering, pause/resume, model acknowledgement, and completion. - Forced-kill tests resume the same thread without a second goal or duplicate accepted input.
- Two goals cannot see/resume each other's thread.
- Existing
codex execissue/review tests remain green. - Pinned-image smoke proves the native goal survives supervisor replacement.
Metadata
Metadata
Assignees
Labels
base-2004-epic-goal-agent-runtimesTarget the resumable goal-agent runtime sub-epic branchenhancementNew feature or requestllm-codex-gpt56-solpropr-planned
Activity
integry commentedon Aug 31, 2026
Planning refinement from the current official Codex App Server contract: https://learn.chatgpt.com/docs/app-server
Treat these as acceptance criteria in addition to the issue body:
The official contract confirms this is a deep product integration, not a replacement with one-shot codex exec. Keep App Server local to the goal container and expose only the authenticated ProPR goal API/realtime surface to remote or Dockerized clients.
integry commentedon Aug 31, 2026
Provider preflight refinement for implementation:
thread/start,thread/resume,thread/goal/{set,get,clear},turn/{start,steer,interrupt}, but no pause RPC and no active-turn resume RPC. Implement pause at the completed discrete-turn boundary under Introduce a thin resumable native-goal session and container contract #2007's capability-awareafter_turnmode; never use terminalturn/interruptas pause or claim same-turn continuation.codex exec --ephemeral --jsonparser or legacy stdin-close executor, and keep that one-shot path unchanged.turn/steeronly with the exact activeexpectedTurnId; durable message acknowledgement follows successful RPC acceptance. Messages arriving without an active turn remain FIFO pending for the next turn.turn/startor supported thread resume, so acknowledgenext_turn; never pretendturn/steerchanged it. Validate goal status/tokens/time fields and keep ProPR's scheduler authoritative for parallelism.CODEX_HOME/session volume. Existing one-shot mounts agent config RW and the entrypoint creates sessions there; goal auth/config must come from a vetted read-only source/bootstrap without sharing writable sessions across goals or chowning the credential mount.codex exectests.integry commentedon Aug 31, 2026
Owner foundation-conformance addendum
GoalSessionAdapterdirectly and export an injectable factory plus literal capability descriptor. The goal-session supervisor and injected container/recovery ports remain authoritative; do not couple this adapter to routes, Redis, queues, or a provider database.goal/session/controllerEpoch/turn/execution/attempt), steering (messageId), model changes (modelChangeId+ monotonic application generation), cancellation (cancellationId), and reconciliation (controllerEpoch/operationToken/execution/attempt). Same-ID retries are effect-idempotent; stale generations cannot resume, emit, acknowledge, or overwrite. Reconcile ambiguous provider success instead of blindly replaying.Codex App Server protocol decisions
Use the pinned Codex
0.146.0schema generated from the installed image and the current official App Server contract.process/*. DeclarenativeSessionId: 'eager',steering: 'active_turn',pause: 'after_turn',modelChange: 'next_turn'. Every replacement connection performsinitializetheninitializedand probes required stable methods/schema beforethread/start.providerSessionIdis exactly returnedthread.id, the resume key; persist returnedthread.sessionIdseparately and never derive/substitute/fork it. Lost pre-persistence thread identity fails closed unless deterministic exact discovery is proven. Use an isolated writable goal-scoped Codex home/session store with minimum read-only auth/config; one goal'sthread/listcannot reveal another's.thread/goal/getbeforethread/goal/set; set the objective once, persist its digest, and update status/budget without replacing the objective/resetting native usage. Reject a different provider goal bound to the same thread.gpt-5.6-sol. Discover model and supported reasoning viamodel/list; absence is typed incompatibility, never permission to choose a default/Terra/other model. Apply requested model/reasoning at nextturn/start;thread/resumeuses last effective model. Recordmodel/reroutedrequested vs effective state.turn/steerwith exactthreadIdandexpectedTurnId. Because App Server has no documentedmessageIdidempotency, keep a goal-scoped acceptance ledger and reconcile thread items after response loss. Pause does not callturn/interrupt: wait forturn/completedand prevent another turn. Cancellation callsturn/interrupt, then waits/reconciles terminalinterruptedidempotently.thread/read(includeTurns)thenthread/resumeto classify the last turn. Any fresh provider continuation remains the same fenced ProPR logical turn with a durable mapping; never duplicate accepted messages/external work.thread/tokenUsage/updated; item completion is authoritative. Persist token watermarks and never use account-wide usage as goal usage.expectedTurnId, interrupt-vs-pause, death during tool/approval, accepted-steer response loss, token replay, reroute, and fresh-container resume.integry commentedon Aug 31, 2026
Provider launch gate addendum — do not start until corrected #2007/#2017 is merged into 2004-epic-goal-agent-runtimes. Use Codex GPT-5.6 Sol only and target #2004. Rebase on the frozen shared supervisor/security/recovery contract; this leaf must not fork or duplicate it.
Codex-specific acceptance:
[-]Run Codex goals through persistent App Server threads[/-][+]Run Codex native goals through persistent App Server threads[/+]integry commentedon Sep 2, 2026
Superseded by #2071 and the simplified task-backed native /goal architecture. The unreleased branch is retained only for reference.