Prerequisites
- Agent dispatch enabled for your Latitude workspace
- Access to Claude Code routines
- A Claude Code routine that is allowed to work in the repository you want it to modify
- The routine trigger token from Claude Code
Prepare a routine
- Open Claude Code routines.
- Create or select the routine Latitude should trigger.
- Use a routine description that tells Claude Code to investigate Latitude signals, implement fixes, run relevant checks, and report what changed.
- Copy the routine trigger token from the routine API section.
- Copy the routine page URL from your browser. Latitude extracts the routine trigger ID from this URL.
Connect Claude Code
- In Latitude, open your project and go to Settings → Integrations.
- Open Claude Code and click Connect.
- Paste the routine token.
- Paste the routine URL, for example
https://claude.ai/code/routines/trig_.... - Click Connect.
Configure dispatches
After Claude Code is connected, open the Claude Code integration detail page in Latitude.- Triggers choose which Latitude events can fire the routine.
- Routine trigger ID is extracted from the routine URL during setup and can be edited if you rotate routines.
- Max dispatches per day limits how many routine runs Latitude can create.
- Cooldown prevents repeated dispatches for the same source during a short period.
What Latitude sends to Claude Code
Latitude calls the Claude Code routines API with:- The configured routine trigger ID
- The encrypted routine token
- The rendered dispatch prompt as the routine input text
Troubleshooting
- Paste the routine page URL, not just the ID: the connection form validates URLs and extracts
trig_...from the path. - Authentication error: rotate the routine token in Claude Code and reconnect the integration.
- Dispatch request rejected: confirm the routine still exists and the trigger ID matches the routine you want Latitude to fire.
- Routine runs but cannot fix code: review the routine’s repository access and instructions in Claude Code.