[KongchangAI]
· 2 min read· 1,119 words

Peras: Set Usage Limits for Claude Code and Codex to Prevent Weekly Quota Depletion

Peras: Set Usage Limits for Claude Code and Codex to Prevent Weekly Quota Depletion

Peras sets weekly usage limits for Claude Code and Codex to prevent long tasks from exhausting the quota.

Peras is a usage management tool for coding agents such as Claude Code and Codex. It sets a weekly usage limit via a CLI command; once usage reaches the threshold, the agent's next tool call is rejected with a clear reason, preventing a single long task from silently consuming the entire week's quota. Users can resume usage at any time from the terminal or Mac menu bar app, and can optionally let the agent be aware of its own usage to adjust behavior in advance. Pricing uses a hybrid model: the CLI and hooks are free and MIT open source, while the Mac menu bar app is a one-time €4.99 purchase. The tool suits developers who heavily use coding agents, but the limit granularity is currently weekly; finer-grained control requires additional configuration, and the product is new with stability yet to be validated.

Peras: Set Usage Limits for Claude Code and Codex to Prevent Weekly Quota Depletion

If you've run a slightly complex task with Claude Code or Codex, you may have experienced this scenario: a long-running task keeps calling tools in the background, and when you come back you find that this week's usage quota is almost gone. Peras is a tool designed for this pain point. It lets you set a weekly usage limit for these coding agents. Once the threshold is reached, the agent's next tool call will be rejected with a clear reason, preventing a single task from consuming an entire week's quota.

Core Mechanism: One Command to Set a Limit, Automatic Rejection at the Threshold

Peras is used in a very straightforward way. With the CLI command peras set weekly 85 pause, you can set the weekly usage limit to 85 (the unit is determined by the agent's usage system). When usage crosses this line, the agent's next tool call will be rejected with a plain-language reason. This means a running long task won't fail silently; instead, it clearly tells the caller that "the quota limit has been reached."

Restoring is also flexible—you can resume usage at any time from the terminal or the menu bar app. This "pause-resume" design gives control back to the developer, rather than letting the agent consume quota without limits.

Peras product screenshot

Usage Systems of Claude Code and Codex

Coding agents like Claude Code and Codex typically use subscription-based or API-based billing, and subscription plans often include periodic usage quotas (such as weekly or monthly). When executing tasks, agents frequently call models and tools, and each call consumes quota. When Peras says "the unit is determined by the agent's usage system," it means different agents may use different metering methods: Claude Code may meter by number of messages, tokens, or tool calls, while Codex may meter by API calls or compute resources. Peras itself does not define the unit; it directly reads the usage values exposed by the agent. Therefore, users need to understand the metering basis of the agent they use in order to set a reasonable threshold.

Optional Feature: Let the Agent Be Aware of Its Own Usage

Peras also offers an optional capability: your agent can be "told" about its own usage. This is an opt-in design, meaning it is off by default and requires you to configure it actively. For scenarios where you want the agent to adjust its behavior autonomously as it approaches the limit, this feature is valuable—the agent can reduce tool call frequency in advance instead of waiting to be hard-rejected.

However, based on the product description, the implementation details of this feature are not elaborated, and the actual effect depends on whether the agent itself supports reading this kind of usage information.

Opt-in Mechanism and Agent Self-Awareness

Opt-in is a product design pattern in which a feature is off by default and requires the user to enable it actively. In Peras's case, letting the agent be aware of its own usage means injecting current usage information into the agent through some interface (possibly environment variables, configuration files, or hooks). If the agent supports reading this information, it can proactively adjust behavior as it approaches the limit—for example, reducing unnecessary tool calls, prioritizing critical steps, or ending the task early. But this capability depends on the extensibility of the agent itself—not all agents provide an interface for reading external usage status, so Peras makes it optional to avoid interfering with agents that do not support it.

Pricing and Open-Source Strategy

Peras uses a hybrid model: the CLI and hooks are completely free and open source (MIT license), while the native Mac menu bar app is a one-time €4.99 purchase. This strategy is developer-friendly—the core limit logic can be used and reviewed for free, and the paid part is mainly the convenient menu bar interaction.

According to Product Hunt data, the product received 74 votes and 6 comments, ranking 14th, with categories covering developer tools, artificial intelligence, GitHub, and menu bar apps. It's not large in scale, but its positioning is precise.

What MIT License and Hooks Mean

The MIT license is a permissive open-source license that allows users to freely use, modify, and distribute the code, even for commercial purposes, as long as the copyright notice is retained. Peras open-sources the CLI and hooks under the MIT license, meaning developers can review the limit logic, modify it themselves, or integrate it into their own toolchains, which lowers the trust cost. Here, hooks refer to the callback mechanism triggered by the agent on specific events (such as before a tool call). Peras intercepts the agent's next tool call through a hook and checks usage, thereby achieving "automatic rejection at the threshold." Open-sourcing the core logic makes this interception process transparent and verifiable, while the paid menu bar app provides the convenience of graphical interaction.

Use Cases and Limitations

Peras solves the problem of "quota anxiety" and is suitable for developers who heavily use Claude Code or Codex, especially those who launch long-running tasks. Its value lies in turning invisible usage consumption into a manageable boundary.

The limitations are also obvious: currently only the Mac menu bar app is available (the CLI is cross-platform), and the limit granularity is "weekly." For scenarios requiring finer-grained control (such as daily or per-task), additional configuration may be needed. In addition, the product is relatively new, and its actual stability still needs more user validation.

For developers troubled by weekly quotas, Peras provides a lightweight solution, and the free open-source core lowers the barrier to trying it.

One-line Summary

Peras sets a weekly usage limit for Claude Code and Codex to prevent long tasks from exhausting the quota.

Paragraph Summary

Peras is a usage management tool for coding agents such as Claude Code and Codex. Its core function is to set a weekly usage limit via a CLI command. Once usage reaches the threshold, the agent's next tool call is rejected with a clear reason, preventing a single long task from silently consuming an entire week's quota. Users can resume usage at any time from the terminal or the Mac menu bar app, and can optionally let the agent be aware of its own usage so it can adjust behavior in advance. Pricing uses a hybrid model: the CLI and hooks are free and MIT open source, while the Mac menu bar app is a one-time €4.99 purchase. The tool is suitable for developers who heavily use coding agents, but the limit granularity is currently weekly; finer-grained control requires additional configuration, and the product is relatively new with stability yet to be validated.

#Peras#Claude Code#Codex#usage limits#weekly quota#coding agents#open source#Mac menu bar app
Share:

Related articles