Spaces

How to run Claude Code on a schedule for a daily inbox sweep

A daily inbox sweep is a simple idea: at a set time each morning, an AI agent goes through every connected account, tells you what came in, drafts replies to the easy ones and lists the ones that need you. You start the day with a short report and a pile of drafts to approve, instead of six apps full of red dots. Claude Code is well suited to this, because it runs in your terminal and can be started by your computer's own scheduler without you opening it. This guide sets it up step by step with Spaces, keeps every reply as a draft until you approve it, and covers how often to run it and what to do when the computer is off.

What the sweep does

  1. Your computer starts Claude Code at the time you choose, such as 8am on weekdays.
  2. Claude Code reads your Spaces business brief, then goes through the chats on each connected account that are waiting for a reply.
  3. It drafts replies to the questions the brief covers. Because you have asked it to hold replies as drafts, nothing is sent.
  4. It tags or hands to a person anything that needs you, such as complaints or bookings it cannot see.
  5. It writes a short report to a file on your computer, and stops.
  6. Later, you open Claude Code and go through the drafts: approve, edit or reject each one.

This is different from an always-on agent that answers as messages arrive. A sweep runs once, does its job and stops. It is a gentle first step for owners who want help with the morning backlog without an agent replying to customers on its own.

What you need

  • Claude Code installed, on a computer that is on and awake at the time of the sweep.
  • A Spaces account with your chat accounts connected. Your trial starts when you connect a chat account, with no card needed.
  • Your business brief in Spaces, with prices, hours and when to hand a chat to you. Claude Code can help you write it.
  • A folder for the sweep, such as inbox-sweep in your home folder, to hold the instructions and the reports.
  • About half an hour, including a test run by hand.

Step 1: add Spaces to Claude Code

  1. Run the command below once. Add --scope user to use Spaces in every project.
  2. In Claude Code, type /mcp, pick spaces and sign in to Spaces in the browser.
  3. Approve the access Spaces asks for. No key is pasted anywhere.
claude mcp add --transport http spaces https://api.spacesos.com/mcp

To check it worked: Run claude mcp list. Spaces shows as connected, and /mcp lists its tools.

Add --scope user to the command if you want Spaces in every folder, which is simplest for a sweep. You sign in to Spaces in the browser, so Claude Code never sees your WhatsApp, Instagram or email logins.

Prefer an API key? Add it as a header instead of signing in. An unattended job sometimes runs more smoothly with a key, but keep it private: anyone with it can act like your agent.

Step 2: hold every reply as a draft

Before you schedule anything, open Claude Code in the sweep folder and ask it in plain words:

Ask Spaces to hold all replies and new chats as drafts until I approve them.

From then on, anything an agent tries to send waits as a draft. Nothing goes out until you approve it. This is what makes an unattended sweep safe to start with: the worst it can do is write a draft you do not like.

Step 3: write the sweep instructions

Save a file called sweep.md in the sweep folder. It is what Claude Code reads every morning. Here is an example to copy and change:

You are doing the morning inbox sweep for Fern & Field, a flower shop.
1. Read the Spaces business brief first, and follow it.
2. For each connected account, list the chats waiting for a reply since yesterday's sweep.
3. Draft a reply to every question the brief answers. Drafts are held for my approval.
4. Do not draft replies to complaints, refunds, wedding enquiries or anything not in the brief.
   Hand those chats to a person and list them under "Needs you".
5. Never start new conversations. Never retry a send Spaces refused.
6. Write a report to reports/YYYY-MM-DD.md with three lists:
   Drafted (who, what they asked, the draft), Needs you (who and why), Nothing to do.
7. Keep the report short. Then stop.

Keep the facts themselves in the business brief, not in this file. That way, the sweep and any other agent you use always work from the same prices and hours.

Step 4: try it by hand first

In a terminal, go to the sweep folder and run the sweep once yourself. Claude Code's print mode runs one request and exits, which is exactly what a scheduled job needs:

cd ~/inbox-sweep
claude -p "$(cat sweep.md)"

When it finishes, open the report and compare it with the apps on your phone. Did it find every waiting chat? Are the drafts right? Did it hand over the ones it should? Change the brief or sweep.md and run it again until you are happy. Claude Code may ask permission before using the Spaces tools the first time; when you schedule it, nobody is there to say yes, which is the next step.

Step 5: put it on a schedule

On a Mac or Linux computer, the built-in scheduler is cron. Open it with crontab -e and add one line. This one runs at 8am Monday to Saturday, lets Claude Code use the Spaces tools without asking, and keeps a log:

0 8 * * 1-6 cd ~/inbox-sweep && claude -p "$(cat sweep.md)" --allowedTools "mcp__spaces" >> sweep.log 2>&1

On Windows, Task Scheduler does the same job: create a basic task that runs at 8am and starts the same command in the sweep folder. Schedulers and Claude Code's options change from time to time, so if the job does not run, check sweep.log first, then Claude Code's own docs on running it without a prompt.

Allowing the Spaces tools without asking is safe here because of step 2. Even with permission to send, every reply waits as a draft until you approve it.

Step 6: review the drafts

When you sit down, open Claude Code and go through what the sweep left. Names and details are examples.

WhoMessage
You, to Claude CodeShow me this morning's report and the drafts waiting for approval.
Claude CodeSeven chats overnight. Five drafts are waiting: two delivery questions, a price question for a bouquet, opening hours on Sunday, and a thank-you. Two chats need you: a wedding enquiry from Hannah, and Mark says his flowers arrived wilted. Both are handed to a person.
YouChange the bouquet price to £40, it went up. Approve all five.
Claude CodeApproved four as written and one with the new price. They are going out now, paced by Spaces.
YouAnd update the brief: the medium bouquet is £40.
Claude CodeDone. Only the bouquet price was changed in the brief.

Five replies sent and one price fixed in a couple of minutes. The two chats that needed judgement are waiting for you, with nothing sent in them.

How often to sweep

Once each morning is the usual start. Some owners add a second sweep at lunchtime. There is little point going much beyond that: if you want replies as messages arrive, you want an always-on agent, not a sweep every few minutes.

Sweeping very often can also cause trouble. Every sweep reads your chats, and an agent that checks the inbox over and over looks like a bot to the platforms. Spaces answers most reads from its own copy of your messages and keeps the rest inside each channel's read limits, but a sweep a few times a day is the comfortable pattern. An always-on agent should wait for new messages with wait_for_events instead of sweeping.

When the computer is off

A scheduled job only runs if the computer is on and awake at that time. If your laptop is closed at 8am, the sweep is simply skipped. Either pick a time when the computer is reliably on, keep it plugged in and set not to sleep, or run the sweep on a small computer that stays on.

For customers who message overnight, a Spaces routine can send a set holding reply, such as "Thanks for your message, we reply from 9am". A routine runs on Spaces itself, so it works whether or not the sweep runs.

Letting the sweep send on its own

After a few weeks of good drafts, some owners want the sweep to send replies to the simplest questions without waiting. If you do, change only that: keep drafts for anything about money, bookings or complaints, and keep the "Needs you" list. Ask Claude Code to hold only posts and comments, or nothing, when you are ready, and turn drafts back on the moment something comes out wrong.

Common mistakes

  • Scheduling the sweep before turning on drafts.
  • Putting prices in sweep.md instead of the business brief, so they drift from what other agents say.
  • Running a sweep every few minutes in place of an always-on agent.
  • Never reading sweep.log, so a job that stopped working goes unnoticed for a week.
  • Letting the sweep start new conversations. Keep it to people who wrote in.
  • Pasting a Spaces key into a file that is shared or backed up somewhere public.

Summing up

A scheduled Claude Code sweep gives you a morning report and a set of drafts across every account connected to Spaces, without an agent replying to customers on its own. Add Spaces to Claude Code, ask it to hold replies as drafts, write a short sweep.md, try it by hand, then schedule it with cron or Task Scheduler. Review the drafts when you sit down, keep the brief current, and add a routine for overnight holding replies.

Pricing

Plans from $19 a month

FAQ

Do I need to know how to code?

No, but you need to be comfortable opening a terminal and pasting a few lines. Claude Code can help with each step if you ask it.

Will the sweep reply to customers on its own?

Not if you ask Spaces to hold replies as drafts first, as in step 2. Then nothing goes out until you approve it.

What if my computer is asleep at 8am?

The sweep does not run that day. Pick a time the computer is on, stop it sleeping, or use a small computer that stays on. A Spaces routine can cover overnight holding replies either way.

Can the sweep cover email as well as chats?

Yes, if your mailbox is connected to Spaces. Email works one thread at a time, and Spaces can also save an email as a draft for you to check and send yourself.

How is this different from an always-on agent?

A sweep runs at set times and stops. An always-on agent keeps running and answers as messages arrive. A sweep is gentler and suits owners who want help with the backlog, not round-the-clock replies.

Can I use Codex instead of Claude Code?

Codex is OpenAI's coding agent in the terminal and also works with Spaces. The idea is the same, but the command for running it from a scheduler is different, so check Codex's own docs.

Is it safe to let Claude Code use the Spaces tools without asking?

With drafts held for approval, yes for a sweep, because nothing is sent until you approve it. Spaces' account limits and pause switch apply on top.

Where do I see what the sweep did?

In the report file it writes, in sweep.log, and in Your agent in the Spaces dashboard, which shows what each agent did lately.

Related

More articles

AI agentsSigns your AI agent is sending too much, and how to rein it in11 Nov 2026 · 8 min readAI agentsWhat is an always-on AI agent?11 Nov 2026 · 10 min readAI agentsWhat is a draft-only reply?11 Nov 2026 · 8 min read