Skip to content

Fix Codex weekly window detection - #268

Open
anthfgreco wants to merge 1 commit into
nesszer:mainfrom
anthfgreco:agent/fix-codex-weekly-window
Open

Fix Codex weekly window detection#268
anthfgreco wants to merge 1 commit into
nesszer:mainfrom
anthfgreco:agent/fix-codex-weekly-window

Conversation

@anthfgreco

@anthfgreco anthfgreco commented Aug 6, 2026

Copy link
Copy Markdown

Fixes #267

Summary

  • Identify Codex session and weekly usage windows from duration/reset metadata instead of array position.
  • Preserve an absent 5-hour session as an informational unavailable lane.
  • Calculate provider pace from the weekly quota when no session window is present.
  • Mark the unavailable session consistently in the tray status, Settings usage section, and CLI output.

Root cause

Codex weekly-only payloads were promoted into the primary window, while array payloads assumed the first window was always the 5-hour session. That mislabeled weekly usage and left the weekly and pace lanes incorrect.

Validation

  • cargo fmt --all
  • git diff --check
  • cargo test --manifest-path rust/Cargo.toml codex
  • cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml commands::bridge
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings
  • cargo clippy --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warnings
  • Frontend Vitest was unavailable because apps/desktop-tauri/node_modules is not installed.
  • Cua proof was skipped per the requested config-only scope.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@Finesssee

Copy link
Copy Markdown
Collaborator

Thanks for the PR, I will review it ASAP.

@Finesssee
Finesssee marked this pull request as ready for review August 7, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Weekly usage and pace break when 5-hour limit is absent

2 participants