← Guides
Extend kcode

Hooks, schedules and triggers

kcode starts a command or a prompt from an event, with no one at the keyboard.

Project hooks connect a trigger to an action

Schedule a weekly dependency review: ask the agent to check available updates and report which ones need attention. Or notify a running session when CI finishes so it can investigate a failed build. Project hooks declare the event and the command or prompt to run.

Decide what happens when events overlap

If a dependency review is already running, drop another scheduled request instead of starting the same review twice. If several build results arrive, queue them when each needs investigation. Hooks let you choose drop, queue, replace, or parallel behavior.

Connect outside systems

kcode trigger delivers external events to a running session. Webhook-related hooks and headless execution let scripts and CI participate through explicit command-line and event interfaces.

Headless is another way to run the agent

kcode -p runs a prompt without the window and can emit text, JSON, or newline-delimited JSON. A CI script can submit a prompt and consume structured results; its configured permission mode determines which actions the agent can take.

A trigger is not a capability

The hook answers “when should work start?” A skill answers “how is this reusable task done?” A scheduled video review might invoke the same frame-extraction skill that an interactive review uses.

Explore this area