AI News
All stories
Official

Claude Code 2.1.328 adds self-hosted runner options and orchestrator metrics

The release adds --repository-folder, --metadata and new orchestrator metrics for self-hosted runners, and makes gh api off by default there.

Products · · 2 min read

Anthropic's Claude Code 2.1.328, dated November 19, 2026, adds a set of options and orchestrator metrics for self-hosted runners. In that setup, a host the user controls starts Claude Code sessions. The release also changes the built-in gh api so that it is off by default wherever settings guard Claude's GitHub tools by name. The release notes say --use-anthropic-gh true turns that tool back on. The change is listed under Changed rather than Added, so existing setups that rely on the built-in gh api will need that flag to keep it.

The most concrete change concerns repository folders at --capacity 1. Until now, a session's working copy of a repository sat at its path under the runner's base folder. The new --repository-folder option lets an operator name that folder instead. The release notes point out that the path under the base folder can't be a symbolic link. The same release also makes a runner at --capacity 1 refuse a session earlier when the path of a repository it pushes to is a symbolic link.

Labelling is the second theme. The --metadata key=value option on claude --environment attaches a label to a session for the spawn-runner hook. --hook-label on claude self-hosted-runner orchestrator passes chosen session labels to the same hook. A related fix makes --correlation-id of claude --environment reach that hook, which had not been happening. The release notes don't say what spawn-runner does with the labels, so the options describe how data gets to the hook without showing what the hook does with it. The two session UUID variables, CLAUDE_RUNNER_SESSION_UUID and CLAUDE_CODE_REMOTE_SESSION_UUID, are now both set for the session and for its checkout, post-session and spawn-runner hooks.

On the operator side, the orchestrator gains two metrics on its /metrics endpoint. The first, claude_code_self_hosted_orchestrator_sessions_given_up_total, counts by cause how often Anthropic gave up starting a runner for a session. The second, claude_code_self_hosted_orchestrator_session_queue_wait_by_reason_seconds, records queue wait by reason. The release notes say its purpose is to let a re-opened session's wait be told apart from a new session's. The notes don't list the causes or reasons the metrics use.

A group of runner fixes is more specific than the feature list. A proxy or web filter that answered a poll with HTTP 200 and a body such as {} used to stop all running sessions. The runner now retries such a poll instead. After a temporary disk error, a start could delete a kept clone's objects or refs, and commits that existed only there. That start now fails instead. Runners on hosts with a slow or set-back clock were stopping when their token ran out. A runner that failed setup after registering now deregisters with a reason. The release also notes that on a dead disk a session's end can take 25 seconds longer by default, because the post-session hook is no longer skipped when a disk stalls.

The release is large overall, with 19 improvements and 91 bug fixes beyond the items above. Many of those concern desktop, terminal and Code Mode features rather than runners. The self-hosted changes are gathered under their own labels in the notes.

What changed

The built-in gh api is now off by default wherever settings guard Claude's GitHub tools by name, and --use-anthropic-gh true turns it back on.

Type: Breaking change · Applies to: Claude Code 2.1.328, gh api, --use-anthropic-gh, --repository-folder, --metadata, claude self-hosted-runner orchestrator

Why it matters

Operators running self-hosted Claude Code runners get new labels, metrics and a changed GitHub tool default that can affect how sessions reach GitHub. Teams with symlinked repository paths may see sessions refused sooner.

What you can do

Operators of self-hosted runners should check whether they rely on the built-in gh api and whether any repository paths at capacity 1 are symbolic links.

Original source

Where we saw it

1 source

Claude Code changelog

AI wrote this summary from the sources listed, and nobody reviewed it individually before publication. Check the original source before you rely on it. How it works