Skip to content

codex-monitor@breixopd: add Codex usage and Remote Control monitor - #8880

Closed
breixopd wants to merge 7 commits into
linuxmint:masterfrom
breixopd:agent/add-codex-monitor
Closed

codex-monitor@breixopd: add Codex usage and Remote Control monitor#8880
breixopd wants to merge 7 commits into
linuxmint:masterfrom
breixopd:agent/add-codex-monitor

Conversation

@breixopd

@breixopd breixopd commented Jul 15, 2026

Copy link
Copy Markdown

Summary

Adds Codex Monitor, a Cinnamon panel applet for monitoring Codex usage, reset windows, sessions, updates, and Remote Control.

The applet provides:

  • Compact five-hour and weekly usage meters in the panel
  • Amber and red quota/reset warnings with explanatory status indicators
  • Reset countdowns, banked-reset availability, expiry warnings, and confirmed redemption
  • Responsive wide and compact dashboards
  • Detailed quota and activity graphs with 24-hour, 7-day, and 30-day ranges
  • Exact graph values and timestamps on pointer movement
  • Active and recent Codex sessions, elapsed active-session time, and terminal resume actions
  • An Open Codex action using the configured default terminal
  • Remote Control status, pairing, connected-device inventory, refresh, stop, confirmed revocation, and guarded recovery from a verified stuck service
  • Automatic update checks with the update action shown only when a newer stable Codex version is available

Implementation and privacy

The Cinnamon UI remains asynchronous. Codex communication and bounded processing are handled by a local Python helper.

  • Communicates only with the locally installed Codex CLI, app-server, and local Unix control socket
  • Does not read or copy Codex authentication files
  • Does not expose a TCP listener or send usage history to another service
  • Stores bounded history under the user's XDG state directory
  • Uses fixed subprocess argument arrays with shell=False
  • Requires confirmation for reset redemption, Remote stop/repair, device revocation, and Codex updates
  • Validates ownership, process state, parentage, executable identity, and pidfd stability before repairing a stuck Remote process
  • Recognizes sessions in other local Codex processes through bounded /proc metadata only when the process belongs to the same user and its resolved executable exactly matches the configured Codex executable
  • Retains only canonical thread UUIDs, matching open session filenames under CODEX_HOME, and safe process start timestamps; session contents and process command lines are never read
  • Treats Remote and connected-device capabilities as optional and degrades to clear unavailable or unsupported states
  • Keeps live Remote validation read-only; tests never start or stop Remote, create pairing state, revoke devices, or record device identity

Codex Remote and app-server interfaces are still evolving, so those features are capability-detected and isolated from ordinary quota and session monitoring.

Compatibility

  • Cinnamon 6.0, 6.2, 6.4, and 6.6 in metadata
  • Live tested on Linux Mint with Cinnamon 6.6
  • Python 3.10 or newer
  • Requires an installed and authenticated Codex CLI

Validation

  • Official validate-spice passed
  • Official Cinnamon pattern check passed
  • 258 Python tests passed
  • 48 JavaScript model tests passed
  • Ruff, source validation, JavaScript and shell syntax checks, and translation-template validation passed
  • Bandit reported no medium or high-severity findings
  • Full installed Cinnamon smoke matrix passed, including wide/compact layouts, all graph ranges and modes, pointer values, elapsed session states, updates, resets, and read-only Remote device discovery
  • Live active-session detection was verified against two simultaneously running Codex sessions
  • Release and Cinnamon Spices archives passed integrity and private/generated-file checks
  • Screenshot uses isolated synthetic state rendered with the applet's real dashboard, popup wrapper, and styling; it contains no live account, session, quota, path, or device data
  • Project CI passed independently on both dev and main

This pull request adds only codex-monitor@breixopd.

Author: @breixopd

@breixopd

breixopd commented Aug 8, 2026

Copy link
Copy Markdown
Author

Closing this submission because the project is undergoing a substantial v2 redesign into a broader cross-platform provider and usage manager. If we decide to distribute through Cinnamon Spices later, I’ll submit a fresh, focused Cinnamon integration after the new architecture and packaging have completed testing.

@breixopd breixopd closed this Aug 8, 2026
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.

1 participant