Skip to content

Revisiting TOS Compliance: Replacing Agent SDK with Claude Code CLI #1224

Description

@kyuwoo-choi

Context

This is a follow-up to #64, which was closed with the conclusion that
nanoclaw's use of the Claude Agent SDK via subscription credentials was
a matter of individual risk judgement.

However, the situation has changed significantly since then.

What Changed

Shortly after that discussion, Anthropic explicitly clarified in their
official compliance documentation that using Claude Free/Pro/Max
subscription OAuth tokens with the Agent SDK — or any third-party tool —
is a violation of the Consumer Terms of Service:

OAuth authentication (used with Free, Pro, and Max plans) is intended exclusively for Claude Code and Claude.ai. Using OAuth tokens obtained through Claude Free, Pro, or Max accounts in any other product, tool, or service — including the Agent SDK — is not permitted and constitutes a violation of the Consumer Terms of Service.

References:

Proposal

Fortunately, nanoclaw's dependency on the Agent SDK appears to be quite
minimal — primarily centered around the query() call. This suggests
that replacing it with a direct claude CLI invocation (e.g., via
child_process or subprocess) could be a relatively contained change.

Claude Code CLI itself is an official Anthropic product, and using it
for local automation and agentic workflows — particularly when
authenticated via ANTHROPIC_API_KEY — appears to be within the
permitted use cases outlined in the documentation.

Questions for the Maintainer

  1. Is there an existing plan or roadmap item to migrate away from the
    Agent SDK toward direct Claude Code CLI invocation?
  2. Would a community contribution toward this migration be welcome?

Given the updated policy clarity, I think it's worth revisiting this
as a project priority rather than leaving it to individual users to
assess their own risk. Would love to hear the maintainer's thoughts.

Related issue: #64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions