Skip to content
Fluf
Beta

We are actively shipping every day for Fluf.

New things land daily and the product keeps getting better. Tell us what to fix or build next: we read every message.

Claude Code agents: subagents, agent teams and agents that stay

Claude Code agents come in three kinds: subagents, experimental agent teams and headless runs. How each works, where they stop, and how to make them persistent.

A waving blue Fluf between a rose Fluf and a sage Fluf, under a periwinkle sky.
On this page

Part of How Fluf runs Claude Code with your own login (2026 rules)

"Claude Code agents" means three different things in 2026. Subagents are Markdown files that give Claude a specialist to delegate to inside one session. Agent teams are an experimental mode where a lead session coordinates teammates that talk to each other. And headless runs (claude -p, GitHub Actions, cloud scheduled tasks) let Claude Code work with nobody at the keyboard. This guide explains each one with the exact files and flags, shows where each stops, and covers the piece Claude Code leaves to you: agents that keep a name, a memory and a schedule for months.

The three kinds of Claude Code agents

SubagentsAgent teamsHeadless and cloud runs
What it isA specialist Claude delegates toA lead session plus teammatesClaude Code with no one watching
Defined in.claude/agents/*.mdCLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1claude -p, Actions, cloud tasks
Own context windowYesYes, per teammateYes, per run
StatusStableExperimental, off by defaultCloud scheduled tasks in research preview
Lives beyond the sessionNoNoPer run

All three are good tools. None of them is an employee. Keep that distinction in mind; we come back to it.

How to create a Claude Code subagent

A subagent is a file. Put it in .claude/agents/ to share it with your repo (commit it), or in ~/.claude/agents/ to have it in every project. YAML frontmatter goes at the top, the system prompt below it. Per Anthropic's subagent docs, "Only name and description are required."

---
name: migration-reviewer
description: Reviews database migrations for locking, data loss and rollback safety. Use for any change under db/migrations.
tools: Read, Grep, Glob, Bash
model: opus
---

You review Postgres migrations. For each file, check:

1. Will it take a long lock on a large table?
2. Can it lose data? Is there a backfill?
3. Is there a working down migration?
   Reply with a verdict per file and the exact line to change.

What the fields do:

  • description is the routing rule. Claude reads it to decide when to delegate, so write it like a trigger, not a job title.
  • tools narrows access. Leave it out and the subagent inherits every tool available to subagents.
  • model takes sonnet, opus, haiku, fable, a full model ID such as claude-opus-5-5, or inherit. Put cheap work on haiku.

Each subagent "runs in its own context window with a custom system prompt, specific tool access, and independent permissions." That is the real benefit: a 4,000-line log search happens in the subagent's context and only the answer comes back to yours. Claude Code ships built-ins too, including Explore (fast, read-only codebase search) and Plan (gathers context in plan mode).

Subagents can also run in the background while you keep working.

20Subagents running at once per session, by default
1 hourShortest interval for a cloud scheduled task
30 daysBefore a recurring scheduled task expires

Figures from Anthropic's subagent and scheduled tasks docs, checked 27 November 2026.

Agent teams: when one lead is not enough

Agent teams go further. One session coordinates the work, assigns tasks and pulls the results together. "Teammates work independently, each in its own context window, and communicate directly with each other." Turn them on with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in your environment or settings.json.

Know the limits before you build on them:

  • Experimental and disabled by default.
  • Token heavy. Anthropic says teams "use significantly more tokens than a single session."
  • Interactive only. With -p, including Agent SDK sessions, "Claude doesn't spawn teammates."
  • Flat. No nested teams, one team per session, and /resume does not restore in-process teammates.

Use a team for work that splits cleanly: three modules reviewed in parallel, competing hypotheses for one bug. Do not use one for a sequence of steps that each depend on the last.

Running Claude Code agents without you

Three ways to get work done with nobody at the terminal:

Headless mode. claude -p "Find and fix the flaky test in checkout.spec.ts" runs once and exits. Add --output-format json for a result with the session ID, --resume <id> to continue it later, and --permission-prompts none for scheduled jobs where nobody can answer a prompt (headless docs).

GitHub Actions. anthropics/claude-code-action@v1 runs Claude Code inside your workflows, triggered by an @claude mention or on a schedule.

Cloud sessions and scheduled tasks. Cloud sessions run on Anthropic-managed machines and keep going after you close your laptop. Cloud scheduled tasks, formerly called routines, package a prompt, repositories and connectors to run on a schedule, an API call or a GitHub event. They are in research preview. Desktop scheduled tasks and /loop run on your own machine instead, which must stay on.

  1. 1SubagentOne specialist, one session
  2. 2Agent teamA lead plus teammates, experimental
  3. 3Headless runOne task, no one watching
  4. 4Persistent agentA name, a memory, a schedule

Where Claude Code agents stop

Claude Code is an excellent coding agent. Its agents still stop at the edge of a session or a task, by design:

  • Memory is files. CLAUDE.md holds what you write; auto memory holds notes Claude writes itself, loaded at the start of each session (the first 200 lines or 25 KB of MEMORY.md). Useful, but there is no screen to review one fact, see which agent learned it, and retract it (memory docs).
  • No standing identity. A subagent is a role, not a colleague. It has no inbox, no history of last week's work and no relationship with the rest of your business.
  • Schedules come with conditions. Cloud tasks run hourly at most and are in preview; recurring tasks expire after 30 days; local ones need an open machine.
  • Approvals live where the session lives. In a terminal, a permission prompt waits for whoever is watching.
  • One plan, shared limits. Pro and Max plans have "a five-hour session limit and a weekly limit," shared across Claude and Claude Code (Claude support). Ultra drops the five-hour limit but keeps a weekly one.

None of that is a flaw in Claude Code. It is a coding tool. An AI employee needs more around it.

Turn Claude Code into persistent agents with Fluf

Fluf is a desktop app for Mac, Windows and Linux where you hire AI agents that keep their name, memory and schedule. Point an agent at Claude Code and it thinks with the Claude Code you already installed, signed in with your own Claude Pro, Max or Ultra plan.

Every weekday at 07:30, review yesterday's merged migrations and flag anything risky.
Mara
Routine set for 07:30 Monday to Friday. I'll use the lock and rollback checklist you approved last week.
Thursday 07:30
Mara
2 migrations merged. 0004_add_index is fine. 0005 rewrites the orders table without a backfill: 1.2M rows, long lock.
Mara wants to open an issue"0005: add backfill before dropping orders.legacy_total"ApproveDecline

What you get on top of Claude Code:

  • A named agent with its own chat. Mara is Mara next month. Her conversation, results and decisions stay with her.
  • Memory you can read. Facts and decisions are scoped to one agent, a team, a business or you. Keep, edit or forget each one in the Library. See Memory.
  • Your Claude skills come with you. Import a Claude skill from the computer that runs your agents, or upload a SKILL.md, and Fluf turns it on for agents on any model (Skills).
  • Routines on your machine or server. Cron, webhooks, heartbeats every 10 minutes to 4 hours. Put them on an always-on server and they run with your laptop closed. See how to run AI agents 24/7.
  • Approvals anywhere. Risky steps arrive as a card in the agent's chat, on your phone, or in Telegram.
  • Limits handled. App settings › AI accounts shows each Claude Code login's usage windows and reset times. Add a second login on Pro, or let agents Continue on an API key when a window runs out, then switch back.
  • Effort and speed. Low to Max, plus Deep work and Ultrathink on newer models, and Fast on Opus models. See Models, effort and speed.
Choosing a Claude Code model for one Fluf agent in the model picker
One agent on Claude Code, another on an API key or a local model: each picks its own.

What Anthropic's terms allow

This matters more than any feature. Anthropic's legal and compliance page says third-party developers may not "offer Claude.ai login into their own applications, or to route requests through Free, Pro, Max, or Ultra plan credentials on behalf of their users," nor "collect, store, or intermediate Claude.ai credentials or session tokens." It also says this does not "prevent an end user from signing in to the unmodified Claude Code binary with their own Claude subscription, including where a platform hosts Claude Code."

Fluf stays on that line. It runs the unmodified Claude Code you installed. You sign in through Anthropic's own flow. Fluf never sees, stores or forwards your Claude credentials, and refuses a pasted Claude sign-in token. Usage is billed by Anthropic to you, and the plan's terms and limits apply. Fluf is not affiliated with Anthropic.

Which one to use

Use subagents for specialists inside your coding sessions: a migration reviewer, a test writer, a log searcher. Use agent teams when a task splits into parallel parts and the token bill is worth it. Use headless runs for one-shot jobs in CI. And when you want an agent that does the same job every morning, remembers what you corrected last week and asks you on your phone before it acts, run Claude Code inside Fluf. Comparing Anthropic's tool with OpenAI's? Read Claude Code vs Codex.

Download Fluf, connect the Claude Code you already have, and give your first agent a name and a morning routine.

Questions people ask

How do I create an agent in Claude Code?
Add a Markdown file to .claude/agents/ in your project, or ~/.claude/agents/ for every project. YAML frontmatter at the top needs a name and a description; tools and model are optional. The body is the subagent's system prompt, and Claude delegates to it when a task matches the description.
Can Claude Code run multiple agents at once?
Yes. Subagents can run in the background in parallel, and by default a session can hold 20 running subagents. Agent teams, where a lead session coordinates teammates that message each other, are experimental and turned on with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.
Do Claude Code agents remember things between sessions?
Through files. CLAUDE.md holds instructions you write, and auto memory holds notes Claude writes itself, loaded at the start of each session. There is no per-agent memory you can review and edit fact by fact; Fluf adds that on top of Claude Code.
Can I use my Claude subscription for Claude Code agents in another app?
Anthropic's terms allow an end user to sign in to the unmodified Claude Code binary with their own subscription, including where a platform hosts it. They do not allow third-party apps to offer Claude.ai login or route requests through your plan credentials. Fluf runs your installed Claude Code and you sign in through Anthropic's own flow.
Are Claude Code agent teams worth the cost?
For work that splits cleanly, such as parallel research or reviewing separate modules, often yes. Anthropic notes teams use significantly more tokens than a single session, and they do not run in headless mode, so keep single sessions or subagents for sequential work.

Sources

  1. Claude Code: Create custom subagents, checked 27 November 2026
  2. Claude Code: Agent teams, checked 27 November 2026
  3. Claude Code: Run Claude Code programmatically, checked 27 November 2026
  4. Claude Code: Scheduled tasks, checked 27 November 2026
  5. Claude Code: Memory, checked 27 November 2026
  6. Claude Code legal and compliance, checked 27 November 2026
  7. Use Claude Code with your Pro, Max, or Ultra plan, checked 27 November 2026

TopicsClaude codeClaudeDevelopersSubscriptions

    Search every docs page: setup, agents, models, memory, routines, chat apps and reference.