Stitch / docs
Harnesses

Claude Code

Run agents with Anthropic Claude Code.

Harness details
Typeclaude_code
WebsiteClaude Code

Version

Set version explicitly to pin a release, for example 2.1.287.

The release must be available upstream and work with the harness adapter.

Model and Effort

Set both model and effort to non-empty strings. Stitch does not check a model catalog or supported combinations. Claude Code reports unsupported values so you can correct the configuration.

Use effort: default to let the CLI choose. Other values are passed as --effort. See Claude Code effort levels.

Custom Microsoft Foundry deployment names are also supported with azure_foundry_api_key or azure_foundry_auth_token.

Authentication

Use exactly one auth method. Store the credential as a Stitch secret and reference it with secretName.

Auth methodCredentialRequired harness environment
claude_subscription_tokenClaude subscription tokenNone
anthropic_api_keyAnthropic API keyNone
aws_bedrock_api_keyAmazon Bedrock API key from the AWS consoleAWS_REGION or AWS_DEFAULT_REGION
gcp_application_credentialsGoogle Cloud service account JSON key with Vertex AI accessANTHROPIC_VERTEX_PROJECT_ID; optional CLOUD_ML_REGION
azure_foundry_api_keyAPI key from your Microsoft Foundry resourceANTHROPIC_FOUNDRY_RESOURCE or ANTHROPIC_FOUNDRY_BASE_URL
azure_foundry_auth_tokenMicrosoft Entra bearer token for your Foundry resourceANTHROPIC_FOUNDRY_RESOURCE or ANTHROPIC_FOUNDRY_BASE_URL

Renew subscription and Entra tokens before they expire.

Claude subscription authentication

Import a subscription token with stitch secrets import claude --name CLAUDE_SUBSCRIPTION, then reference it in your Claude harness:

stitch-factory.yaml
harnesses:
  - key: coding-agent
    name: Claude subscription
    type: claude_code
    model: claude-sonnet-4-6
    effort: default
    version: 2.1.287
    auth:
      - method: claude_subscription_token
        secretName: CLAUDE_SUBSCRIPTION

Subscription runs use the pinned official Claude CLI in headless mode inside the sandbox, with no additional SDK or JavaScript runtime requirement. API-key and cloud-provider authentication use the same CLI execution path. Use exactly one auth method; do not combine subscription auth with API keys, router endpoints, or cloud-provider settings.

Subscription-token runs draw from your Claude plan's usage limits, not API credits. To use separately claimed Max or Team API credits, use anthropic_api_key from the linked Console organization instead. No automatic billing fallback occurs.

On this page