app.startup
Fires exactly once when the Maestro application launches. Ideal for workspace setup, dependency installation, health checks, or any initialization that should happen once per session. Required fields: None beyond the universalname, event, and either prompt or prompt_file.
Behavior:
- Fires once per application launch
- Does NOT re-fire when toggling Cue on/off in Settings
- Does not re-fire on YAML hot-reload (deduplication by subscription name)
- Resets on session removal (so re-adding the session fires again on next app launch)
- Not affected by sleep/wake reconciliation
- Works with
fan_out,filter,output_prompt, andprompt_file
| Field | Type | Description |
|---|---|---|
reason | string | Always "system_startup" |
time.heartbeat
Fires on a periodic timer. The subscription triggers immediately when the engine starts, then repeats at the configured interval. Required fields:| Field | Type | Description |
|---|---|---|
interval_minutes | number | Minutes between triggers (must be > 0) |
- Fires immediately on engine start (or when the subscription is first loaded)
- Reconciles missed intervals after system sleep — if your machine sleeps through one or more intervals, Cue fires a catch-up event on wake
- The interval resets after each trigger, not after each run completes
{{CUE_TRIGGER_NAME}} and {{CUE_EVENT_TIMESTAMP}}.
time.scheduled
Fires at specific times and days of the week — a cron-like trigger for precise scheduling. Required fields:| Field | Type | Description |
|---|---|---|
schedule_times | string[] | Array of times in HH:MM format (24-hour clock) |
| Field | Type | Default | Description |
|---|---|---|---|
schedule_days | string[] | every day | Days of the week to run: mon, tue, wed, thu, fri, sat, sun |
- Checks every 60 seconds if the current time matches any
schedule_timesentry - If
schedule_daysis set, the current day must also match - Does not fire immediately on engine start (unlike
time.heartbeat) - Multiple times per day are supported — add multiple entries to
schedule_times
| Field | Description | Example |
|---|---|---|
matched_time | The scheduled time that matched | 09:00 |
matched_day | The day of the week when it triggered | mon |
file.changed
Fires when files matching a glob pattern are created, modified, or deleted. Required fields:| Field | Type | Description |
|---|---|---|
watch | string (glob) | Glob pattern for files to monitor |
- Monitors for
add,change, andunlink(delete) events - Debounces by 5 seconds per file — rapid saves to the same file produce a single event
- The glob is evaluated relative to the project root
- Standard glob syntax:
*matches within a directory,**matches across directories
| Variable | Description | Example |
|---|---|---|
{{CUE_FILE_PATH}} | Absolute path to the changed file | /project/src/app.ts |
{{CUE_FILE_NAME}} | Filename only | app.ts |
{{CUE_FILE_DIR}} | Directory containing the file | /project/src |
{{CUE_FILE_EXT}} | File extension (with dot) | .ts |
{{CUE_FILE_CHANGE_TYPE}} | Change type | add, change, unlink |
changeType field is also available in filters.
agent.completed
Fires when another Maestro agent finishes a task. This is the foundation for agent chaining — building multi-step pipelines where one agent’s completion triggers the next. Required fields:| Field | Type | Description |
|---|---|---|
source_session | string or list | Name(s) of the agent(s) to watch for completion |
- Single source (string): Fires immediately when the named agent completes
- Multiple sources (list): Waits for all named agents to complete before firing (fan-in). See Fan-In
- The source agent’s output is captured and available via
{{CUE_SOURCE_OUTPUT}}(truncated to 5,000 characters) - Matches agent names as shown in the Left Bar
| Variable | Description | Example |
|---|---|---|
{{CUE_SOURCE_SESSION}} | Name of the completing agent(s) | builder |
{{CUE_SOURCE_OUTPUT}} | Truncated stdout from the source (max 5K chars) | Build succeeded |
{{CUE_SOURCE_STATUS}} | Run status (completed, failed, timeout) | completed |
{{CUE_SOURCE_EXIT_CODE}} | Process exit code | 0 |
{{CUE_SOURCE_DURATION}} | Run duration in milliseconds | 15000 |
{{CUE_SOURCE_TRIGGERED_BY}} | Name of the subscription that triggered the source run | lint-on-save |
triggeredBy field is particularly useful when a source agent has multiple Cue subscriptions but you only want to chain from a specific one. See Selective Chaining for a complete example.
task.pending
Watches markdown files for unchecked task items (- [ ]) and fires when pending tasks are found.
Required fields:
| Field | Type | Description |
|---|---|---|
watch | string (glob) | Glob pattern for markdown files to scan |
| Field | Type | Default | Description |
|---|---|---|---|
poll_minutes | number | 1 | Minutes between scans (minimum 1) |
- Scans files matching the glob pattern at the configured interval
- Fires when unchecked tasks (
- [ ]) are found - Only fires when the task list changes (new tasks appear or existing ones are modified)
- The full task list is formatted and available via
{{CUE_TASK_LIST}} - File content (truncated to 10K characters) is available via
{{CUE_TASK_CONTENT}}
| Variable | Description | Example |
|---|---|---|
{{CUE_TASK_FILE}} | Path to the file containing tasks | /project/TODO.md |
{{CUE_TASK_FILE_NAME}} | Filename only | TODO.md |
{{CUE_TASK_FILE_DIR}} | Directory containing the file | /project |
{{CUE_TASK_COUNT}} | Number of pending tasks found | 3 |
{{CUE_TASK_LIST}} | Formatted list with line numbers | L5: Write unit tests |
{{CUE_TASK_CONTENT}} | Full file content (truncated to 10K chars) | (file contents) |
github.pull_request
Polls GitHub for new pull requests using the GitHub CLI (gh).
Optional fields:
| Field | Type | Default | Description |
|---|---|---|---|
repo | string | auto | GitHub repo in owner/repo format. Auto-detected from git remote if omitted |
poll_minutes | number | 5 | Minutes between polls (minimum 1) |
- Requires the GitHub CLI (
gh) to be installed and authenticated - On first run, seeds the “seen” list with existing PRs — only new PRs trigger events
- Tracks seen PRs in a local database with 30-day retention
- Auto-detects the repository from the git remote if
repois not specified
| Variable | Description | Example |
|---|---|---|
{{CUE_GH_TYPE}} | Always pull_request | pull_request |
{{CUE_GH_NUMBER}} | PR number | 42 |
{{CUE_GH_TITLE}} | PR title | Add user authentication |
{{CUE_GH_AUTHOR}} | Author’s GitHub login | octocat |
{{CUE_GH_URL}} | HTML URL to the PR | https://github.com/org/repo/pull/42 |
{{CUE_GH_BODY}} | PR description (truncated) | (PR body text) |
{{CUE_GH_LABELS}} | Comma-separated label names | bug, priority-high |
{{CUE_GH_STATE}} | PR state | open |
{{CUE_GH_BRANCH}} | Head (source) branch | feature/auth |
{{CUE_GH_BASE_BRANCH}} | Base (target) branch | main |
{{CUE_GH_REPO}} | Repository in owner/repo format | RunMaestro/Maestro |
github.issue
Polls GitHub for new issues using the GitHub CLI (gh). Behaves identically to github.pull_request but for issues.
Optional fields:
| Field | Type | Default | Description |
|---|---|---|---|
repo | string | auto | GitHub repo in owner/repo format |
poll_minutes | number | 5 | Minutes between polls (minimum 1) |
github.pull_request — requires GitHub CLI, seeds on first run, tracks seen issues.
Example:
github.pull_request, except:
| Variable | Description | Example |
|---|---|---|
{{CUE_GH_TYPE}} | Always issue | issue |
{{CUE_GH_ASSIGNEES}} | Comma-separated assignee logins | alice, bob |
{{CUE_GH_BRANCH}}, {{CUE_GH_BASE_BRANCH}}) are not available for issues.