🙌 OpenHands: AI-Driven Development
F28 — Automation setup page
The setup page is the one form for making and changing automations outside the
template dialog. Add Automation → Create Automation opens it blank at
/automations/setup; a saved draft reopens at /automations/setup?draftId=<id>;
kebab Edit opens an existing automation at
/automations/setup?automationId=<id>. The form collects Name, a Prompt (or
Custom Python with entrypoint and setup script), model (LLM profile) and
repositories, a Schedule or Event trigger, and optional plugins and timeout.
A docked composer under the form can ask the agent to fill it. Create mode's
toolbar has Save draft, Test and Create Automation; edit mode's has
Test, Save and Close. A server-backed draft carries the server's
validation result and test runs; Create turns it into a real, enabled
automation and removes the draft.
F22 keeps F22.agent-assisted-setup (the end-to-end agent, plugin, phone and
draft-Test recipes); F23 owns edit mode (F23.edit-*, including Test and the save state on the edit
page). This family gives each create-mode behavior its own ID so a pass can fail one without
failing the others.
Source: src/routes/automation-setup-new.tsx, src/components/features/automations/setup/ (automation-setup-panel.tsx, automation-setup-prompt-stack.tsx, automation-setup-draft-service.ts), src/hooks/use-start-automation-setup.ts, src/hooks/use-open-automation-editor.ts.
Sub-features
F28.open-blank: Create Automation opens/automations/setupwith Name pre-filled New Automation (placeholderStandup digest), an empty Prompt, Schedule selected with Daily at09:00inAmerica/New_York(the default, whatever the browser's time zone), the docked composer (Need help creating an automation?) and no new conversation. The save state already reads Unsaved changes and the toolbar Test is disabled. Neither the Prompt nor the Custom kind offers an agent profile (automation-agent-profilecount0); the Prompt kind shows only the LLM profile pillautomation-setup-model.F28.kind-toggle: the button beside the Prompt label switches between Prompt and Custom (Custom Python). Custom shows a generated Python script that callsAUTOMATION_CALLBACK_URL, and Entrypoint and setup reveals Entrypointpython3 main.py, Setup script pathsetup.shand a no-op setup script; switching back shows the Prompt again.F28.schedule-presets: in create mode the Frequency control (the same control as on the edit page, whose presets and saving F23 owns as edit-schedule and edit-cron) starts on Daily at09:00, and switching presets fills create-mode defaults: Once a date-time at the next whole hour today, Weekly Monday, and Custom the cron of the preset it replaces (from Weekly, Monday at10:30it reads30 10 * * 1; Weekdays30 10 * * 1-5, Hourly0 * * * *, Once on 17 October at09:000 9 17 10 *). Clicking Custom again keeps a cron already typed there; leaving Custom for a preset and coming back starts from that preset again. Every preset keeps the 13-entry time zone select.F28.event-trigger: choosing Event replaces the schedule with Event source (default GitHub, sent asgithub; its menu lists the webhook sources registered on this backend plus Custom), Event key (defaultissue_comment.created), Add Filter (one free-text filter input), Ask Agent, the noticeEvent sources need a public URL to deliver webhooks to this instance., and a Test event payload pre-filled with a JSON object for that source and key. A source the backend has not registered (menu Custom, then a typed name) adds Register this as a custom webhook source, checked by default.F28.timeout: Add Timeout adds an optional Timeout seconds number field with a remove button;1800saves and the draft reads Ready to test.F28.draft-save: Save draft works on any form, valid or not; the first save replaces the URL with?draftId=<id>, shows the Draft saved bar (relative time, View test runs, Test) and the toastDraft saved in this conversation., and the save state reads Saved just now. The draft appears in the dashboard Drafts group (F21).F28.draft-validation: the server validates on save, not on blur. An invalid draft is still saved (dispatchable: false) and its first error replaces Ready to test in the draft bar: an empty prompt showsField required(also under Prompt), a bad custom cron showsValue error, Invalid cron expression: every day. A field error stays until the next save. Test stays enabled on a saved invalid draft: it saves again, opens Test runs with the same error in a red alert and dispatches nothing. The current validation error comes before any test status: after a successful draft Test the pill reads Latest test passed, and once an invalid cron is saved it reads the cron error (also after a reload, at desktop and phone widths) while the API marks the draft non-dispatchable.F28.draft-save-error: a draft the server refuses outright (a timeout above 1800 returns422) sets the save state to Save failed and shows one error toast with the reason the API gives (a timeout of 1801 readsValue error, timeout must not exceed 1800 seconds (30 minutes)). The draft bar drops its validity pill (no stale Ready to test) until a save succeeds.F28.required-before-test: Test and Create check locally first and send nothing when a required field is empty:Add a prompt before continuing.(Prompt or Plugin kind),Add a plugin source before continuing.,Add Python code before continuing.,Add an entrypoint command before continuing.,Add a setup script path before continuing.,Add a setup script before continuing.; an event Test with a payload that is not a JSON object showsEnter a valid JSON object before testing this event automation.A blank Name is not an error: it is derived from the prompt.F28.test-gated: in create mode Test stays disabled until the draft is saved and unchanged since; editing any field after a save disables it again until the next Save draft.F28.draft-test: Test on a saved, valid draft opens Test runs (with Back), showsTest run started.and a Pending row; it runs a hidden disabled copy of the draft, not a dashboard automation. Expected: the row reaches Successful or Failed by itself. Known failure #18263 (reproduced again 2026-10-15 on a Custom Python draft): the row stays Pending and the page does not poll the runs after the first request. Known failure (reproduced once 2026-10-17, SDK1.55.1, OpenHands/software-agent-sdk#6024): gracefully restarting an owned deferred-init Agent Server during the Custom Test command can leave its persisted BashCommand without final BashOutput. Reopening Test runs → View logs showedRUNNING/(no output); two postrestart BashOutput searches returned zero. Expected: an interrupted command retains terminal status/output and Logs stops implying it is running. This is the shared F23/F28 RunLogsModal consumer; native Terminal, SIGKILL, phone and fix attribution were not verified.F28.create: Create Automation creates the automation enabled, navigates to/automations/<id>(a Custom Python automation shows Script), and removes the draft from the dashboard Drafts group. Known failure (reproduced 2026-10-17, OpenHands/automation#594, automation 1.20.1, local SQLite WAL): successful writes can be invisible to the immediately following request on one keep-alive connection. A real no-pause client returnedUpload not foundon 3/50 upload201→create attempts andAutomation not foundon 2/50 create201→GET attempts. The separately exercised real UI sequence succeeded 21/21; no UI toast failure is claimed from the direct-service test. Expected: successful writes are visible to dependent requests without a delay. All test definitions used disabled inert events, were never dispatched, and were deleted with their uploads.F28.error-contrast: the draft bar's error pill and the Test runs error alert use the theme's error color (text-feedback-error) and reach at least 4.5:1 in all five color themes. Their tints follow the same theme error color: the pill a 5% tint over the draft bar surface, the alert a 10% tint with a 40% border.
How to get to it (user POV)
- Dashboard header Add Automation → Create Automation (
automations-add-automation, thenautomations-add-automation-create): blank create mode. Every create recipe below starts here. - Empty dashboard Create Automation (
automations-empty >> automations-create-automation): the same blank form (F21.empty-state). - Dashboard Drafts group: name or Resume (
automation-setup-draft-resume-<draft-id>) and the pencil (Edit,automation-setup-draft-edit-<draft-id>) open?draftId=<id>. - Kebab Edit on a dashboard card or the detail page header: edit mode (
?automationId=<id>,F21.edit,F23.edit-open). - A direct URL with
draftIdorautomationId(see the cold-load gotcha).
Driving it with control-openhands
Preconditions:
Baseline state (
launch,doctor,onboard --skip). No LLM is needed: every bullet uses the Custom Python kind or never dispatches, and the agent-assisted path stays in F22.Desktop viewport; the
F28.error-contrastbullet switches color themes (Settings → Application,F16) and restores the default.The original recipes were run on 2026-10-16 on a fresh local
control-openhands launchof main with Agent Server 1.55.1 and no LLM; the blank-form, presets and error-contrast recipes were run again on 2026-10-17. The dated 2026-10-17 maintenance evidence separately proves the added regression checks and known-bug block. Documented known failures remain failures.Blank form (
F28.open-blank). Runcontrol-openhands conversation list,control-openhands browser goto /automations,control-openhands browser click 'testid=automations-add-automation'andcontrol-openhands browser click 'testid=automations-add-automation-create' --expect-url '/automations/setup$'. Thenbrowser value 'testid=automation-setup-name'isNew Automation,browser attr 'testid=automation-setup-name' placeholderisStandup digest,browser value 'testid=automation-setup-prompt'is empty,browser attr 'testid=automation-setup-frequency-daily' aria-checkedistrue,browser value 'testid=automation-setup-time'is09:00,browser text 'testid=automation-setup-save-state'isUnsaved changes,browser enabled 'testid=automation-setup-test'isfalse,browser count 'testid=automation-setup-model'is1andbrowser count 'testid=automation-agent-profile'is0; aftercontrol-openhands browser click 'testid=automation-setup-kind-custom'the agent profile count is still0.conversation listis unchanged.Presets (
F28.schedule-presets). For each ofonce,hourly,daily,weekdays,weekly,customruncontrol-openhands browser click 'testid=automation-setup-frequency-<preset>'andcontrol-openhands browser testids 'testid=automation-setup-at-row'(browser snapshotis an ARIA tree and does not list test ids): Once hasautomation-setup-datetime, Hourly onlyautomation-setup-timezone, Daily and Weekdaysautomation-setup-time, Weekly alsoautomation-setup-weekday(value1), Customautomation-setup-custom-schedule. Click Weekly, then Custom:browser value 'testid=automation-setup-custom-schedule'is Weekly's0 9 * * 1. Click Weekly,browser fill 'testid=automation-setup-time' 10:30, click Custom:30 10 * * 1. Fill the Custom field with15 8 * * 2and click Custom again: it stays15 8 * * 2. Click Daily, then Custom:30 10 * * *(the preset's, not the typed cron).browser count 'testid=automation-setup-timezone >> option'is13. Click Daily again.Event fields (
F28.event-trigger). Runcontrol-openhands browser click 'role=radio[name=/^Event/]'.browser value 'testid=automation-setup-event-key'isissue_comment.created,browser visible 'testid=automation-setup-event-public-url-notice'istrue, andbrowser count 'testid=automation-setup-custom-webhook-enabled'is0forgithub. Clicktestid=automation-setup-event-source-toggle,browser snapshot 'testid=automation-setup-event-source-menu'lists the registered sources andCustom(GitHub, GitLab, Slack, Linear, Jira on a local stack). Clicktestid=automation-setup-event-source-menu >> role=button[name="Custom"],browser fill 'testid=automation-setup-event-source' qa-hooks:browser visible 'testid=automation-setup-custom-webhook-enabled'istrueandbrowser eval "document.querySelector('[data-testid=automation-setup-custom-webhook-enabled]').checked"istrue. Pick GitHub again from the same menu. Clicktestid=automation-setup-add-event-filter(automation-setup-event-filterappears) andtestid=automation-setup-event-test-payload-toggle;browser value 'testid=automation-setup-event-test-payload'is a JSON object with"source": "github"and"event": "issue_comment.created". Clickrole=radio[name=/^Schedule/]to return.Invalid drafts save (
F28.draft-save,F28.draft-validation). Filltestid=automation-setup-namewithQA_F28 Probe, leave the prompt empty,browser network --clear, clicktestid=automation-setup-save-draft.browser wait-url 'draftId=';browser toasts --historyincludesDraft saved in this conversation.;browser text 'testid=automation-setup-draft-validity'isField required;control-openhands api GET /api/automation/v1/drafts/<draft-id>(the id in the URL) hasvalidation_errors[{"field":"prompt","code":"missing",…}]anddispatchable: false(browser network --bodiesshows request bodies, not the response);browser text 'testid=automation-setup-save-state'isSaved just now. Now fill the prompt withReply pong. Do not run any tools., clicktestid=automation-setup-frequency-custom, filltestid=automation-setup-custom-schedulewithevery day,browser network --clear, press Tab, andbrowser network --filter 'automation/v1'lists no request (no blur validation). Click Save draft: the validity text isValue error, Invalid cron expression: every day.browser network --clear, clicktestid=automation-setup-test:browser text 'testid=automation-setup-draft-runs-page'contains the same cron error,browser networklists only the draftPATCH(200) and nothing underdispatch; clicktestid=automation-setup-draft-runs-back. Fill the cron with0 0 1 1 *and Save draft: it readsReady to test.Required fields before Test (
F28.required-before-test). Runcontrol-openhands browser fill 'testid=automation-setup-prompt' '', Save draft,browser network --clear, clicktestid=automation-setup-test:browser text 'testid=automation-setup-draft-runs-page'containsAdd a prompt before continuing.andbrowser network --filter 'dispatch'lists nothing. Clicktestid=automation-setup-draft-runs-back, fill the prompt back in and Save draft.Timeout (
F28.timeout,F28.draft-save-error). Clicktestid=automation-setup-add-timeout, filltestid=automation-setup-timeoutwith1800, Save draft:Ready to test. Fill1801,browser toasts --history --clear,browser network --clear, Save draft.browser network --filter 'automation/v1/drafts'showsPATCH … 422(--bodiesadds the request body, not the response) andbrowser text 'testid=automation-setup-save-state'isSave failed.browser toasts --historyholds one toast,Value error, timeout must not exceed 1800 seconds (30 minutes), andbrowser count 'testid=automation-setup-draft-validity'is0. Clicktestid=automation-setup-timeout-removeand Save draft.Test gating (
F28.test-gated). After a successful Save draftbrowser enabled 'testid=automation-setup-test'istrue; filltestid=automation-setup-namewithQA_F28 Probe 2and it isfalse; Save draft and it istrue.Custom kind and draft Test (
F28.kind-toggle,F28.draft-test). Clicktestid=automation-setup-kind-customandbrowser wait 'testid=automation-setup-custom-code'; once the crossfade endsbrowser count 'testid=automation-setup-prompt'is0(right after the click it can still read1, andvisibletrue) andbrowser value 'testid=automation-setup-custom-code'containsAUTOMATION_CALLBACK_URL. Clicktestid=automation-setup-custom-details-toggle: Entrypointpython3 main.py, Setup script pathsetup.sh. Save draft (Ready to test), clicktestid=automation-setup-testandbrowser wait 'testid=automation-setup-draft-run': the row reads Pending and the page showsTest run started.Expected:browser wait 'testid=automation-setup-draft-run >> text=Successful' --timeout 45000. Known failure #18263 (reproduced 2026-10-15): the row stays Pending for 45 s with a single runs request inbrowser network --filter '/runs'; afterbrowser reload,testid=automation-setup-view-test-runsshows it Successful. Clicktestid=automation-setup-draft-runs-back. Switching back withtestid=automation-setup-kind-promptrestores the Prompt; leave the draft on Custom for the next bullet.Create (
F28.create). Runcontrol-openhands browser click 'testid=automation-setup-create' --expect-url '/automations/[0-9a-f-]{36}$'. The detail h1 isQA_F28 Probe 2, the badge reads Active and the page shows Script.browser goto /automations:browser count 'testid=automation-setup-draft-resume-<draft-id>'is0.Error contrast (
F28.error-contrast). Switch to Light+ (F16), open a draft whose cron isevery day(as in the invalid-drafts bullet), andbrowser screenshot 'testid=automation-setup-draft-details' --feature F28.error-contrast --name light-plus. Read the pill's computedcolorandbackgroundColorwithbrowser eval: the background is the text color at alpha0.05(Light+rgb(192, 40, 45)andoklab(0.528 0.170 0.080 / 0.05)). Composite every ancestor's background down to the pill (painting each on a 1×1 canvas and reading the pixel normalizesoklab()), then the text color, and compute the WCAG ratio: at least 4.5:1. Clicktestid=automation-setup-testand inspecttestid=automation-setup-draft-runs-errorthe same way: background alpha0.1,borderTopColoralpha0.4, same hue as the text. Repeat both checks in OpenHands-DeepSea, OpenHands-Neutral, OpenHands-Neo and Solarized Light, then restore OpenHands-Neutral. On 2026-10-17 the pill/alert ratios were Light+ 4.86/4.99, DeepSea 5.10/6.16, Neo and Neutral 4.86/4.95, Solarized Light 4.57/4.78.Cleanup. Delete
QA_F28 Probe 2from its kebab and any leftoverQA_F28draft with its trash icon, as in F21;api GET /api/automation/v1/draftslists none.
Preset-to-Custom regression check (F28.schedule-presets):
control-openhands browser viewport desktop
control-openhands browser goto /automations/setup
control-openhands browser wait 'testid=automation-setup-frequency-weekly'
control-openhands browser click 'testid=automation-setup-frequency-weekly'
control-openhands browser fill 'testid=automation-setup-time' '10:30'
control-openhands browser select 'testid=automation-setup-weekday' '3'
control-openhands browser click 'testid=automation-setup-frequency-custom'
control-openhands browser screenshot --feature F28.schedule-presets --name weekly-to-custom-proof
control-openhands assert --field value --equals '30 10 * * 3' -- browser value 'testid=automation-setup-custom-schedule'
Validation error after a passed Test (F28.draft-validation):
control-openhands browser viewport desktop
control-openhands browser goto /automations/setup
control-openhands browser fill 'testid=automation-setup-name' QA_Stale_Test_Success
control-openhands browser click 'testid=automation-setup-kind-custom'
control-openhands browser click 'testid=automation-setup-frequency-custom'
control-openhands browser fill 'testid=automation-setup-custom-schedule' '0 0 1 1 *'
control-openhands browser click 'testid=automation-setup-save-draft'
control-openhands browser hover 'testid=automation-setup-name'
control-openhands browser wait-url 'draftId='
QA_DRAFT_ID=$(control-openhands browser url | jq -r '.url|capture("draftId=(?<id>[a-f0-9-]+)").id')
trap 'control-openhands api DELETE "/api/automation/v1/drafts/$QA_DRAFT_ID" --write >/dev/null; control-openhands browser goto /automations >/dev/null' EXIT
control-openhands browser click 'testid=automation-setup-test'
control-openhands browser wait 'testid=automation-setup-draft-run'
QA_MATERIALIZED_ID=$(control-openhands api GET "/api/automation/v1/drafts/$QA_DRAFT_ID" | jq -r .body.materialized_automation_id)
QA_RUN_STATE=''
for QA_ATTEMPT in $(seq 1 20); do
QA_RUN_STATE=$(control-openhands api GET "/api/automation/v1/$QA_MATERIALIZED_ID/runs?limit=10" | jq -r '.body.runs[0].status // ""')
[ "$QA_RUN_STATE" = COMPLETED ] && break
sleep 3
done
[ "$QA_RUN_STATE" = COMPLETED ]
control-openhands browser reload
control-openhands browser text 'testid=automation-setup-draft-validity'
control-openhands browser fill 'testid=automation-setup-custom-schedule' 'every day'
control-openhands browser click 'testid=automation-setup-save-draft'
control-openhands browser hover 'testid=automation-setup-name'
control-openhands browser reload
control-openhands assert --field body.dispatchable --equals false -- api GET "/api/automation/v1/drafts/$QA_DRAFT_ID"
control-openhands browser screenshot --feature F28.draft-validation --name validation-after-test
control-openhands assert --field text --equals 'Value error, Invalid cron expression: every day' -- browser text 'testid=automation-setup-draft-validity'
Gotchas
- A toast can cover the toolbar (Save draft, Test, Close) and stays while the pointer rests on it, so the next toolbar click times out ("subtree intercepts pointer events"). After each save,
browser hovera form field (for exampletestid=automation-setup-name) before clicking the toolbar again, as F22's Gotchas say. - Drive inputs with
browser fill: setting.valuefrombrowser evaldoes not reach React state for every field, and a save then sends the old value. - Change one field per Save draft when checking a validation message: a save shows only the first server error, so two edits in one save hide the second.
- A cold load of
/automations/setup?draftId=<id>or?automationId=<id>(a reload or a typed URL) opens the form: re-checked 2026-10-14 on acontrol-openhands launchof main with this family (both read their Name back). An earlier instance of unknown build stayed on Loading saved draft… for more than 20 s; if that returns, compare with opening the same draft from the dashboard. - The draft bar duplicates the prompt error:
Field requiredappears both under Prompt and in the bar. - Kebab Edit on a Custom Python (tarball) automation shows the Existing code bundle summary, not the code editor, and Save keeps that bundle without asking for upload-time fields (
F23.edit-open,F23.edit-save). - Escape on the setup page does nothing, by design (
F23.edit-close).