---
title: 'Running your own Claude subscription unattended'
url: 'https://www.dealmobile.co.uk/writing/running-your-own-claude-subscription-unattended'
type: Post
published: '2026-10-25'
summary: 'Mullet 2 drives your own claude -p, touches no credentials, pauses at usage limits, and reads usage from the statusline. Plus an API key trap worth knowing.'
---

# Running your own Claude subscription unattended

Published 2026-10-25

![A two-column list of what Mullet does with claude -p: the worker is your own, Claude credentials are never read, ANTHROPIC_API_KEY is left out unless --billing api, one Claude worker runs at a time, it pauses and resumes at a usage limit, and usage figures come from the statusline.](https://www.dealmobile.co.uk/sites/default/files/styles/almanac_shot_md/public/content/images/posts/running-your-own-claude-subscription-unattended/hero.png.webp?itok=uLSv9dyu)

[Mullet 2](https://www.dealmobile.co.uk/writing/mullet-2-coding-jobs-you-can-leave-running.md) needs something to do the actual coding. The worker is your own `claude -p`: Claude Code in print mode, the command you already have, logged in as you. This post is about what that choice means, and one trap in it.

I am describing what Mullet does, not what anyone’s terms allow. Check Anthropic’s current terms for your own use.

## What it does and does not touch

Mullet starts the installed, unmodified `claude` command with your own login. It never reads, stores or passes Claude credentials. It never uses the Agent SDK with subscription login.

That is the whole integration. No token is copied, no session is borrowed, and no login is replayed from somewhere else. If `claude -p` works in your terminal, it works for Mullet. If it does not, Mullet cannot fix that.

The older Mullet was not so clean. Its HUD read Claude Code’s OAuth token to ask Anthropic’s usage API for my limits. That code is gone, and I explain what replaced it below.

## The ANTHROPIC\_API\_KEY trap

In `-p` mode, an `ANTHROPIC_API_KEY` in the environment silently replaces subscription login. The run is then billed per token. Nothing warns you at the time. The job works, and you find out when the bill arrives.

For a tool that runs overnight, that is a nasty surprise. So:

- Mullet leaves `ANTHROPIC_API_KEY` out of the worker’s environment, unless a job was planned with `--billing api`.
- `mullet doctor` warns when the variable is set in your shell.

An API-key mode exists, and it is explicit. You choose it when you plan the job, with `--billing api`. You do not get it by accident because a key was lying around in `~/.zshrc`.

A related habit: provider keys for Mullet go in `~/.config/mullet/.env`, not in your shell profile. Mullet also no longer reads keys from the working directory, which is how the old opencode run got handed a repo’s `.env`.

## One worker at a time

Every job shares one subscription’s quota. So Mullet runs one Claude worker at a time across all jobs, not one per job. Two jobs started together queue behind each other. Workers on other providers don’t use the subscription, so they have three slots of their own.

That is slower than running them side by side. It is also predictable. My interactive Claude Code sessions draw on the same quota, so a job running four workers at once would starve them.

## Pausing at usage limits

Usage limits apply as normal. The worker’s own output stream reports how much of each window has been used. When a window passes 95%, or Claude Code reports that the limit has been hit, the job pauses until the reset time and then carries on. A pause does not count as an attempt, and neither does an executor crash. A node has 3 attempts for real failures, and a limit is not a failure.

This is what makes unattended running practical on a subscription. I can start a large job in the evening, and if the five-hour window runs out in the middle, the job waits and finishes after the reset.

## Usage figures without the OAuth token

I still want to see how much of my allowance is left. The old HUD got that by reading Claude Code’s OAuth token and calling Anthropic’s usage API. I did not want a tool of mine holding that token.

Claude Code already passes its rate limits to the statusline command on every tick. So Mullet’s statusline, `mullet-hud`, records those figures, and everything else in Mullet reads them back from the record. No token, no extra API call, and the numbers come from the same place Claude Code itself uses.

The catch is that the figures are only as fresh as the last statusline tick, so with no Claude Code session open there is nothing new to record. Jobs don’t depend on them: the runner reads the limits from the worker’s own output stream.

## Why not just use the API

I could have used an API key and per-token billing, and Mullet supports it. I don’t, because of what it would cost. At the volume I use Claude Code, paying per token would cost far more than the subscription, more than I could afford. The trade is that a subscription has windows and limits. Pausing and resuming is how Mullet lives with them, rather than failing a job because the window closed at 2am.

## Setting it up

```
mullet doctor
mullet setup-claude

```

`doctor` checks Claude Code, bubblewrap, socat and a stray `ANTHROPIC_API_KEY`. `setup-claude` registers the MCP server and skills, and `--uninstall` reverses it. Hooks stay off unless you ask for them.

## What I have not said

I have not said that any particular way of using a subscription is allowed or not. Mullet drives the command Anthropic ships, with your login, within the limits it reports. Whether that suits how you use your plan is for you to check.

The code is at <https://github.com/tomgould/mullet-public>.

- **Products:** [Mullet](https://www.dealmobile.co.uk/products/mullet.md)
- **Tags:** [Python](https://www.dealmobile.co.uk/writing/tag/python.md), [AI](https://www.dealmobile.co.uk/writing/tag/ai.md), [Security](https://www.dealmobile.co.uk/writing/tag/security.md)

---

Index of this site: [llms.txt](https://www.dealmobile.co.uk/llms.txt)
