What hooks are

Hooks are commands, prompts or agents that a configuration file sets to run at points in a task, such as before a tool is used. You add and change them in configuration files. The app lists them, asks you to review new and changed ones, and lets you switch them off.

Only trust hooks you’ve read. A command hook is a program that runs on the computer.

Find your hooks

  1. In Settings, choose “Hooks”, under “Coding”. If you’re connected to other computers over SSH, first pick the computer in the sidebar. “All settings” means this computer.
  2. Hooks are grouped by where they come from: “From Config” for your own and your administrator’s configuration, “From Projects” for a project’s, and “Other sources”. Choose a group to see its hooks by event.
  3. Choose a hook to see its details: whether it runs a command, a prompt or an agent, and its command, matcher, timeout and status message where they’re set.

The page lists the hooks of the project you open. With no project open, it says “No project open” and lists none, though hooks from your own configuration can still run in chats without a project.

After you change a configuration file, choose “Reload hooks”.

Review new and changed hooks

  • A hook that needs review is counted on its group’s row as needing review, and its “Trust” button says why: “New hook” or “Hook changed since last trusted”. Its switch is off and can’t be turned on until you trust it.
  • Read it, then choose “Trust”. A confirmation shows the hook’s event, where it comes from and what it runs. Choose “Trust 1 hook” to trust it, or “Cancel”. The app has no way to take trust back. To stop a hook you’ve trusted, switch it off.
  • A new chat can show a notice above the message box when hooks in its project need review. “Review hooks” opens the Hooks page, where you can read each one. “Trust all” first lists every hook it would trust, with what each runs, and trusts only the hooks in that list once you confirm. Read them first.

Switch a hook off

Use the switch beside the hook. Switching a hook off doesn’t change or delete it.

Some hooks can’t be switched off here: their switch stays on and says “Managed hooks are always on”.

Change or remove a hook

The app doesn’t add, edit or delete hooks. Choose the file button beside a hook, “Open config file”, to open the file it’s set in. Change it there, then choose “Reload hooks”. The button isn’t offered for hooks that can’t be switched off, or for another computer.

Hooks you didn’t add

A project’s configuration can add hooks. They’re listed under “From Projects”. Read them before you trust them, above all in a repository you didn’t write.

Hooks from plugins aren’t part of Tadle Code X yet, because plugins aren’t.

Back to the documentation.