[Automations] Conditional runs: pre-run script decides whether to create a session (exit 0 / non-zero)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Problem
A scheduled automation creates a new session on every trigger. In agent-driven pipelines most triggers are no-ops (e.g. "take the next task from a project board if one is ready"), so the sidebar accumulates empty sessions and every no-op still costs quota.
Proposal
An optional condition field for a scheduled automation: a path to a local script. When the scheduler fires, it runs the script first:
- exit 0 → create the session and run the prompt;
- exit non-zero → skip this trigger, no session is created.
Each attempt (ran / skipped) shows in the task History. The script runs in the automation's project directory, short timeout (30s) applies. That's the whole feature: one exit code decides "run or not".
Related
An agent tool to archive/delete its own completed session would clean up no-op sessions accumulated before this feature exists.
Environment: ZCode Desktop 3.11.2, macOS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files, tests, or entry points are named, and this repository is described as a feedback collection project. First confirm where scheduled automations and task History are implemented; done means an optional project-local condition script runs with the stated timeout, exit 0 creates the session, non-zero skips it, and both outcomes appear in History.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100