# @tanstack/ai-claude-code

> Claude Code harness adapter for TanStack AI — run Claude Code as a chat backend with local tool execution and stateful sessions.

Latest version **1.0.3** (published 2026-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tanstack/ai-claude-code
pnpm add @tanstack/ai-claude-code
yarn add @tanstack/ai-claude-code
bun add @tanstack/ai-claude-code
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2026-11-19 |
| First published | 2026-06-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 243.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3322 |
| Maintainers | tannerlinsley, alemtuzlak, kevinvandy |
| Keywords | ai, ai-sdk, typescript, tanstack, anthropic, claude, claude-code, harness, agent, adapter, chat, tool-calling |

## Links

- npm: https://www.npmjs.com/package/@tanstack/ai-claude-code
- Repository: https://github.com/TanStack/ai
- npm.io page: https://npm.io/package/@tanstack/ai-claude-code

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2026-11-19
- 1.0.2 — 2026-11-12
- 1.0.1 — 2026-11-04
- 1.0.0 — 2026-10-22
- 0.9.2 — 2026-10-21
- 0.9.1 — 2026-10-19
- 0.9.0 — 2026-10-13
- 0.8.1 — 2026-10-09
- 0.8.0 — 2026-10-09
- 0.7.4 — 2026-10-08
- 0.7.3 — 2026-10-06
- 0.7.2 — 2026-10-02
- 0.7.1 — 2026-09-27
- 0.6.12 — 2026-09-24
- 0.6.10 — 2026-09-24
- … 22 more at https://npm.io/package/@tanstack/ai-claude-code/versions

## README

<div align="center">
  <picture>
    <source
      media="(prefers-color-scheme: dark)"
      srcset="https://tanstack.com/api/readme/ai.png?theme=dark"
    />
    <source
      media="(prefers-color-scheme: light)"
      srcset="https://tanstack.com/api/readme/ai.png"
    />
    <img
      src="https://tanstack.com/api/readme/ai.png"
      alt="TanStack AI"
      width="900"
    />
  </picture>
</div>

<br />

# @tanstack/ai-claude-code

Claude Code harness adapter for [TanStack AI](https://tanstack.com/ai) — run [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (via `@anthropic-ai/claude-agent-sdk`) as a chat backend with local tool execution, stateful coding sessions, and TanStack tool bridging.

```typescript
import { chat } from '@tanstack/ai'
import { claudeCodeText } from '@tanstack/ai-claude-code'

const stream = chat({
  adapter: claudeCodeText('claude-opus-4-8', {
    cwd: '/path/to/project',
    permissionMode: 'acceptEdits',
  }),
  messages: [{ role: 'user', content: 'Fix the failing test.' }],
  threadId: 'thread-1',
})
```

Server-only (Node). See the [Claude Code adapter docs](https://tanstack.com/ai/latest/docs/adapters/claude-code) for sessions, tool bridging, permissions, and limitations.

---
_Source: https://npm.io/package/@tanstack/ai-claude-code · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
