<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Adrian Issac</title>
    <description>The latest articles on DEV Community by Adrian Issac (@adrian_issac_7bb3d453abc6).</description>
    <link>https://dev.to/adrian_issac_7bb3d453abc6</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3392285%2Ff75c0b80-c73c-4d60-a43b-a798c0181acd.jpg</url>
      <title>DEV Community: Adrian Issac</title>
      <link>https://dev.to/adrian_issac_7bb3d453abc6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adrian_issac_7bb3d453abc6"/>
    <language>en</language>
    <item>
      <title>I turned a Claude Code session into a local Anthropic-compatible API</title>
      <dc:creator>Adrian Issac</dc:creator>
      <pubDate>Sun, 25 Oct 2026 18:04:44 +0000</pubDate>
      <link>https://dev.to/adrian_issac_7bb3d453abc6/i-turned-a-claude-code-session-into-a-local-anthropic-compatible-api-5f61</link>
      <guid>https://dev.to/adrian_issac_7bb3d453abc6/i-turned-a-claude-code-session-into-a-local-anthropic-compatible-api-5f61</guid>
      <description>&lt;p&gt;I wanted tools like LiteLLM and Hermes Agent to talk to my Claude Code session as if it were a normal Anthropic API. So I built ccapi.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdaw6rlnrndg51kzxj6xe.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdaw6rlnrndg51kzxj6xe.gif" alt=" " width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;ccapi exposes &lt;code&gt;/v1/messages&lt;/code&gt; on localhost. Any client that speaks the Anthropic Messages API (the Anthropic SDK, LiteLLM, Hermes Agent) can point at it. Streaming, tool calls, images, PDFs and thinking come through.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Two Claude Code mods plus a small Bun server.&lt;/li&gt;
&lt;li&gt;Each incoming request runs as a Claude Code subagent.&lt;/li&gt;
&lt;li&gt;Client tools are registered as native Claude Code tools. When the client sends back a tool result, it resumes the same subagent.&lt;/li&gt;
&lt;li&gt;A systemd user unit keeps the tmux session alive for 24/7 use.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The Claude Code mods API is early access, so anything can change.&lt;/li&gt;
&lt;li&gt;Keeping it up 24/7 needed a supervisor that restarts the session when it dies.&lt;/li&gt;
&lt;li&gt;Tool calls are the hard part: parked calls need deadlines and slot cleanup, or failures leak sessions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;max_tokens&lt;/code&gt; is approximate; &lt;code&gt;temperature&lt;/code&gt;, &lt;code&gt;top_p&lt;/code&gt; and &lt;code&gt;top_k&lt;/code&gt; are ignored.&lt;/li&gt;
&lt;li&gt;If the server restarts, native continuation is lost and history is rendered as text.&lt;/li&gt;
&lt;li&gt;The system prompt always starts with the Agent SDK line.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Important caveat
&lt;/h2&gt;

&lt;p&gt;This is a personal experiment, localhost only. Anthropic's terms do not allow routing third-party traffic through Free/Pro/Max plan credentials, so please do not expose or share it. ccapi never touches your OAuth token; it only uses Claude Code primitives (subagents, plugin tools, hooks).&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/S-kkipie/ccapi" rel="noopener noreferrer"&gt;https://github.com/S-kkipie/ccapi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback welcome, especially on the subagent-per-request design.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>llm</category>
      <category>claude</category>
    </item>
  </channel>
</rss>
