fix(claude): support penstock run-token auth - #450
Merged
Conversation
Co-Authored-By: Paperclip <noreply@paperclip.ing>
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thinking Path
Linked Issues or Issue Description
What happened?
The Claude adapter run-token auth shim introduced for ccrotate only recognized Anthropic base URLs containing
ccrotate. If the Anthropic proxy path transitions tohttps://paperclip.blockcast.net/penstockor apenstock.*hostname, the adapter would not mirrorPAPERCLIP_API_KEYintoANTHROPIC_AUTH_TOKEN/ANTHROPIC_API_KEYunless the agent explicitly configured those env vars.Expected behavior
Claude runs should use the short-lived Paperclip run JWT for Paperclip-hosted Anthropic proxy routes, including both the current ccrotate route and the planned penstock route, while still preserving explicit agent-configured Anthropic auth.
Steps to reproduce
ANTHROPIC_BASE_URL=https://paperclip.blockcast.net/penstockand no explicit Anthropic auth env vars.ANTHROPIC_AUTH_TOKEN/ANTHROPIC_API_KEYvalues.Paperclip version or commit
Regression risk introduced by
50bde90d252fc678982f74f4e11a408c7fdf3d5bbefore any penstock route rollout.Deployment mode
Self-hosted Kubernetes server using the Claude local/k8s adapter.
What Changed
ccrotateandpenstock.Verification
pnpm exec vitest run packages/adapters/claude-local/src/server/execute.remote.test.tspnpm --filter @paperclipai/adapter-claude-local typecheckgit diff --checkRisks
Low risk. The behavior is still limited to Anthropic base URLs containing one of the explicit proxy markers and only when a Paperclip run JWT exists. Explicit agent-configured Anthropic auth remains preserved.
Model Used
OpenAI GPT-5 via Codex coding agent, with shell, Kubernetes, and GitHub tool use.
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template