Skip to content

docs: map the wake-ups API, archive cancel, and /loop errors in the pstack adapter - #163

Merged
ibetitsmike merged 9 commits into
mainfrom
mike/pstack-adapter-batch-wakeup-api
Nov 10, 2026
Merged

ibetitsmike merged 9 commits into
mainfrom
mike/pstack-adapter-batch-wakeup-api

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Part of #13 and #8.

Updates docs/fork/pstack-adapter.md for #133 (cancel wake-ups on archive and reject invalid /loop commands) and #134 (manage a chat's wake-ups through the API). The page now says what fork main at 6b1757fb92 does.

  • Wake-ups API (feat: manage a chat's wake-ups through the API #134). The Wake-ups section replaces "No tool, API, or page lists or cancels a wake-up" with the two experiment-gated routes: GET /api/v2/chats/fork/{chat}/wakeups, oldest first with finished ones, and PATCH /api/v2/chats/fork/{chat}/wakeups/{wakeup} with paused, active, or canceled. It covers the permission check, the same-status no-op, the 409 and 400 errors, the paused_by_user and canceled_by_user reasons, and how a resume picks the next run. A paused wake-up now runs again after a resume, and a canceled one leaves the limit of 10. No tool or page changes a wake-up, so the model still sets max_runs or expires_in_seconds, or asks the user to cancel. The /loop and watchers row says the user can pause, resume, or cancel through the API.
  • Archive and /loop (feat(coderd): cancel wake-ups on archive and reject invalid /loop commands #133). With the experiment, archiving a chat cancels the active and paused wake-ups of the whole family, and unarchiving doesn't resume them. Without the experiment, the old stop at the next run still applies. An invalid /loop fails with status 400, Invalid /loop command., and the reason in the detail.
  • Evidence and citations. New entries cite the wake-up routes, the list and change handlers, fork_wakeup_controls.go, the archive cancel in fork_family_lock.go, and the /loop error mapping. The "no wake-up route" and "no resume or removal" entries are gone. Moved ranges in exp_chats.go, fork_wakeups.go, fork_loop_command.go, fork_family_lock.go, and chat_wakeups.sql are re-pinned. The header names 6b1757fb92.

Validation

  • The per-line citation audit reports no moved or changed range on the committed page.
  • markdownlint-cli2 0.16.0 and markdown-table-formatter 1.6.1 on the page: 0 errors, no changes. The added lines have no em dashes, en dashes, spaced double hyphens, or semicolons outside  .
  • UAT on the isolated 3100 server, v2.39.1-devel+4b0b4a0706 with the daily 6 experiments and fork-chat-wakeups: pass for list, pause, same-status no-op, resume, cancel, the 409 after cancel, the 400 for a bad status, both /loop 400s, the archive cancel with reason archived, and the 400 in an archived chat (gate comment).

Xum opened this PR on behalf of @ibetitsmike.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T23:07:48.532250Z f67bab7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

3100 gate for #163: PASS

Server v2.39.1-devel+4b0b4a0706, experiments chat-virtual-desktop, mcp-server-http, fork-chat-todos, fork-nested-subagents, fork-agent-definitions, plugins, and fork-chat-wakeups, read from /api/v2/experiments at 23:03 UTC. Member account, no children, no workspace, two model turns in an ops window.

Wake-ups API (#134). A root chat called schedule_wakeup twice (delay 3600 s, max_runs 1, prompts "w7 gate A" and "w7 gate B"). A second chat made one more ("w7 gate C").

Request Result
GET /api/v2/chats/fork/{chat}/wakeups 200, A then B (oldest first), both active
PATCH C paused 200, paused, status_reason paused_by_user, next_run_at unchanged
PATCH A paused, then paused again 200 both times
PATCH C active 200, active, status_reason null, the same future next_run_at
PATCH C canceled 200, canceled, status_reason canceled_by_user
PATCH A active after its cancel 409 This wake-up has already finished.
PATCH A completed 400 Invalid wake-up status.

/loop errors (#133). A message /loop returned 400 Invalid /loop command. with detail usage: /loop [interval] <prompt>. A message /loop 999d check returned 400 Invalid /loop command. with detail interval must be between 1m0s and 720h0m0s, got 86313600 seconds.

Archive cancel (#133). Archiving the first chat (204) left A canceled with canceled_by_user and changed B from active to canceled with status_reason archived. A PATCH of B afterwards returned 400 Cannot change the wake-ups of an archived chat.

#134 has no UI, so there are no screenshots. Both chats were archived, all three wake-ups ended canceled, and uat3100-smoke stayed stopped.

@ibetitsmike
ibetitsmike merged commit 50e9121 into main Nov 10, 2026
11 checks passed
@ibetitsmike
ibetitsmike deleted the mike/pstack-adapter-batch-wakeup-api branch November 10, 2026 23:50
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) merged this on behalf of @ibetitsmike.

Merge evidence for head f67bab771884120bd016b8824dbd3fa86e963034:

  • Docs only (docs/fork/pstack-adapter.md). fork-ci pull_request run 42920248052 passed on this head against 6b1757fb92; main fork-ci on the squash commit gates the deploy. All checks green.
  • Codex on this exact head: no findings (comment 6781735429). No review threads.
  • Gate on :3100 at 4b0b4a0706 with fork-chat-wakeups on (gate comment 6781736944): the wake-ups list, pause, resume and cancel requests returned what the page says, a finished wake-up returned 409 and an invalid status 400, both /loop errors returned 400 with their usage and range details, and archiving a chat canceled its active wake-ups with reason archived. Cleanup verified by Fork ops.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant