Skip to content

docs: map notify_user, the daily wake-up limits, and the archive workspace stop in the pstack adapter - #154

Merged
ibetitsmike merged 11 commits into
mainfrom
mike/pstack-adapter-batch-notify-archive
Nov 10, 2026
Merged

ibetitsmike merged 11 commits into
mainfrom
mike/pstack-adapter-batch-notify-archive

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 #115 (notify_user and the daily wake-up limits) and #147 (a root archive stops the workspaces of workspace subagents), and re-pins citations that #115, #136, and #147 moved. The page now says what fork main at bef9c59966 does.

  • Notifications (feat(coderd/x/chatd): cap chat wake-ups per day and add notify_user #115). A new Notifications section says that, with fork-chat-wakeups, notify_user sends the chat owner a Coder notification. It covers:
    • the inbox when the deployment keeps it on, and the deployment's email or webhook delivery;
    • message (up to 2000 bytes) and title (up to 120 bytes, defaults to the chat title cut to 120 bytes when omitted or blank), and the {"sent":true} result;
    • the limit of 10 per chat per hour, which the chat's wake-up pause notifications count toward but don't obey, and the errors for the limit, an empty message, and a chat that a system user owns;
    • that the result is also {"sent":true} when Coder drops the notification because the owner turned off the Custom Notification template, the same title and message went out in the same clock minute, or the deployment has no delivery method.
    • that a custom agent tool policy can remove the wake-up tools from a custom child.
      The SendToUser row and the bootstrap snippet now say to also call notify_user when the chat has it. The row's Removed by is W5, like the /loop row.
  • Daily wake-up limits (feat(coderd/x/chatd): cap chat wake-ups per day and add notify_user #115). The Wake-ups section now lists the four limits over the 24 hours before a run (288 runs per chat, an average and not a fixed pace, 2880 per organization, $20 of spend per chat, $200 across the organization's chats that have a wake-up), that the spend counts every message, that the check uses the cost recorded so far and can be passed by the run it admits or by concurrent replicas, and that reaching one pauses the wake-up. It also names the other pauses (hook denial, invalid cron, invalid events), that a paused wake-up never runs again and still counts toward the limit of 10, and the Chat wake-up paused notification, at most once per chat and reason each UTC day unless the chat is renamed, which a turned-off Custom Notification template suppresses.
  • Archive stops workspace subagents (feat(coderd/x/chatd): stop the workspaces of workspace subagents when their family is archived #147). Workspace isolation no longer says that an archive leaves the child's workspace running. Before the archive, the workspace can still stop on its own TTL or autostop. After a root archive, manual or automatic, Coder Agents stops each child's workspace in the background, after it tries to remove the family's worktrees, even when it keeps one. It doesn't retry a failed stop, skips a child bound to another workspace, and never deletes the workspace.
  • fix(coderd/x/chatd): keep secret answers out of shell code, media and fragments #136. No prose. The secret question option is still never set outside tests.
  • Evidence. New entries cite fork_notify_user.go, fork_wakeup_caps.go, the pause and notification paths in fork_wakeups.go and fork_wait_for_events.go, the new queries in chat_wakeups.sql, codersdk/notifications.go, coderd/notifications/enqueuer.go, the notification dedupe migration, the custom agent tool policy, and the workspace stop in fork_isolation_cleanup.go. The header names bef9c59966.
  • Stale citations. A per-line audit found ranges that feat(coderd/x/chatd): cap chat wake-ups per day and add notify_user #115, fix(coderd/x/chatd): keep secret answers out of shell code, media and fragments #136, and feat(coderd/x/chatd): stop the workspaces of workspace subagents when their family is archived #147 moved in fork_wakeups.go, fork_wait_for_events.go, fork_subagents.go, fork_descendant_questions.go, fork_tools.go, fork_chat_questions.go, and fork_isolation_cleanup.go. They are updated, and the changed ones were re-read and re-cited.

Validation

  • The per-line citation audit reports no moved or changed range on the committed page, except for the new evidence lines, which the audit measures from an older header. Those were written against d1bb658aa3, and no file they cite changed between d1bb658aa3 and bef9c59966.
  • 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+bef9c59966 with the 8 experiments: pass for the default, explicit, and blank notify_user titles, the empty-message error, the inbox delivery, and the workspace stop when the root chat is archived (gate comment).
  • Docs only. No code change.

Xum opened this PR on behalf of @ibetitsmike.

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@codex review

@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-10T20:23:58.880084Z 6f280e4 Manual request
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ff42c3c5b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17057d26ba

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/fork/pstack-adapter.md Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7da94a909e

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3574e3ce13

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 6f280e44c9

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

UAT gate on the isolated 3100 server, v2.39.1-devel+bef9c59966, with chat-virtual-desktop, mcp-server-http, fork-chat-todos, fork-nested-subagents, fork-agent-definitions, plugins, fork-chat-wakeups, and fork-subagent-isolation on (from /api/v2/experiments). Docs head 6f280e44c9. Member user, one root chat titled w7-g154-root.

Doc claim Result
notify_user without title uses the chat title Pass: {"sent":true}, inbox entry titled w7-g154-root with w7-g154 default title
Explicit title is used Pass: {"sent":true}, inbox entry titled w7-g154 explicit
A blank title falls back to the chat title Pass: title " " gave {"sent":true}, inbox entry titled w7-g154-root
Empty message fails with message is required Pass: {"error":"message is required"}
Notifications reach the Coder inbox Pass: inbox went from 0 to the 3 entries above
Archiving the root stops a workspace child's workspace without deleting it Pass: spawn_agent with isolation: "workspace" built uat3100-docker-81cb (start/succeeded). Archive returned 204 at 20:31:01Z, and the workspace reached stop/succeeded 10 s later. It still existed until I deleted it. Both chats ended archived.

Cleanup: deleted uat3100-docker-81cb (its volume is gone), stopped uat3100-smoke, and archived both test chats. The member has 13 unarchived chats and 0 running, the same as before, and 3100 has 1 workspace.

@ibetitsmike
ibetitsmike merged commit 5654571 into main Nov 10, 2026
11 checks passed
@ibetitsmike
ibetitsmike deleted the mike/pstack-adapter-batch-notify-archive branch November 10, 2026 20:40
@ibetitsmike

Copy link
Copy Markdown
Owner Author

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

Merge evidence for head 6f280e44c9681fe37fc43728111d8e605ea4ca6a:

  • Docs only (docs/fork/pstack-adapter.md). fork-ci pull_request run 42894389361 passed on this head; it merged cleanly onto main after feat(site/src/pages/AgentsPage/components/ChatElements/tools): show subagent isolation on the spawn and wait cards #152, and main fork-ci on the squash commit gates the deploy. All checks green.
  • Codex on this exact head: no major issues (comment 6778361222). 0 of 13 review threads unresolved; the 13 P2s from earlier rounds were fixed.
  • Gate on :3100 at bef9c59966 with fork-chat-wakeups and fork-subagent-isolation on (gate comment 6778538655): notify_user default, explicit and blank titles, the empty-message error, inbox delivery, and archiving the root stopping the child's workspace without deleting it all matched the rows. 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