Skip to content

[Impact]: Claude Code -p (headless) usage not covered by subscription — affects all daemon tasks #2563

Description

@stone16

Summary

Multica's daemon invokes Claude Code exclusively via claude -p (non-interactive/headless mode) for all task execution. Anthropic has announced that starting June 15, 2026, claude -p and Agent SDK usage will be billed from a separate "Agent SDK credit" pool — no longer covered by interactive Pro/Max subscription quotas.

This means every daemon-driven Claude task in Multica bypasses the user's subscription, regardless of their plan tier.

Technical Context

In server/pkg/agent/claude.go:417-418, the daemon hardcodes -p as a mandatory flag:

args := []string{
    "-p",
    // ...
}

This flag is also listed in claudeBlockedArgs (line 409) as blockedStandalone, preventing users from overriding it via custom_args. This is by design — without -p, Claude doesn't produce the JSON stdio stream the daemon relies on for message parsing.

Similarly, --append-system-prompt (line 432) is used for system prompt injection, which also operates within the headless execution path.

Anthropic Policy Timeline

Date Change
Already happened Max subscriber billed $1,800+ in 2 days via claude -p
Already happened Third-party tools (OpenClaw etc.) cut off from subscription coverage
June 15, 2026 claude -p / Agent SDK usage moves to separate "Agent SDK credit" pool

Impact on Multica Users

1. Cost Surprise

Users with Max subscriptions ($100-200/mo) may assume daemon tasks are covered. They are not — tasks consume API credits or Agent SDK credits separately. No in-product warning exists today.

2. Quota Exhaustion

The Agent SDK credit pool has its own limits. Teams running multiple concurrent daemon tasks (Multica supports up to 20 concurrent tasks) will hit this ceiling faster than expected.

3. Architectural Lock-in

-p is not optional for the daemon — it's the only way to get structured JSON output from Claude Code CLI. There is no alternative invocation mode that both (a) produces streaming JSON and (b) counts as "interactive" subscription usage.

4. Credential Path Confusion

The daemon injects MULTICA_TOKEN and potentially ANTHROPIC_API_KEY into the agent environment (daemon.go:2060-2089). Users may not understand which credential path is active and how it affects billing.

Suggested Actions

  • Documentation: Clearly document that daemon Claude tasks use API/Agent SDK credits, not subscription quota
  • In-product warning: Surface billing mode (subscription vs API key vs Agent SDK credit) in runtime settings UI
  • Usage tracking: Expose per-task token cost in the task result UI (daemon already reports TaskUsageEntry)
  • Evaluate alternatives: Monitor Anthropic's roadmap for a subscription-compatible headless mode; if one appears, evaluate adopting it
  • API key guidance: Provide clear onboarding guidance for users to set up API keys with spending limits

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions