Repository navigation
Closed as not planned
Closed as not planned
Copy link
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. Claude Code itself owns planning and continuation through native /goal; ProPR hosts one resumable session.
Official behavior: /goal works non-interactively and active goals restore on every resume route. The Dockerfile.agent pin is Claude Code 2.1.220 at this issue revision and exposes streaming input/output, explicit session IDs, and resume.
Scope
Add a thin Claude transport using the existing unified agent container. Preserve current one-shot Claude behavior and do not introduce a Claude-specific database or supervisor.
Runtime contract
- Allocate and persist the goal's UUID/session intent in the Sub-epic: Durable control surface for agent-native goals #2003 SQL controller before starting the external process.
- Start the pinned CLI with native goal input, semantically:
claude --print "/goal <objective>" --session-id <uuid> --input-format stream-json --output-format stream-json --verbose --replay-user-messages --permission-mode auto.
Use argument arrays/stdin; never interpolate the objective into a shell command. - Keep normal ProPR credential/config mounts and worktree/container isolation. Do not use
--no-session-persistence. - Parse the closed Claude stream into bounded terminal, assistant/tool, native task/plan when available, usage, checkpoint/status, and completion events for the shared durable sink.
- Deliver one SQL-claimed FIFO correction through stream-json stdin and acknowledge only after Claude's replay/acceptance event.
- On daemon/process/container loss, reconnect the exact session with
--resume <uuid>and the restored provider-state mount/worktree. Native/goalrestoration is authoritative; never replay the original objective as a second goal. - Pause by quiescing/terminating at the documented recoverable boundary and leaving the active goal/session durable; resume the same session. Cancel uses native goal clear/cancel semantics and remains distinct from pause.
- Apply supported model/reasoning changes on a documented resume/turn boundary and report requested/effective values. Unsupported live changes must be capability-gated.
- Fail closed if the running CLI version/capabilities differ from the pinned image or
/goalis unavailable because hooks/workspace policy disables it. - Bound retention and redact credentials/sensitive values.
Acceptance
- A pinned-image smoke proves
/goalappears in the initialization capabilities and a streamed invocation yields a session ID before work. - Contract tests cover native start, FIFO stream input acknowledgement, active-goal resume after SIGTERM and fresh-container replacement, pause/resume, model/reasoning boundary, cancel/clear, and completion.
- Forced kills before and after first output deterministically reconnect the same controller-chosen session UUID without a second goal.
- Concurrent goals have isolated writable Claude state and cannot resume each other's sessions.
- Existing Claude one-shot, abort, reasoning, credential, and Docker tests remain green.
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
Provider preflight refinement for implementation:
-p - --no-session-persistence --output-format stream-json, and tests assert that. A goal-specific builder/entrypoint must omit only the goal path's no-persistence flag and use provider-supported--resume <session>discrete invocations./home/node/workspace, while Introduce a thin resumable native-goal session and container contract #2007's generic supervisor currently mounts/workspace. Align a goal-specific workspace contract/entrypoint and test real editing/resume; do not start outside the mounted worktree..claudeand optional.claude.jsonRW, chowns them, and creates mutable dirs. Define a Claude-specific read-only credential/config source plus per-goal writable session home; no chown/write to RO credentials, no cross-goal transcript/session data, and no secrets in argv/events/recovery metadata.-pinvocation, pause dispatch, then invoke the same session on resume. Do not keep stdin open or map kill/SIGSTOP to checkpoint. Only advertise active-turn behavior if the pinned CLI proves it.session_id(notconversation_id) before recoverability. Define deterministic pre-ID and post-ID kill handling. Use an incremental bounded stream-JSON parser with stable message/tool IDs, per-attempt deduplication, and a policy preventing cumulative usage double counts.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.Claude session protocol decisions
2.1.220, probe explicit--session-idand exact--resume; declarenativeSessionId: 'eager',steering: 'next_turn',pause: 'after_turn',modelChange: 'next_turn'.--session-id <uuid>and always resume with--resume <same uuid>. Never use bare--continue; if explicit ID is unsupported, fail compatibility. Omit--no-session-persistence..claude/.claude.jsonmounts.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.
Claude-specific acceptance:
[-]Resume, pause, steer, and switch models in Claude goal sessions[/-][+]Run resumable Claude native goals with steering and model changes[/+]integry commentedon Sep 2, 2026
Superseded by #2071 and the simplified task-backed native /goal architecture. The unreleased branch is retained only for reference.