WORKFLOW

Let your coding agents work while you watch, chat or play

How to let Claude Code and Codex work in the background while you do something else, and still notice every prompt, finished task and usage warning.

Short answer

You do not need to stare at the terminal while Claude Code or Codex works. Turn on desktop notifications for permission prompts and finished tasks, keep an eye on your usage window, and review the agent's work in batches instead of line by line as it happens.

Claude Code and Codex can work for minutes at a time without you, so watching every line scroll by is mostly wasted attention. The useful setup is the opposite: give the agent a clear task, go do something else, and make sure your Mac tells you the moment the agent needs a decision or has finished.

This article covers the practical side: what to set up so you notice the right events, how to review work in batches, and which few things still deserve your eyes while the agent runs.

Why stop watching the terminal?

Watching a coding agent work rarely improves the result. Most of what scrolls past is file reads, searches and test output that you will judge better at the end, from the diff, than in real time.

What actually needs you is narrow:

  • A permission prompt, where the agent is blocked until you answer.
  • A finished task, which you should review before starting the next one.
  • A usage limit getting close, which can stop a long task halfway.
  • The rare moment the agent heads in the wrong direction.

If your setup surfaces the first three reliably, you can spend the waiting time on a video, a conversation, a game or another piece of work, and come back only when it matters. The fourth is what batched review is for.

How do I get notified when Claude Code needs me?

Claude Code fires a notification event when it finishes a task or pauses on a permission prompt while you appear to be away from the terminal. What you actually see depends on your terminal, according to the terminal configuration docs:

TerminalDefault behavior
Ghostty, Kitty, iTerm2Desktop notification (iTerm2 needs its alert settings turned on)
Apple TerminalA bell character at most, silent unless you enable Audible bell
Other terminalsNothing

If your terminal is in the "nothing" row, set preferredNotifChannel to terminal_bell so Claude Code always sends a bell:

{
  "preferredNotifChannel": "terminal_bell"
}

For a real macOS banner in any terminal, add a Notification hook. This is the example from the official hooks guide, placed in ~/.claude/settings.json:

{
  "hooks": {
    "Notification": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Claude Code needs your attention\" with title \"Claude Code\"'"
          }
        ]
      }
    ]
  }
}

Hooks run alongside the built-in notification, they do not replace it. If you run Claude Code inside tmux, add set -g allow-passthrough on to ~/.tmux.conf so notifications reach the outer terminal. The Claude Code notifications guide covers each terminal in more detail.

How do I get notified when Codex finishes?

Codex has two mechanisms, documented in its advanced configuration page. The TUI has built-in notifications under tui.notifications, which can filter on events such as agent-turn-complete and approval-requested. Separately, the notify key runs an external program when a turn completes:

notify = ["python3", "/path/to/notify.py"]

The program receives a JSON argument with the thread, the working directory and the last assistant message, so it can show a useful banner. Codex reads notify only from your user-level ~/.codex/config.toml, not from a project config. See Codex notifications for a full walkthrough.

Why do usage limits matter when you step away?

A long task that hits a usage limit stops, and if you are not watching, you lose the time until you notice. Subscription plans use rolling windows and weekly caps, so the question is not only "how much is left" but "when does it reset".

In Claude Code, /usage shows plan usage bars for subscribers. In Codex CLI, /usage shows account token usage and rate-limit resets. Check before you start a big task, not after. The guides on Claude Code usage limits and Codex usage limits explain how the windows work without quoting numbers that change.

A simple habit: if you are below roughly a fifth of your window, give the agent a smaller task or wait for the reset, rather than starting something that will stop halfway.

How do I review agent work in batches?

Batched review means you judge finished units of work, not each step. It is faster and usually catches more, because you see the change as a whole.

  1. Give tasks with a clear end. "Add input validation to the signup form and its tests" ends somewhere. "Improve the codebase" does not.
  2. Ask for a short summary at the end. One paragraph on what changed and what was not done is enough.
  3. Read the diff, not the transcript. git diff or your editor's source control view tells you what actually changed.
  4. Run the tests yourself before you accept the work, even if the agent says they pass.
  5. Commit or discard per task. Small commits make it cheap to throw away a bad attempt.

If you run several agents at once, give each one its own git worktree so their changes never collide. Claude Code can start in an isolated worktree with claude --worktree <name>. The guide on running multiple Claude Code sessions covers this setup.

What should you still keep an eye on?

Stepping away does not mean switching off judgment. Four things deserve attention even in a relaxed setup.

Permission prompts you do not recognize. If the agent asks to run something you did not expect, such as a network call, a write outside the project, or a git push, read it fully before answering. That prompt is your main defense against mistakes and prompt injection.

Your permission mode. Recent Claude Code versions start interactive sessions in auto mode, where a classifier model reviews actions instead of you and only some actions still ask. That is fine for many tasks, but know which mode you are in before you walk away. Shift+Tab cycles modes in the CLI, and the permission modes guide explains each one.

Long silences. An agent that has been "working" for a long time with no output may be stuck in a loop or waiting on a slow command. A quick look costs little.

Usage. A runaway loop spends your window quickly. Glance at usage when you come back.

Do not solve prompt fatigue by turning off prompts entirely. Skipping permissions on your main machine trades a few seconds of attention for real risk; the article on auto-approve risks explains why.

A setup that works

Here is a practical checklist for a background workflow:

  • Notifications for permission prompts and finished tasks, tested once by switching away from the terminal.
  • Allow rules for commands you approve every time, such as your test runner, so prompts only appear for decisions that matter. See how to allow commands in Claude Code.
  • Deny rules for secrets such as .env files.
  • One worktree per parallel agent.
  • A usage check before long tasks.
  • A batched review at the end of each task: summary, diff, tests, commit.

With that in place, a typical afternoon looks like this: start two agents on two well-scoped tasks, put on a video, answer the two or three prompts that come up, and review both diffs when the done notifications arrive.

Answering from the menu bar

The setup above works with plain terminal tools, but the information is scattered: notifications in one place, sessions in several terminal tabs, usage in a slash command. Allowbar is a macOS menu bar app built for exactly this workflow, for people who run Claude Code and Codex.

When an agent asks to run a command or edit a file, a Dynamic Island style panel slides down from the top of the screen with the project, the tool and the exact command. You answer with Allow, Block, or Terminal to send the question back to the terminal. If you do not answer before the countdown ring runs out, the question goes back to the terminal. Allowbar never approves anything on its own: there is no auto approval, and a missing answer is never treated as approval. Commands your own allow rules already cover do not show up at all.

It also lists every Claude Code and Codex session with its state (working, waiting for you, done), with the ones waiting on you at the top, and clicking one opens its terminal tab. You get a done notification when a task finishes, and Claude, Codex and Cursor usage in one place with the next reset time. The island warns when you drop below 50% and below 20% remaining, and when a limit resets. An activity log turns each message you send into a task with the commands run, files edited and permissions answered underneath, and it stays on your Mac.

Allowbar connects through the agents' own hooks and sends nothing to a cloud service. It is Mac only (macOS 14 or later) and supports Claude Code and Codex. Allowbar is in private beta. Join the waitlist; the launch price is $9.99 instead of $29.90.

Sources:

Frequently asked questions

Can Claude Code run in the background while I do something else?

Yes. Claude Code keeps working in its terminal while you use other apps, and it fires a notification event when it finishes or needs a permission answer. Make sure your terminal or a Notification hook turns that event into something you will actually see or hear.

Why am I not getting Claude Code notifications on my Mac?

Only Ghostty, Kitty and iTerm2 get desktop notifications by default, and iTerm2 needs its alert settings enabled. In Apple Terminal and other terminals, set preferredNotifChannel to terminal_bell or add a Notification hook. Inside tmux, also enable allow-passthrough.

How do I get a notification when Codex finishes a task?

Enable the TUI notifications under tui.notifications in ~/.codex/config.toml, or set the notify key to a program that runs on agent-turn-complete. The notify key only works from your user-level config.

Is it safe to leave a coding agent running unattended?

It is reasonably safe if the agent still has to ask before risky actions, secrets are behind deny rules, and you review the diff before committing. It is not safe to skip permissions entirely on a machine with your credentials and personal files.

How do I avoid hitting my usage limit in the middle of a task?

Check /usage in Claude Code or Codex before starting a long task, and note when the window resets. If little is left, give the agent a smaller task or wait for the reset.

ALLOWBAR FOR MAC

Answer your agents from the menu bar.

Permission requests from Claude Code and Codex slide down from the top of your screen. Allow, Block or send back to the terminal. Allowbar never approves anything on its own.

Launch price $9.99 instead of $29.90, one-time purchase, lifetime license.