GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add Run now for schedule chat automations by ThomasK33 · Pull Request #30166 · coder/coder

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Sep 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Closes CODAGT-1211. Part of CODAGT-1135.

Stack: PR 7b of "Automations for Coder Agents", on top of 7a (#30160, the schedule scanner), which sits on 1210 5b (#30134).

Adds Run now for schedule automations: POST /api/experimental/organizations/{organization}/chat-automations/{automation}/runs publishes the saved prompt at once through the existing Publish path, with no occurrence. It never writes the automation row, so the schedule cursor and revision stay unchanged.

  • Owner-only. chatd.RunAutomation(ctx, actorID, id) compares the caller with the automation owner before anything else, so org admins and site owners get 403 even though dbauthz lets them read and write the row (CODAGT-1226). A user who cannot read the automation gets 404, and the route sits behind the experiment gate, so a caller with chat-automations off gets 404. Publish also checks the owner's experiment again.
  • Statuses. 202 with input_id and chat_id; 400 for a non-schedule automation; 409 for a disabled schedule, a busy chat with When busy skip, or an unavailable target or model; 429 when the chat queue or the automations' share of it is full; hook denials use the same response as chat messages.
  • new_chat. A Run now of a new_chat schedule creates a chat titled with the run time in the schedule's time zone and records the same audit entry as webhook-created chats.

Tests

coderd/exp_chat_automation_runs_test.go runs against a real coderdtest server: the owner's run saves one message with the returned input id and leaves the whole automation row byte-equal; org admin and site owner get 403 (also on a webhook automation, proving the owner check comes first) and a non-reader gets 404, with nothing saved; webhook 400, disabled 409, busy skip 409, queue share 429; new_chat title, owner, and audit entry. The experiment gate test covers the new route.

Dogfood UAT ran on a real dev instance through Coder Agents and passed: immediate publish with the cursor and revision unchanged, 409/429 refusals, 403 for an org admin and the site owner, 404 with the experiment off, and a one-minute schedule that kept one message per minute around a Run now.

Size

About 325 hand-written lines (about 190 of them tests). Generated: coderd/apidoc/docs.go, coderd/apidoc/swagger.json, docs/reference/api/schemas.md, site/src/api/typesGenerated.ts (213 lines).

ARCHITECTURE.md prose was drafted by an agent at the user's request; the user will review it.

Also replaces the CODAGT-1209 ARCHITECTURE.md TODO from #30117; the prose was drafted by an agent at the user's request, and the user will review it.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
ThomasK33 added 3 commits September 30, 2026 02:51
@ThomasK33
feat: add Run now for schedule chat automations
64ea22b
POST /api/experimental/organizations/{organization}/chat-automations/{automation}/runs
publishes the saved prompt of an enabled schedule automation immediately,
through the same Publish path as a scheduled occurrence but without one,
so the schedule cursor and revision stay unchanged and the automation
row is not written.

Only the owner can run an automation; organization admins and site
owners get 403. Webhook automations get 400 and disabled ones 409.
Admission refusals reuse the webhook responses (409 busy with skip or
target/model unavailable, 429 queue or automation share full). Chats a
new_chat automation creates are titled with the run time in the
schedule's time zone and audited like webhook-created chats.

Adds ChatAutomationRunResponse and ExperimentalClient.RunChatAutomation.
@ThomasK33
chore(coderd): tighten Run now error docs
158bea8
Name the concrete status codes in the Run now error mapper comment, and
document in ARCHITECTURE.md that a target chat with no usable model and
no default model gets 400, as a person's message does.
@ThomasK33
fix(coderd): name runs, not events, in the busy Run now response
6417deb
Run now reused the webhook detail "The automation skips events while
the chat is busy." A busy chat with skip now gets a run-specific detail.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33 ThomasK33 changed the title feat(coderd): add Run now for schedule chat automations feat: add Run now for schedule chat automations Sep 30, 2026
@linear-code

linear-code Bot commented Sep 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

CODAGT-1135

CODAGT-1211

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned ThomasK33 Sep 30, 2026
@ThomasK33
ThomasK33 added this pull request to stack #30097 September 30, 2026 04:18
@ThomasK33 ThomasK33 mentioned this pull request Sep 30, 2026
feat(coderd): run chat automation schedules #30160
Merged
@ThomasK33

ThomasK33 commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T06:33:49.558316Z 25b8907 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 6417debe10

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33 ThomasK33 mentioned this pull request Sep 30, 2026
feat: label automation messages in agent chats #30167
Merged
@ThomasK33
docs(coderd/x/chatd): describe queued-row cleanup on automation disab…
25b8907
…le and delete

Replaces the CODAGT-1209 TODO in ARCHITECTURE.md with prose: disable
bumps the queue generation in an automation-only transaction and then
deletes older queued rows through DeleteQueuedMessage as chatd; delete
removes the automation row first and then its queued rows; the queue
promotion guard discards any row the cleanup leaves behind.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 25b89076c1

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33 ThomasK33 mentioned this pull request Sep 30, 2026
feat: add the Agents automations list page and chat-list automation filter #30171
Merged
@ThomasK33

ThomasK33 commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

CI evidence for the exact head 25b8907: ci workflow_dispatch run https://github.com/coder/coder/actions/runs/36684161189 passed on the first attempt, including required.

Why workflow_dispatch: GitHub creates no pull_request runs for this pushed stacked PR, and its mergeable state stays UNKNOWN.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
Merge tk/codagt-1211-automations-schedules (main d9c13dc) into tk/cod…
5450ee2
…agt-1211b-automations-run-now

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

sync with main d9c13dc: no content conflicts; make gen produced no diff

  • Head: 5450ee2b1478651a6f1c34bb4d1e55507903301c
  • CI run (workflow_dispatch): https://github.com/coder/coder/actions/runs/36829360093

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
ThomasK33 marked this pull request as ready for review October 1, 2026 09:38
ibetitsmike
ibetitsmike reviewed Oct 1, 2026
View reviewed changes

@ibetitsmike ibetitsmike left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Xum (an AI coding agent) prepared and posted this review on behalf of Mike. Each finding came from automated review passes and was re-verified against the code; please push back on anything that looks wrong.

Run now is small and matches CODAGT-1211: RunAutomation checks the owner before anything else, refuses webhook and disabled automations, and publishes through the shared admission path without an occurrence, so the schedule cursor and revision are never written. After re-verifying the reviewer findings against the code, none was worth asking you to fix.

Verdict: no blocking issues

Severity: P0 0, P1 0, P2 0, P3 0

Review coverage
  • code-review Standards: 2 findings raised, 0 kept (the ARCHITECTURE.md prose is the author's to own per AGENTS.md; the duplicate response type follows the codersdk pattern of one response type per endpoint, and the frontend already uses it later in the stack)
  • code-review Spec: 0 findings; status mapping, owner-only check, and new_chat audit match CODAGT-1211, CODAGT-1226, and the PRD
  • frontend-review plus coder-frontend-review (generated typesGenerated.ts only): FE2 PASS, FE1 and FE3 to FE10 N/A, generated type naming and consistency PASS

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ThomasK33
Merge tk/codagt-1211-automations-schedules (main 35abc22) into tk/cod…
e9dcb97
…agt-1211b-automations-run-now

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

sync with main 35abc22: no content conflicts; make gen produced no diff

  • Head: e9dcb97966462aca7be055e6c721b623d37da512
  • CI run (pull_request): https://github.com/coder/coder/actions/runs/36853957583

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
Merge tk/codagt-1211-automations-schedules (main d11809f) into tk/cod…
1d1cf1e
…agt-1211b-automations-run-now

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

sync with main d11809f: merged #30160

  • Head: 1d1cf1e9fb751a73977bb59e8778f1e7db88e60d
  • CI run (workflow_dispatch): https://github.com/coder/coder/actions/runs/36891352488

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ibetitsmike
ibetitsmike reviewed Oct 1, 2026
View reviewed changes

@ibetitsmike ibetitsmike left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Xum re-reviewed this PR on behalf of @ibetitsmike using GPT-6.1 Sol (high) Exec subagents.

The inherited audit lifetime/request-ID and scanner-plumbing fixes are intact; #30166 has no outstanding prior issue or unanswered thread. New findings: Standards 0, Spec 0, Frontend 0. Final fresh-head logs show Run now, experiment-gate, webhook and selected lifecycle/admission tests passing in coderd (1.483s), chatd (1.386s) and chatstate (0.692s), with the saved layer diff verified. Disconnect survival is source-verified rather than regression-tested; full/required CI is unavailable in the snapshot and Pixel is pending, so this is not an all-CI-green verdict.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ThomasK33
Merge tk/codagt-1211-automations-schedules (main a328bee) into tk/cod…
c537251
…agt-1211b-automations-run-now

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

sync with main a328bee: merged #30160

  • Head: c537251a3654a33737c0973f88df95b0287f742a
  • CI run (pull_request): https://github.com/coder/coder/actions/runs/36912257718

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ibetitsmike
ibetitsmike approved these changes Oct 1, 2026
View reviewed changes

@ibetitsmike ibetitsmike left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Xum validated this PR and approved it on behalf of @ibetitsmike.

Validated head c537251a3654. Revalidated the replacement head after withholding approval of the superseded pin. The introducing-layer payload and Run now contracts remain unchanged; scoped project/store integration is sound. Fresh Run now and caller-gate tests passed on this exact head, and current required CI passed. Generated-only frontend changes introduce no new visual behavior; no Pixel approval or full-stack merge-readiness claim is made.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ThomasK33
Merge tk/codagt-1211-automations-schedules (main 15382eb) into tk/cod…
5fc4eb4
…agt-1211b-automations-run-now

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

merged #30160

  • Head: 5fc4eb4cde973144c80a336dc67fb0f1f536fab9
  • CI run (pull_request): https://github.com/coder/coder/actions/runs/36945508277

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
Merge tk/codagt-1211-automations-schedules (main 15382eb) into tk/cod…
520a5ed
…agt-1211b-automations-run-now

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

merged #30160

  • Head: 520a5eddbbfdfa59abec237c9637a29e80391788
  • CI run (pull_request): https://github.com/coder/coder/actions/runs/36952608686

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
Merge tk/codagt-1211-automations-schedules (main dc07908) into tk/cod…
95bf404
…agt-1211b-automations-run-now

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

merged #30160 (main dc07908)

  • Head: 95bf404d06d91717ba3b721993c8a66ea894e8ed
  • CI run (pull_request): https://github.com/coder/coder/actions/runs/36970135403

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ThomasK33 added 2 commits October 2, 2026 14:07
@ThomasK33
Merge tk/codagt-1211-automations-schedules into tk/codagt-1211b-autom…
ea35290
…ations-run-now

Brings main ff158c0 into this layer. No conflicts.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33
Merge tk/codagt-1211-automations-schedules into tk/codagt-1211b-autom…
5c77a72
…ations-run-now

Brings the new_chat automation title source fix from #30134.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33
ThomasK33 merged commit b25f885 into main Oct 2, 2026
52 of 54 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 2, 2026
@ThomasK33
ThomasK33 deleted the tk/codagt-1211b-automations-run-now branch October 2, 2026 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@ibetitsmike ibetitsmike ibetitsmike approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ThomasK33 ThomasK33

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ThomasK33 @ibetitsmike
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.