claudecode

package
v0.7.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package claudecode holds Claude Code's header rules. They are plain functions of the request headers, so any host (the proxy, the bifrost adapter, Cortex) can call them. agent/client calls them from Identify.

This is a library package. It never imports a host. imports_test.go enforces that.

Index

Constants

View Source
const AgentHeader = "x-claude-code-agent-id"

AgentHeader is the request header Claude Code names a subagent's thread with. Seen on the wire with Claude Code 2.1.294 through a custom ANTHROPIC_BASE_URL: present on every subagent request, absent on the main thread. The sibling headers its code also names (x-claude-code-parent-agent-id, -agent-type, -request-class) were NOT sent in that capture, so nothing here depends on them.

Variables

This section is empty.

Functions

func AgentID

func AgentID(h http.Header) string

AgentID is the raw AgentHeader value, trimmed: Claude Code's id for a subagent's thread. "" for the main thread, and for a nil header. The host validates it (thread.HeaderAgentID) before it uses it as a key.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL