Observe native Claude automations and preserve pending timers
This commit is contained in:
+7
-3
@@ -545,14 +545,18 @@ sessions pipeline runs create. The protocol types are:
|
||||
rather than a stale count.
|
||||
- `chat_automations` reads provider-owned scheduled work for one operator chat.
|
||||
Its body is `chat_query: {session_id}` and the reply is
|
||||
`chat_automations: {session_id, provider, status, active_count?, reason?}`.
|
||||
`chat_automations: {session_id, provider, status, active_count?, observed_at_ms?, reason?}`.
|
||||
`status` is `supported` or `unavailable`; a supported empty result has
|
||||
`active_count: 0`, while an unavailable result omits the count (unknown is
|
||||
never represented as zero). OpenCode uses its documented
|
||||
`GET /api/experimental/schedule?sessionID=...` read and counts only records
|
||||
whose native `sessionID` matches and whose status is `active`. The older
|
||||
OpenCode serve surface, Claude Code (which currently exposes schedule data
|
||||
only through events/hooks), and Codex report their exact readback limitation.
|
||||
OpenCode serve surface and Codex report their exact readback limitation.
|
||||
Claude Code is supported only after its native Stop-hook reports a bounded
|
||||
`session_crons` snapshot; `observed_at_ms` is when that last snapshot arrived,
|
||||
not a live query, and both one-shot and recurring entries count. Before that,
|
||||
or when the host is stale/legacy or metadata is malformed, Claude reports
|
||||
`unavailable` rather than guessing from transcript history or CronCreate.
|
||||
The request is ownership-checked against the operator session registry,
|
||||
bounded and read-only; it never starts or resumes a model turn and does not
|
||||
inspect transcripts or count project/global work.
|
||||
|
||||
Reference in New Issue
Block a user