You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f9dbc8c
Browse filesBrowse the repository at this point in the historyBrowse files
the prompt and interaction handlers open until the goal stops and its last native turn
38
+
drains, or the turn fails/is cancelled. Never issue another `turn/start` after a routed
39
+
`/goal` turn; Codex owns continuation. Cancellation also pauses the goal before returning.
40
+
- A persistent active goal does not create a prompt or live presence by itself. Goal metadata
41
+
remains a separate Core snapshot; do not add a private execution lifecycle protocol.
36
42
- Codex app-server usage: see https://github.com/openai/codex/blob/main/codex-rs/app-server/README.md when touching protocol/transport details, adding or consuming JSON-RPC methods, handling approvals/turn events, or updating generated schema/clients.
37
43
- App-server events: prefer `thread/*`, `turn/*`, and `item/*` event surfaces; avoid the deprecated `codex/event/*` API (planned removal). Keep implementations aligned with generated types in `src/app-server` (including `v2` exports).
38
44
- Steer uses app-server `turn/steer` on the tracked active turn. Correlate `clientUserMessageId` and acknowledge only the matching `item/completed(userMessage)`; never emulate steer with a second `turn/start`.
Copy file name to clipboardExpand all lines: docs/goal-extension.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,14 +41,16 @@ Common statuses are `active`, `paused`, `blocked`, `limited`, and `complete`. Op
41
41
42
42
## Lifecycle architecture
43
43
44
-
A goal belongs to the ACP session, not to an individual `session/prompt` request. Goal activity and prompt activity are independent:
44
+
A goal belongs to the ACP session. Its durable state is separate from the ACP v1 prompt lifecycle:
45
45
46
46
-`status: active` means the persistent objective can drive more work; it does not mean an ACP prompt is currently executing.
47
-
- A prompt completes when its current backend turn reaches a quiescent boundary, even when the goal remains active.
48
-
- A later autonomous cycle may publish more session updates outside that completed prompt.
49
-
- While a turn is running, clients use steering or prompt queueing when advertised. While the session is quiescent, clients may send an ordinary `session/prompt`.
47
+
- Once a prompt is executing an active goal, it remains open across native Codex turn completions and automatic continuations. Codex schedules those continuations; the adapter does not submit duplicate turns.
48
+
- The prompt returns only after the goal becomes complete, paused, blocked, limited, or cleared and the final native turn has drained. A failed or interrupted turn also ends the prompt. Goal completion before the last text chunk does not truncate that output.
49
+
-`/goal set` (an objective) and `/goal resume` follow the same lifecycle. An explicit continuation prompt is needed only when the goal control operation started no native turn at all.
50
+
- Cancellation pauses the goal before returning, including when cancelled between native turns. Connection loss fails the pending prompt.
51
+
- While a prompt is open, clients use steering or prompt queueing when advertised. A stored active goal outside a prompt does not establish live presence.
50
52
51
-
This separation prevents a persistent goal from monopolizing the session's prompt slot and lets clients model “working now” independently from “objective remains active.”
53
+
This uses the standard ACP v1 request/response completion boundary: one prompt may contain multiple model exchanges. It requires no Core execution extension. A v2 implementation should use standard `state_update` notifications instead of treating prompt acceptance as completion.
0 commit comments