# How do I trigger coding agents from GitHub events, webhooks and schedules?

Save the work once as an Automation, then give it triggers: a schedule, a GitHub event, a webhook or a Slack message. Each time one fires, Harmux starts a Claude Code or Codex agent on its own machine, signed in with your team's Claude and ChatGPT plans, or hands the job to a Lead. Runs show in your Fleet, and anything that needs you lands in your Inbox.

Plenty of engineering work is the same job, again. Review the pull request that touches billing. Look into the alert. Run the nightly suite and fix what broke. Upgrade the dependencies. Each one is easy to hand an agent, but only if someone remembers to, at the right moment, every time.

## What it looks like

A teammate opens a pull request that touches the billing code at six in the evening. A GitHub trigger starts a Codex agent on a fresh machine. It reads the change, runs the tests and posts its verdict to the team's Slack channel. With follow-ups on, when the author pushes a fix an hour later, the same agent gets the new commits and carries on with what it already knows, instead of starting over.

Nobody had to remember to ask.

## Four ways to start work

A schedule runs on a cron time in your own time zone, as often as every 15 minutes. If the last run is still going, the next one waits its turn or is skipped, and a daily cap keeps a runaway loop from running up a bill.

A webhook gives each trigger its own URL and secret, so anything that can send a webhook can start work: your monitoring, your deploy pipeline, an internal tool. Filters keep only the payloads you care about.

GitHub events, set up from the hmux CLI today and in the App soon, fire when a pull request opens, a branch is pushed and so on, narrowed by branch, author, label or the paths that changed. By default they ignore bots, forks and people without write access, because whoever triggers a run is putting words in front of an agent that works with your access.

A Slack message works too: a post in a channel you pick, from the people or apps you name, starts a run. Point one at your alerts channel and every alert gets an agent.

## Runs that keep context

A pull request rarely gets just one event. Turn on follow-ups and later events about the same pull request or issue reach the agent the first one started, so it keeps what it learned. A Session that opened a pull request also hears about reviews and CI results on it, whether or not an Automation started it.

Or point an Automation at a [Lead](/guides/agent-that-manages-coding-agents). Each fire reaches the Lead, which remembers earlier runs, splits the work between agents and brings you only the decisions.

Each run ends by saying what happened: it acted, there was nothing to do, it needs you, or it failed. Post results to Slack, every run or only the ones worth reading, so a check that finds nothing stays quiet.

## Let the agents suggest them

You don't have to think of every Automation yourself. When an agent does a chore by hand, it can propose an Automation for it. The proposal waits in your Inbox, and nothing runs until you turn it on.

A run costs what its machine costs while it works, plus storage ([prices](/pricing)), and inference runs on your stack of Claude and ChatGPT plans. The subscriptions you already pay for run your reviews, nightly fixes and alert checks too, not only the coding you do yourself, and a run whose plan runs low can move to another of yours for the same agent that has room ([stacking plans](/guides/multiple-claude-and-chatgpt-subscriptions)). Most automation around coding agents runs on API keys billed per token; here a key is an option, not a requirement.

## Set it up

Make schedules, webhooks and Slack triggers on the Automations page of the App. GitHub events are set up from the hmux CLI today and in the App soon. The CLI makes the others too, for example a nightly run:

```
hmux automation create --project <project-id> --name "Nightly tests" --harness claude-code \
  --prompt "Run the test suite and fix what fails." --schedule "0 2 * * *" --tz Europe/London
```

New to Harmux? [Get started](/login); it's free to sign up.

## Related

- [Coding agents from Slack](/guides/coding-agents-from-slack)
- [An agent that manages coding agents](/guides/agent-that-manages-coding-agents)
- [Run Claude Code and Codex agents in parallel](/guides/run-claude-code-and-codex-agents-in-parallel)

[Create an Automation](/docs/automations)
