codex-reset-watcher AGENTS.md

codex-reset-watcher AGENTS.md is an instructions file for Codex, OpenCode from jordan-edai/codex-reset-watcher. It costs 2,331 tokens per session, scanned A, original, MIT.

A repository guide for coding agents working on Codex Reset Watcher, a local macOS menu-bar app that shows Codex usage limits and reset credits.

In plain words
What is it for?
Use it when changing, checking, or releasing this app. It helps agents find the correct files, understand product decisions, and verify their work.
Why use it?
It keeps changes focused on the right product and records important limits, such as keeping the app read-only. It also gives agents the current project state, account details, and checks to run.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/jordan-edai/codex-reset-watcher/agents-md
Clone the repo
git clone --depth 1 https://github.com/jordan-edai/codex-reset-watcher

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-reset-watcher AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jordan-edai/codex-reset-watcher/agents-md.svg)](https://agentmods.dev/instructions/jordan-edai/codex-reset-watcher/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/jordan-edai/codex-reset-watcher/agents-md"><img src="https://agentmods.dev/badge/instructions/jordan-edai/codex-reset-watcher/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,331 This file is loaded in full into every session.
When invoked 2,331 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02331 $0.02331
Opus 5 $0.01166 $0.01166
Sonnet 5 $0.00466 $0.00466
Haiku 4.5 $0.00233 $0.00233

Measured 4d ago against content hash c8de8b4da502, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex-reset-watcher AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 190 lines

How it starts

The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Notes

This repo is Codex Reset Watcher, not Codex Cockpit.

Codex Reset Watcher is a small, open-source, local-first macOS menu bar app for Codex usage limits and reset credits. Keep changes scoped to that product.

Current State

  • Public GitHub repo: https://github.com/jordan-edai/codex-reset-watcher
  • Canonical local path: /Users/everydayai/Documents/!Codex Projects/Rate Refresher Project
  • Compatibility path: /Users/everydayai/Documents/Rate Refresher Project
  • Latest shipped release: v0.4.4
  • Check git log --oneline --decorate -5 for the current main commit; this note tracks the repo state through the v0.4.4 weekly reset-day title fix.
  • App bundle version is set in script/build_and_run.sh.

Product Decisions

  • The app must stay read-only.
  • Do not redeem reset credits, reset usage, mutate account state, or add analytics.
  • No OpenAI API key is required. The app uses the existing local Codex Desktop login at ~/.codex/auth.json.
  • The app currently calls internal Codex Desktop endpoints:
    • https://chatgpt.com/backend-api/wham/usage
    • https://chatgpt.com/backend-api/wham/rate-limit-reset-credits
  • These endpoints can change without notice. Keep decoding tolerant and failure handling partial-data-friendly.
  • The menu bar title currently shows weekly remaining capacity and the weekly reset weekday, for example 57% | Sunday, with the status icon beside it. Never replace it with a banked-reset count, account label, or status sentence.
  • There is temporarily no menu-title metric selector while Codex does not return the former 5-hour window. If weekly reset timing is missing, use week; if weekly data is unavailable, show --% | week. Do not use 5-hour, generic/unclassified, or reset-credit data as a current title fallback.
  • Use an explicit SwiftUI HStack label for MenuBarExtra; a Label can collapse to icon-only in the real macOS menu bar even when the title string itself is correct.
  • Display settings contain appearance only. Do not add a weekly/5-hour menu-title selector back until Codex reliably returns the 5-hour window. Read MENU_BAR_DISPLAY_PLAN.md before restoring it.
  • Preserve the dormant 5-hour decoder, snapshot fields, and nudge logic. The 5-hour window is expected to return, and its prior display design is recorded in MENU_BAR_DISPLAY_PLAN.md.
  • Reset-credit rows in the dropdown should always label the date, for example Reset 1 expires:. The 5-hour and weekly usage rows should also label when those windows reset.
  • Visual styling should flow through CodexPalette and CodexStyle. Prefer shared spacing, radius, type, row, and panel tokens over one-off view-local constants so the menu dropdown and desktop window stay visually aligned.
  • Appearance mode is shared by the menu dropdown and desktop window. Keep Light/Dark/Auto routed through CodexAppearanceMode, SwiftUI preferredColorScheme, and NSApp.appearance so custom palette colors actually switch in menu-bar popovers.
  • Usage capacity bars use remaining-percentage thresholds from the 2026 design refresh: green at 60% or higher, amber from 25% through 59%, and red below 25%. Blocked usage windows override percentage color with danger styling.
  • Keep desktop reset rows responsive and column-based. Labels/details and large expiry dates should never share one flexible inline text row, because that caused overlap at the default utility-window width.
  • Keep the main desktop window roomy enough by default. The window min/default size tokens live in CodexStyle.Size, and MainWindowController expands restored undersized frames so older saved window sizes do not clip the footer.
  • Routine app surfaces should stay light. Avoid smoky gray, dark tinted row fills, and dark terminal-block branding for normal states; use icons, borders, badges, and meters for emphasis, and reserve colored fills for warning/danger.
  • Read DESIGN_SYSTEM.md before making visual changes.
  • The menu dropdown uses fixed icon, content, metric, and date columns. Preserve that rhythm when adding rows so labels do not bleed into popover edges.
  • Keep the menu dropdown comfortably sized. Do not solve menu fit by stacking overly dense rows; widen the popover and use readable row heights when reset credits and footer actions are visible together.
  • The menu dropdown must hug its intrinsic content height. Do not add a screen-sized frame, forced viewport, ScrollView, or ViewThatFits wrapper that stretches it beyond the height its visible rows require.
  • Menu section order is fixed: Display settings, Current limits, then Banked Resets Expiration, followed by the usage nudge.
  • Cached snapshots and their cleanup actions belong only in the full desktop app. Do not add them back to the menu dropdown.
  • The active account label can come from the usage response email, local id_token email/name, or the generic Codex account fallback. Do not expose account-ID suffixes in user-facing labels.
  • Multi-account support is snapshot-based. The active account refreshes live; other accounts are cached last-seen snapshots only.
  • Do not describe cached snapshots as simultaneous live accounts. They are local records from previous active Codex Desktop logins.
  • Snapshot persistence must stay minimized and derived-only. Do not store bearer tokens, refresh tokens, ID tokens, raw auth JSON, raw endpoint JSON, full account IDs, user IDs, cookies, API keys, or reset credit IDs.
  • Account snapshot keys are salted hashes stored under Application Support.
  • Refreshes must use one loaded auth context for identity, usage, and reset credits so account switches cannot mix data across accounts.
  • When the auth context has a stable account ID, use that as the snapshot key. The usage endpoint can report an account identifier from a different namespace; do not reject otherwise-valid active usage data solely because those strings differ.
  • Menu cached-snapshot rows should focus the existing main window and update the shared account selection. Do not call openWindow(id: "main") directly from those rows, because WindowGroup can create duplicate main windows.
  • The desktop window intentionally uses a fixed two-pane sidebar/detail shell, not a native NavigationSplitView. The native split view's sidebar toggle can hide the account list in this compact utility window.
  • User-facing copy should call non-active saved records cached snapshots, not linked accounts or profiles. They are local last-seen records only.
  • Stale cached snapshots must be removable without clearing all cached snapshots. Keep Clear stale available from the desktop sidebar/footer, and keep the selected stale row action labeled Forget stale.
  • Before claiming a two-real-account flow is verified on a user machine, manual QA must include signing into a second real Codex Desktop account and checking that the previous login appears only as a cached snapshot.
  • Reset count should use server available_count when provided so malformed detail rows do not undercount banked resets.
  • If available_count is higher than the usable expiry rows returned by Codex, show explicit missing-expiry rows rather than hiding the extra banked resets.
  • Treat Codex allowed: false / limit_reached usage responses as blocked even if the percentage fields still decode. Blocked is more urgent than normal reset-advice nudges.
  • Do not infer 5h limit or Weekly limit from endpoint order when limit_window_seconds is missing. Use generic Primary limit / Secondary limit rows until Codex returns a trustworthy duration.
  • If Codex returns duplicate known window durations, keep the first known window and downgrade the duplicate to a generic row so the UI does not show two weekly or two 5h cards.
  • Guard reset_at and reset-duration math. Implausible epochs, infinities, and overflowing intervals should become missing timing data, not crashes.
  • Trusted Codex endpoint checks should stay exact: HTTPS, chatgpt.com, known /backend-api/wham/... path, and no userinfo, query, fragment, or custom port.
  • Reject empty auth tokens, redirects to an untrusted final URL, and successful JSON responses with no recognized payload. A successful HTTP status alone is not proof that the endpoint returned usable Codex data.
  • Keep the dedicated refresh URLSession stateless: no shared cookies, URL cache, or credential storage.
  • Preserve unknown/partial/error states. Never convert missing counts or failed endpoint results into a confirmed zero or a newly refreshed timestamp.

Read the full file on GitHub · 190 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 190 lines · 2,331 tokens per session scan A c8de8b4da502

Subscribe to this mod's changes

codex-reset-watcher AGENTS.md is an instructions file published in the GitHub repository jordan-edai/codex-reset-watcher (107 stars, last pushed 1mo ago), licensed MIT. It adds 2,331 tokens to every session, about $0.0117 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.