AI agents & limits

What PeekyMac changes on your Mac

  • Reads, never writes, your agent logs. Sessions, tokens and limits come from Claude Code and Codex logs already on your Mac (~/.claude/projects, ~/.codex/sessions). Nothing is uploaded.
  • Uses the sign-in you already have. To check your limits it asks Anthropic and OpenAI with the login Claude Code and Codex saved on your Mac. It is never sent to PeekyMac.
  • Answering prompts is opt-in. Only if you turn it on, PeekyMac adds one hook to ~/.claude/settings.json (and ~/.codex/hooks.json for Codex), after saving a backup next to it. Turning it off or quitting PeekyMac removes it. Codex only trusts it when you press Trust in Codex.
  • Never adds MCP servers, changes your other agent settings, or sends your prompts or transcripts to PeekyMac.
AI AGENTS · HELP GUIDE

AI agents & limits

See how much of your Claude Code, Codex, Cursor and Vercel AI Gateway limits are left, follow your Claude Code sessions, and get a heads-up before you run out.

Connect your providers

Click PeekyMac’s eyes in the menu bar and choose AI limits. On the Limits tab, each provider has a card:

  • Claude Code: choose Connect. macOS asks once whether PeekyMac may use Claude Code’s login; choose Always Allow. PeekyMac never refreshes or changes that login.
  • Codex: nothing to connect. Limits come from the Codex CLI, or from recent Codex session logs.
  • Cursor (experimental): choose Connect while the Cursor app is signed in.
  • Vercel AI Gateway: paste an AI Gateway API key, or try your Vercel CLI login.
  • DeepSeek: paste a DeepSeek API key. DeepSeek reports only your balance, so the card measures it against your balance after your last top-up.
  • Kimi: paste a Moonshot API key. Like DeepSeek, the card measures your balance against your balance after your last top-up.
  • OpenRouter: paste an OpenRouter API key to see credits left across every model you use through it. If the key can’t read account credits, the card shows that key’s own limit.

Keys you paste are stored in PeekyMac’s own keychain items on this Mac. Disconnect deletes them.

When Claude Code renews its login, macOS stops letting PeekyMac read it until you allow it again. PeekyMac never asks in the background: the card says Claude Code renewed its login and shows Reconnect; click it and choose Always Allow.

If a card shows an error, fix what it says and choose Retry. Choose Pause at the bottom of a card to freeze its numbers and stop checking until you resume.

Read a provider card

For Gemini desktop, grant PeekyMac Accessibility access and open Gemini → Settings → Usage limits. PeekyMac reads the current and weekly percentages from that screen; it does not include API usage or show reset times. The card is experimental and depends on Gemini’s English interface.

The large number is the limit closest to running out. The bar fills as you use it, and the tick shows how much of the time window has passed. Ahead of the tick means you’re using it faster than the clock.

  • On track: at least 30% left and no more than 5 points ahead of the clock.
  • Burning fast: under 30% left, or more than 5 points ahead. Balances say running low.
  • Running out: under 15% left, or more than 20 points ahead.

“At this pace, runs out…” appears when your current pace would use a limit up before it resets; otherwise the card says it lasts until reset. Switch between Left and Used at the top. In Settings → Limits you can pick each provider’s main limit (for example 5-hour or Weekly instead of automatic), hide the other limits, and show balances as money left instead of a percent. Data older than 3 hours is marked stale.

Claude Code and Codex cards also show the model and effort you’re using, read from your latest session, or your default marked “(default)”. When a limit is burning fast or running out, Slow the burn suggests ways to make it last: a lighter model for routine work, lower effort, a fresh session with /clear or /new, another tool that still has room, or waiting for a reset that’s close.

Switch accounts without signing out (experimental)

Turn on Quick switch accounts under the account list on the Claude Code or Codex card. PeekyMac then keeps a copy of each login you use in its own keychain items on this Mac (never in a file), and a Switch button appears on each saved account. Switching saves the current login first, then puts the other one in place, so new sessions use it; sessions already running keep their account until you restart them. To add an account, choose Add another account: PeekyMac saves the current login and opens Terminal so you can sign in to the other one (in Claude Code, type /login). PeekyMac never renews a login itself. If a saved login stops working, for example because that account signed in somewhere else, sign in once the usual way and PeekyMac saves the fresh one. This depends on how Claude Code and Codex store their logins, which could change, so it is off until you turn it on.

Which session is using the limit

Claude Code’s and Codex’s 5-hour limits belong to your account, so every session and worktree draws from the same pool, and the big number on the card is that shared limit. Under it, This 5-hour window by session splits the current window by session, labelled with the folder the session started in and its git branch, with each one’s estimated part of the limit (weighted by what its tokens cost) and when it was last active. It appears once two or more sessions have used the window, and folds like the other lists.

More than one subscription

If you switch between Claude or Codex accounts (for example with cswap, or by signing in to another account), PeekyMac notices within about 30 seconds and shows the new account’s limits. Once it has seen two or more accounts, the card lists them all under Your Claude Code accounts or Your Codex accounts: the active one is read live, and the others show their numbers from when you last used them. If a window’s reset time has passed since then, it shows as full again, so you can see at a glance which account has room. Click the heading to fold the list; folded, it names the account with the most room right now. Any provider card folds the same way from its header, keeping its status. Right-click an account and choose Forget This Account to remove it. PeekyMac reads only the account id, email and plan from each tool’s account file, never its sign-in tokens.

Menu bar percent and Pal

In the hub, click the gear to open Settings, then under Menu bar choose Tightest limit or one provider to show its percent next to PeekyMac’s eyes. The icon is that provider’s own symbol, so you can tell which limit you’re looking at; with Tightest limit it follows whichever is closest to running out. Under Show, pick Main (the provider’s main limit), 5-hour, Weekly or Both; Both shows the two side by side, like “5h 21% W 64%”. Each number turns orange or red as its limit gets tight. Click it to open the hub.

With Pal on screen, Pal says when a limit drops past 90%, 75%, 50%, 25% and 10% left, once per step each window, for example “Claude Code: 48% of your 5-hour limit left · burning fast.” PeekyMac’s eyes react too: surprised when something needs you, alert when a limit burns fast, sleepy when one is used up; your own mood comes back afterwards. Turn either off in the hub’s Settings under Pal and eyes.

Claude Code, Codex, Grok and Antigravity sessions

With Accessibility access, the currently visible Gemini desktop conversation appears separately in Sessions, with a working indicator while a response is in progress. Click it to open Gemini. Conversation history and timestamps are not available there.

The Sessions tab lists Claude Code, Codex, Grok CLI and Antigravity sessions on this Mac in three groups: Needs you, Running and the last 24 hours. Each row shows the tool’s badge with a status dot, the project, branch and model in use, and how long ago it last moved. Sessions started in temporary folders are hidden. The list covers the last 7 days; choose Show older (30 days) at the bottom to see and resume earlier sessions. Codex sessions show the thread name from the Codex app; because Codex runs as one shared background process, a Codex session counts as working while a task is in progress, idle for three hours after its last activity, then ended. Grok and Antigravity sessions are judged the same way, using what each tool records. Copy resume command gives codex resume for Codex, grok --resume for Grok, and opens the project in Antigravity for Antigravity sessions. Grok also appears in Today with the cost Grok itself records. Everything is read from files on your Mac. Choose Browse all… under the list, or Open in Session Browser on a session, to open the Session Browser: every Claude Code, Codex, Grok, Cursor (beta) and Antigravity (best effort) session of any age, grouped by project, with search. Read the whole conversation with tool calls you can expand, find words with next and previous match, see full token totals and an API-price estimate, and export the session as a PDF, Word document, Markdown or web page (optionally without tool calls). Exports stay on your Mac. Select several sessions to export them all or move them to the Trash together, or right-click a project to export all of its sessions; each session becomes its own file. Cursor and Antigravity sessions stay in their apps and are never moved or changed. Press ⌘F to search by title, project or branch. Open a session for its status, tokens, an estimated cost, prompts, replies, tool calls, a token split (cache read, cache write, output, input) and models. The menu’s AI agent activity list shows the same sessions by title; click one to open the hub.

Copy resume copies the command to continue it in Terminal. You can also show the transcript in Finder, archive a session (⌘E), or move an ended session’s transcript to the Trash (⌘⌫), with Undo (⌘Z) for a few seconds. Whether a session is open is worked out from running claude processes, so several windows in one folder can blur ended and idle.

Notices

Small cards appear at the top right for: running out, out of usage, needs you, turn finished, session ended, CLI updates and breaks. They don’t take focus. Hover to keep one open, swipe or × to dismiss, click to open the hub. Turn each kind on or off in the hub’s Settings under Notices. Turn finished and session ended start off. The chime is quiet while Focus is on.

Answer Claude Code from the menu bar

This is optional and starts off. In the hub, click the gear to open Settings and turn on Answer permission prompts in PeekyMac. PeekyMac backs up ~/.claude/settings.json and adds one small hook. Turning it off, or quitting PeekyMac, removes it.

Permission requests then appear as a card showing the project, branch and session, what Claude Code wants to do (for example “Wants to edit” a file), and Allow, Deny and Open, which jumps to that session. Multiple-choice questions appear one step at a time, with a chip for each question; pick options or type your own answer. Questions have their own switch under Notices in Settings; when it’s off they’re asked in the terminal. If you don’t answer within about a minute, or choose “in terminal”, Claude Code asks in the terminal as usual. The hook talks only to PeekyMac on your Mac, using a code that changes every launch.

Approve from your phone

When you step away, PeekyMac can email you the permission requests that are waiting. In the hub’s Settings, turn on Answer permission prompts in PeekyMac (above), then Email me approval links when I’m away. After a few minutes away, or when your Mac is locked, each Claude Code or Codex request is also emailed to your PeekyMac account email as a one-time link. The email doesn’t include the command. Choose how long links last (2 to 15 minutes), and use Send a test email to check they reach you.

To answer everything at once, open peekymac.app/account → Approvals on your phone (the approval email links there too). It lists every request still waiting for your license and refreshes every few seconds; tap Allow or Deny and PeekyMac passes the answer to the agent on your Mac. Requests you don’t answer expire, and the agent then asks in the terminal as usual.

Today and year in review

Below the cards, Today shows tokens, requests, how they split across models, and a 7-day chart with each day’s total for Claude Code, Codex and the Grok CLI, read from logs on your Mac. Claude Code and Codex also show an estimate at API list prices (Codex uses OpenAI’s published prices for GPT-6.1 Terra, GPT-6.1 Sol and GPT-6 Astra; models without a published price show tokens only), and Grok shows the cost Grok records; subscriptions aren’t billed per token. The first count after launch can take a few seconds.

Press ⌘B in the hub, or choose Year in review, for a one-page summary with totals, streaks, your busiest day, top model and a heatmap. Copy it or save it as a PNG; nothing is uploaded. Claude Code keeps transcripts for 30 days unless you change cleanupPeriodDays.

Insights and session summaries

The Insights tab answers three questions: how to spend less, what changed this week, and what’s new in your tools. Session details have a Summarize button. Answers are written by your own Claude Code (claude -p, Haiku), only when you ask. If it can’t answer, the tab shows Claude Code’s own error, such as a sign-in problem. Each answer is a card you can collapse, ask again or close. Insights send your usage numbers; summaries send an excerpt of that session; “What’s new” also reads release notes from GitHub. Summarizing every session when it ends is optional and starts off.

Breaks

The Breaks tab has three cards:

  • Today: your time at the keyboard today, how long until the next break, and Take a break (⌘T). Today’s total is kept if PeekyMac restarts.
  • Breaks: turn reminders on, choose how often a break is due (default every 1 h 30 min) and how long it lasts, whether you get a notice or a break screen over every display (with a progress ring, a rest tip and what your agents are doing), and whether ending a break early asks first. Notice cards wait quietly until a break ends.
  • Daily schedule: lunch, dinner, wind-down and stop times, each with its own switch, and the days you work.

The break timer only counts time you’re away from the keyboard. PeekyMac uses only keyboard and mouse idle time, never what you type, and stays quiet while an agent is waiting on you.

Widgets

Open Notification Center, choose Edit Widgets, search for PeekyMac, and add AI usage (one provider, or the one closest to running out), AI overview (every provider with all its limits and reset times), Agent sessions (sessions that need you or are running) or AI today (today’s tokens, cost and a seven-day chart). AI today comes in small and medium; the others also come in large. Each bar has a tick for how much of the window has passed, every limit shows when it resets, and the large size adds today’s tokens and a 7-day chart. Widgets fill in once PeekyMac has checked your limits; keep PeekyMac running so they stay current. PeekyMac checks every 5 minutes and widgets redraw as soon as new numbers arrive. Tap the circular arrow on any widget to check now (providers are re-checked at most once a minute). When another app is in front, macOS shows desktop widgets in a muted style; for full color all the time, open System Settings → Desktop & Dock → Widgets and set Widget style to Full-color.

CLI updates

The Limits tab lists the installed and latest versions of Claude Code and Codex. Update runs the installer you already use (npm, bun, pnpm, Homebrew or Claude Code’s own updater).

If something looks wrong

  • Vercel: login rejected. Your Vercel CLI login may not cover AI Gateway credits. Create an AI Gateway API key in Vercel, paste it on the card, and press Return.
  • Claude Code: login expired. Run claude once in Terminal, then choose Retry.
  • Codex: no data. Install the Codex CLI or use Codex once so it records limits.
  • Rate limited. Providers limit how often usage can be checked. PeekyMac waits and tries again; Retry checks now.
  • Widgets are empty. Open PeekyMac and the hub once, then wait a minute.

PeekyMac reuses logins already on your Mac and never changes them. Usage and session history stay on your Mac. Limits come from undocumented provider services that can change.