Automation
Syntic Code does not have to wait for you to type. You can make it react to events, run on a timetable, keep going until a job is done, run from scripts and CI, or start from a link. This section covers each way.
Pick the right tool
| You want | Use | Runs |
|---|---|---|
| Your own script to run at fixed moments: before a tool call, after an edit, when a turn ends | Hooks | Inside every session, automatically |
| Syntic Code inside a shell script, git hook or CI job | Scripting and CI (syntic -p) | Once per call, no screen |
| The same prompt every few minutes while a session is open | /loop | In the open session, while idle |
| A prompt on a timetable in this project (“weekdays at 9”) | /schedule | Whenever a session is open in the project |
| The agent to keep going until a condition is met | /goal | Turn after turn in the session (or a -p run) |
| Another system to send messages into a running session | Channels | In sessions where you allowed the server |
| A link that opens a session with a prompt ready | Deep links | When someone clicks it |
| A long job that keeps running after you close the terminal | Background sessions (syntic --bg) | In the background, on your machine |
How they fit together
- Hooks are rules, not tasks. They make sure something always happens (format, block, log, notify), whoever or whatever started the turn.
-pruns are the building block for anything outside an open session: cron jobs, git hooks, CI pipelines, your own tools. They take a prompt, do the work, print a result and exit.- Loops, schedules and goals keep an open session busy without you typing each step.
- Channels and links let other systems and people start work: a channel adds a turn to a session that is already open; a link opens a new one.
A few combinations that work well:
| Combination | Example |
|---|---|
-p + /goal | A nightly job: syntic -p "/goal the dependency upgrade builds and all tests pass". |
/schedule + hooks | A routine that runs a check every morning, with a Stop hook that posts the result to your team chat. |
--bg + hooks | A background refactor with a Stop hook that runs the full test suite and sends the agent back to work while it fails. |
| Channels + permission rules | A deploy bot pushes failures into your session; allow rules let the agent read logs freely but still ask before it changes anything. |
Nothing runs in the cloud
Every automation on these pages runs on a machine you control: your computer, or your own CI runner. Schedules and loops run only while a session is open on your computer; for jobs that must run with no session open, call syntic -p from your system’s scheduler (cron, launchd, Task Scheduler) or from CI.
Unattended runs cannot answer permission prompts. Decide up front what an automated run may do with --allowed-tools, --permission-mode and settings rules. See Scripting and CI.