DEV Community

E Daugherty
E Daugherty

Posted on

12 Claude Code and Codex Habits That Stretch Your Usage Limits on a Mac (2026)

You sit down for one quick fix, and the coding agent says you're close to your limit before lunch. Most of what burned it usually wasn't the fix. It was old context getting resent with every message.

These are the small habits I'd build first. Each one takes seconds, and every command below is linked to the official docs so you can check it against your version.

Claude Code habits

1. /clear when the task changes

Anthropic's cost guide is blunt about it: stale context wastes tokens on every later message. When you switch to unrelated work, run /clear. If you might come back, /rename the session first and /resume it later.

2. /compact with instructions, not bare

When you do need continuity, /compact Focus on the API changes and failing tests tells Claude what to keep in the summary. One catch from the docs: compacting a big context is itself a big request, while /clear costs nothing. Compact when you need the history, clear when you don't.

3. Keep CLAUDE.md short

CLAUDE.md loads at the start of every session, so every line in it is paid for every time. The docs suggest staying under about 200 lines and moving workflow-specific instructions (PR reviews, migrations) into skills, which load only when used.

4. Pick the model and effort on purpose

The same guide says Sonnet handles most coding tasks well and costs less than Opus, so save Opus for architecture calls and hard multi-step reasoning. Switch mid-session with /model, and turn reasoning down with /effort for simple edits.

5. Plan first, interrupt early

Press Shift+Tab to cycle into plan mode before a big change, so Claude proposes an approach before it writes anything. If it still heads the wrong way, press Escape right away and use /rewind (or double-tap Escape) to go back to a checkpoint instead of arguing it back on course.

6. Check /context and prune MCP servers

Run /context to see what's taking up space, and /mcp to disable servers you aren't using in this project. The docs also note that CLI tools like gh are more context-efficient than an MCP server for the same job.

Codex CLI habits

7. Same reset buttons, same rules

Codex has its own /compact, which replaces earlier turns with a summary, and /clear, which starts a fresh chat in the same CLI session. Note that Ctrl+L only clears the screen and keeps the chat (and its context) alive.

8. /plan, then right-size the model

/plan Propose a migration plan for this service gets you a plan before any edits, and Codex can start the implementation in a clean chat with the plan carried over. For routine work, /model --reasoning=low keeps the current model with lighter reasoning. Use /init once to generate an AGENTS.md so you stop re-explaining the repo.

9. Look at the meter before a long task

/status shows the active model and current token usage, and /usage opens token activity by day or week. If you want it always visible, /statusline can add rate limits and context stats to the footer.

Mac habits that help both

10. TokenBar for checking every limit at a glance

The in-agent commands only cover the agent you're in. TokenBar shows usage and reset times for Claude, Codex, Cursor, Gemini and Copilot in the menu bar, so I can tell which tool still has room before starting a long task instead of finding out halfway through.

TokenBar Codex usage dashboard on macOS

It's built on Peter Steinberger's MIT-licensed CodexBar and credits Pixel Agents. It costs $5/month Basic or $15 lifetime Pro, needs macOS 14+, and gives you no extra quota. It only shows the limits you already have.

11. Raycast Snippets for specific prompts

Anthropic's guide points out that vague requests like "improve this codebase" trigger broad scanning, while naming the file and function keeps reads small. Raycast Snippets expand a keyword into a saved prompt template in any app, and they're part of the core features on Raycast's free plan.

12. Maccy so you paste the error, not the log

When a test fails, the cheap move is pasting the three lines that matter, not 400 lines of output. Maccy is a free, MIT-licensed clipboard history (macOS 14+) that makes it easy to grab exactly the lines you copied earlier without re-running anything.

Which of these do you already do by default, and what habit would you add to the list?

Top comments (0)