Skip to content
Docs
Loading documentation…
Open platform
Documentation

Hosted Claude Code routines

Connect GitHub and a customer-owned Claude cloud routine with required pull request checks.

On this page

Availability and prerequisites

This workflow runs in your Claude cloud environment. You need an Askdepth workspace owner or admin role, an eligible workspace plan, GitHub write access to the repository, and a Claude subscription with routines available. Askdepth must activate hosted execution before assignments can run.

Claude routines are in research preview. Their API trigger launches a cloud session using a token scoped to the routine. Check Claude's routines guide for current availability and account requirements.

Connect the integration

Open Settings → Integrations → Coding agents → Claude Code in Askdepth. The page saves your setup as you complete four steps.

Connect GitHub

Choose Install GitHub App, select the repositories Askdepth may work with, and finish installation. Return to Askdepth and choose Connect GitHub to authorize your account. Available repositories must be included in the installation and writable by your GitHub account.

Create the matching cloud routine

Open Claude routines from the setup page. Create a cloud routine using your subscription account and select the same repository. Claude needs its own GitHub access to edit code; Askdepth's GitHub connection checks the resulting pull request.

Copy the routine prompt shown in Askdepth into its instructions. Copy the callback hostname shown in Askdepth into the routine cloud environment's custom network allowlist. Keep the dependency registries your project uses available, and add your usual dependency installation command if the environment needs a setup script.

Use an API trigger, save the routine, then copy its launch URL and generate its token. Keep only the API trigger for work controlled by Askdepth. Return to Askdepth and fill in:

FieldValue
Routine nameA descriptive label, such as Product fixes
API launch URL or routine IDThe full API launch URL copied from Claude, or its trig_ ID
Routine tokenThe routine token beginning with sk-ant-oat01-

Choose Save routine. Askdepth stores the token encrypted and does not return it. This token is distinct from an Anthropic API key. Claude shows it once; manage or rotate it in the API trigger settings.

Configure the repository

Select the repository and its matching hosted routine. Confirm the prefilled base branch. In a recent GitHub pull request, open Checks and copy the exact required check names into Required CI check names, one per line. Use names such as Lint or Unit tests only if those are the names your repository actually reports.

Keep Allow automatic work in this repository enabled and choose Save repository. At least one required check is mandatory. Add CI to a repository that has none before enabling execution.

Enable execution when available

After GitHub, the routine, the enabled repository, and the callback hostname are ready, choose Enable automation if Askdepth has activated the integration. Workspace concurrency can be 1–4; one repository has at most one active coding attempt. Open Builds to follow results and the linked Claude session.

What Askdepth verifies

The routine receives an assignment and a dedicated branch. Its saved prompt instructs it to follow the allowed paths and file-count limit, run relevant tests, and create a draft pull request with the supplied run marker.

Askdepth checks the repository, source branch, base branch, marker, and every changed or renamed path through GitHub. Workflow changes are rejected. All configured checks must pass on the current pull request commit before Askdepth marks it ready for review. A changed commit or failing checks can return it to draft.

You review and merge the pull request. Askdepth does not merge or deploy. Scope and CI checks are an acceptance gate; they do not sandbox the Claude account's repository permissions.

Pause, disconnect, and rotate

Pause automation stops new dispatches and cancels tracked work in Askdepth. Disconnect routine removes the saved token; Disconnect GitHub removes that connection's access in Askdepth. An already launched Claude session may continue: stop it in Claude if immediate cancellation is needed.

To rotate a token, generate a replacement in Claude and save it in Askdepth with the same routine ID. Revoke the old token in Claude. To change repository execution settings while monitored runs or open ready pull requests exist, pause related work or close the pull requests first.

Troubleshoot

SymptomCheck
Repository missingAskdepth App installation includes it, your GitHub account can write to it, and Claude separately has access to it. Reconnect GitHub after updating permissions.
No routines or tokenSign in with your Claude subscription account, check organization policies, save the cloud routine, then open its API trigger settings.
Token lost or regeneratedSave a replacement using the same routine ID. Askdepth cannot reveal a saved token.
Result cannot reach AskdepthCompare the displayed callback hostname with the routine network allowlist and inspect the linked session.
Pull request remains draftCheck the exact required check names, current commit results, allowed paths, and run details in Builds.
Dispatch status is unknownInspect the linked session and Builds before starting anything manually; Askdepth avoids repeating an ambiguous launch.

For a workflow you initiate in your own project today, connect local Codex or local Claude Code.