Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

fix(host): read current Codex account usage (#240)

Sean Fergusonded969dc97b7
diff --git a/README.md b/README.md
index a731f554..08b19f11 100644
--- a/README.md
+++ b/README.md
@@ -90,7 +90,7 @@ Host notifications → APNs worker (relay/) → iPhone
- **The chat only shows what matters**: your messages, each turn's final reply, approval cards and notices. Every tool call, diff, plan and thought is one tap away in *Full conversation*. While a bot works, its row shows what it's doing right now.
- **Agents are detected automatically**: the host hydrates PATH from your login shell (plus Homebrew, ~/.local/bin, nvm, bun, volta, asdf, mise, pnpm…), finds every harness you have installed, and prefers its native ACP mode. Anything else in the official [ACP registry](https://agentclientprotocol.com/registry) can be picked too — Codync fetches it on first use (npx, uvx or a checksummed binary).
- **codync-host** (Rust, macOS, Windows and Linux) runs on your computer. It speaks the [Agent Client Protocol](https://agentclientprotocol.com) to each agent, keeps transcripts in SQLite, and serves the phone. Every change carries a global `rev`, so the phone reconnects with `since: rev` and never misses anything.
-- **Usage limits** come from the agents installed on your computer. Claude uses `claude -p /usage` (a local command, no model call) plus Claude Code's status line, and Codex uses `~/.codex/sessions`. oh-my-pi, Amp, Kiro, Kimi, Antigravity, OpenCode, Mistral Vibe and Junie are read from their own command, database or IDE file. Cursor asks cursor.com with the sign-in it saved locally. The phone, widgets and menu bar see the resulting limits.
+- **Usage limits** come from the agents installed on your computer. Claude uses `claude -p /usage` (a local command, no model call) plus Claude Code's status line, and the signed-in Codex CLI reports current account limits without a model call. oh-my-pi, Amp, Kiro, Kimi, Antigravity, OpenCode, Mistral Vibe and Junie are read from their own command, database or IDE file. Cursor asks cursor.com with the sign-in it saved locally. The phone, widgets and menu bar see the resulting limits.
- **Push** goes through a tiny relay that holds the APNs key. The phone trades its device token for an encrypted ticket; the host only ever holds tickets.
UI patterns (roster, character avatars, approval cards, trace sheet, "needs you / done" notifications) follow Grok Bot.
diff --git a/docs/features/marketplace.md b/docs/features/marketplace.md
index 0f4fa32b..0a33d728 100644
--- a/docs/features/marketplace.md
+++ b/docs/features/marketplace.md
@@ -44,6 +44,12 @@ Clicking a skill (an Extensions row, an installed skill, or the info button besi
Registry-backed package connectors follow their upstream release. The host checks the Registry periodically after credentials are unlocked and checks again immediately before a package process starts. If a newer pinned npm, PyPI, OCI or NuGet reference is available, only that package/image argument is replaced; the running process is not interrupted, and the new version applies on its next launch. Network failures, missing packages and attempted downgrades leave the installed reference unchanged. Custom command connectors are never updated automatically.
+## Codex usage
+
+The host asks the installed Codex CLI's app-server `account/rateLimits/read` method for the current account's plan windows every five minutes. Executable lookup and process startup run on a blocking worker. It initializes the CLI transport without creating a thread or model turn, then stops the probe through the host's existing process-tree cleanup. Startup, handshake and account-read failures retain their phase and cause in structured debug logs. The canonical `rateLimitsByLimitId.codex` bucket takes precedence over the older single `rateLimits` view. Reset timestamps are Unix seconds and become milliseconds in the existing `usage` event.
+
+The CLI must be signed in as the user running the host. Missing, rejected or unavailable account readings remove the Codex provider rather than reusing session-log snapshots. Windows whose reported reset has already passed are omitted. A signed-out host therefore does not keep showing an old percentage with “resets in 0m.” Sign in with `codex login --device-auth`, or use Extensions > Codex > Sign in. Existing client usage views render the same window shape without a protocol change.
+
## WorkBuddy
WorkBuddy is a built-in agent that runs the CLI bundled inside the WorkBuddy desktop app (`WorkBuddy AI.app` from workbuddy.ai or `WorkBuddy.app` from codebuddy.cn on macOS; `%LOCALAPPDATA%\Programs\WorkBuddy AI` or `…\WorkBuddy` on Windows). The app ships only the lite bundle (`codebuddy-lite-wb.mjs`), so Codync sets `CODEBUDDY_FORCE_LITE_WB_BUNDLE=1` and starts `{bin} --serve --acp`. `--acp` alone loads a headless bundle the app does not include, and the process exits. `--serve` is what starts ACP; `--acp` selects its stdio transport (the HTTP banner on stdout is ignored). That file is also named `codebuddy`, so Codync does not take it from `PATH`: a `codebuddy` command there stays [CodeBuddy Code](https://www.npmjs.com/package/@tencent-ai/codebuddy-code). It is a Node script, so the agent list asks for Node.js (Codync's own when the computer has none). There is no installer in Codync, and no Linux build, so Linux doesn't list it. The app's login is encrypted for the app, so the CLI does not see it: a prompt with no token comes back as `stopReason: refusal` with the error in `_meta["codebuddy.ai/errorMessage"]`, which Codync reads as that error (`acp::codebuddy::prompt_result`): a sign-in card holding the message, or the bot's next agent. Its session opens signed out, so a check asks `_codebuddy.ai/getUserInfo` instead (only whether it names an account: the answer carries tokens). On `authenticate`, Codync opens the http(s) page from the `_codebuddy.ai/authUrl` notification. Select **WorkBuddy** and sign in from that card. It honors `CODEBUDDY_DISABLE_AUTO_MEMORY`, so a bot can keep WorkBuddy's own memory on the same way as CodeBuddy Code.
diff --git a/host/src/usage/codex.rs b/host/src/usage/codex.rs
index 1aa7f13d..fcfaf6db 100644
--- a/host/src/usage/codex.rs
+++ b/host/src/usage/codex.rs
@@ -1,79 +1,206 @@
-//! Codex plan windows from the newest local rollout file.
+//! Current Codex plan windows, read through the CLI's account API without a model turn.
-use serde_json::Value;
-use std::path::{Path, PathBuf};
+use crate::agent::acp::Acp;
+use anyhow::{Context, Result};
+use serde_json::{Value, json};
+use std::sync::Arc;
+use std::time::Duration;
use super::Window;
-/// Blocking: reads the newest Codex rollout file.
-pub(super) fn collect() -> Option<Vec<Window>> {
- let path = newest_rollout(&dirs::home_dir()?.join(".codex/sessions"))?;
- let text = std::fs::read_to_string(&path).ok()?;
- let line = text.lines().rev().find(|l| l.contains("\"rate_limits\""))?;
- let v: Value = serde_json::from_str(line).ok()?;
- let rl = if v["payload"]["rate_limits"].is_object() { &v["payload"]["rate_limits"] } else { &v["rate_limits"] };
- let modified_ms = std::fs::metadata(&path)
- .and_then(|m| m.modified())
- .ok()
- .and_then(|t| t.duration_since(std::time::UNIX_EPOCH).ok())
- .map_or(0, |d| i64::try_from(d.as_millis()).unwrap_or(i64::MAX));
- let windows = parse_codex(rl, modified_ms);
- (!windows.is_empty()).then_some(windows)
-}
+const READ_TIMEOUT: Duration = Duration::from_secs(20);
-/// Blocking. `sessions/YYYY/MM/DD/rollout-*.jsonl`: descend into the largest dir each level.
-fn newest_rollout(root: &Path) -> Option<PathBuf> {
- let mut dir = root.to_path_buf();
- for _ in 0..3 {
- let mut subs: Vec<PathBuf> =
- std::fs::read_dir(&dir).ok()?.filter_map(Result::ok).map(|e| e.path()).filter(|p| p.is_dir()).collect();
- subs.sort();
- dir = subs.pop()?;
+pub(super) async fn collect() -> Option<Vec<Window>> {
+ let reading = read_live(start_codex, READ_TIMEOUT).await;
+ // A failed sign-in or an unavailable CLI must not leave an expired snapshot on screen.
+ match reading {
+ Ok(windows) => Some(windows.unwrap_or_default()),
+ Err(error) => {
+ tracing::debug!(error = format!("{error:#}"), "codex account usage was unavailable");
+ Some(Vec::new())
+ }
}
- std::fs::read_dir(&dir)
- .ok()?
- .filter_map(Result::ok)
- .map(|e| e.path())
- .filter(|p| p.extension().is_some_and(|x| x == "jsonl"))
- .max_by_key(|p| std::fs::metadata(p).and_then(|m| m.modified()).ok())
}
-pub fn parse_codex(rl: &Value, observed_ms: i64) -> Vec<Window> {
- ["primary", "secondary"]
- .into_iter()
- .filter_map(|k| {
- let w = &rl[k];
- let percent = w["used_percent"].as_f64()?;
- let minutes = w["window_minutes"].as_i64().unwrap_or(0);
- let label = match minutes {
- 300 => "5-hour".to_owned(),
- 10080 => "Weekly".to_owned(),
- m if m > 0 && m % 1440 == 0 => format!("{}-day", m / 1440),
- m if m > 0 => format!("{}-hour", m / 60),
- _ => k.to_owned(),
- };
- let resets = w["resets_at"].as_i64().map(|s| s.saturating_mul(1000)).or_else(|| {
- w["resets_in_seconds"].as_i64().map(|s| observed_ms.saturating_add(s.saturating_mul(1000)))
- });
- Some(Window::new(k, label, percent, resets))
- })
- .collect()
+fn start_codex() -> Result<Option<Arc<Acp>>> {
+ let Some(bin) = super::command::program("codex") else { return Ok(None) };
+ let home = dirs::home_dir().context("locating the host user's home directory")?;
+ let command = format!("{} app-server", crate::shell::quote(&bin.to_string_lossy()));
+ let (client, _events) = Acp::spawn(&command, &home.to_string_lossy(), &[])?;
+ Ok(Some(client))
+}
+
+async fn read_live(
+ start: impl FnOnce() -> Result<Option<Arc<Acp>>> + Send + 'static,
+ timeout: Duration,
+) -> Result<Option<Vec<Window>>> {
+ // Lookup and process creation can block; the transport's async reads stay on the runtime.
+ let started = tokio::task::spawn_blocking(start).await;
+ let client = started.context("joining Codex usage startup")?.context("starting Codex usage probe")?;
+ let Some(client) = client else { return Ok(None) };
+ let result = tokio::time::timeout(timeout, read_limits(&client)).await;
+ client.kill().await;
+ let response = result.with_context(|| format!("Codex usage read exceeded {}ms", timeout.as_millis()))??;
+ Ok(Some(parse(&response, crate::store::now_ms())))
+}
+
+async fn read_limits(client: &Acp) -> Result<Value> {
+ let initialized = client
+ .request(
+ "initialize",
+ json!({"clientInfo": {"name": "codync", "title": "Codync", "version": env!("CARGO_PKG_VERSION")}}),
+ )
+ .await;
+ initialized.context("initializing Codex usage probe")?;
+ let notified = client.notify("initialized", json!({})).await;
+ notified.context("announcing Codex usage initialization")?;
+ let limits = client.request("account/rateLimits/read", json!({})).await;
+ limits.context("reading Codex account rate limits")
+}
+
+fn parse(response: &Value, now_ms: i64) -> Vec<Window> {
+ let limits = response["rateLimitsByLimitId"]
+ .get("codex")
+ .filter(|v| v.is_object())
+ .or_else(|| response.get("rateLimits").filter(|v| v.is_object()));
+ let Some(limits) = limits else { return Vec::new() };
+ ["primary", "secondary"].into_iter().filter_map(|id| window(id, &limits[id], now_ms)).collect()
+}
+
+fn window(id: &str, value: &Value, now_ms: i64) -> Option<Window> {
+ let percent = value["usedPercent"].as_f64().filter(|p| p.is_finite() && *p >= 0.0)?;
+ let resets = value["resetsAt"].as_i64().map(|s| s.saturating_mul(1000));
+ if resets.is_some_and(|at| at <= now_ms) {
+ return None;
+ }
+ let label = match value["windowDurationMins"].as_i64().unwrap_or(0) {
+ 300 => "5-hour".to_owned(),
+ 10080 => "Weekly".to_owned(),
+ m if m > 0 && m % 1440 == 0 => format!("{}-day", m / 1440),
+ m if m > 0 && m % 60 == 0 => format!("{}-hour", m / 60),
+ m if m > 0 => format!("{m}-minute"),
+ _ => id.to_owned(),
+ };
+ Some(Window::new(id, label, percent.min(100.0), resets))
}
#[cfg(test)]
mod tests {
use super::*;
- use serde_json::json;
#[test]
- fn parses_codex_rollout_limits() {
- let x = parse_codex(
- &json!({"primary": {"used_percent": 3.0, "window_minutes": 300, "resets_in_seconds": 10},
- "secondary": {"used_percent": 40.0, "window_minutes": 10080, "resets_at": 100}}),
+ fn current_codex_bucket_wins_over_the_compatibility_view() {
+ let now = 1_790_000_000_000;
+ let reset = now / 1000 + 6 * 86_400 + 13 * 3600;
+ let response = json!({
+ "rateLimitsByLimitId": {"codex": {
+ "primary": {"usedPercent": 12, "windowDurationMins": 300, "resetsAt": reset},
+ "secondary": {"usedPercent": 21, "windowDurationMins": 10080, "resetsAt": reset}
+ }},
+ "rateLimits": {"primary": {"usedPercent": 99, "windowDurationMins": 10080, "resetsAt": 100}}
+ });
+ let windows = parse(&response, now);
+ assert_eq!(windows.len(), 2);
+ assert_eq!(windows[0].label, "5-hour");
+ assert!((windows[0].percent - 12.0).abs() < f64::EPSILON);
+ assert_eq!(windows[1].label, "Weekly");
+ assert_eq!(windows[1].resets_at, Some(now + (6 * 24 + 13) * 3_600_000));
+ }
+
+ #[test]
+ fn the_single_bucket_response_is_still_supported() {
+ let windows = parse(
+ &json!({"rateLimits": {"primary": {"usedPercent": 25, "windowDurationMins": 15, "resetsAt": 30}}}),
1000,
);
- assert_eq!(x[0].label, "5-hour");
- assert_eq!(x[0].resets_at, Some(11_000));
- assert_eq!(x[1].resets_at, Some(100_000));
+ assert_eq!(windows[0].label, "15-minute");
+ assert_eq!(windows[0].resets_at, Some(30_000));
+ }
+
+ #[test]
+ fn expired_or_invalid_readings_are_not_presented_as_current_usage() {
+ let response = json!({"rateLimits": {
+ "primary": {"usedPercent": 17, "windowDurationMins": 10080, "resetsAt": 100},
+ "secondary": {"usedPercent": -1, "windowDurationMins": 300, "resetsAt": 300}
+ }});
+ assert_eq!(parse(&response, 200_000), Vec::new());
+ assert_eq!(parse(&json!({"rateLimits": {"primary": {"resetsAt": 300}}}), 200_000), Vec::new());
+ }
+
+ fn fixture_start(mode: &str) -> impl FnOnce() -> Result<Option<Arc<Acp>>> + Send + 'static {
+ let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR"));
+ let script = root.join("tests/fixtures/codex_usage.py");
+ let command = format!("{} {}", crate::shell::python(&script), crate::shell::quote(mode));
+ move || {
+ let (client, _events) = Acp::spawn(&command, &root.to_string_lossy(), &[])?;
+ Ok(Some(client))
+ }
+ }
+
+ async fn fixture(mode: &str, timeout: Duration) -> Result<Option<Vec<Window>>> {
+ let result = read_live(fixture_start(mode), timeout).await;
+ crate::agent::acp::stopped().await;
+ result
+ }
+
+ #[tokio::test]
+ async fn the_probe_initializes_and_reads_limits_without_starting_a_turn() {
+ let result = fixture("ready", Duration::from_secs(10)).await;
+ let windows = result.unwrap().unwrap();
+ assert_eq!(windows.len(), 1);
+ assert_eq!(windows[0].label, "Weekly");
+ assert!((windows[0].percent - 23.0).abs() < f64::EPSILON);
+ }
+
+ #[tokio::test]
+ async fn authentication_failure_does_not_become_zero_usage() {
+ let result = fixture("signed-out", Duration::from_secs(10)).await;
+ let error = result.unwrap_err();
+ assert!(format!("{error:#}").contains("reading Codex account rate limits: Sign in required"));
+ }
+
+ #[tokio::test]
+ async fn an_unresponsive_probe_is_bounded_and_stopped() {
+ let result = fixture("hang", Duration::from_millis(100)).await;
+ let error = result.unwrap_err();
+ assert!(error.downcast_ref::<tokio::time::error::Elapsed>().is_some());
+ }
+
+ #[tokio::test(flavor = "current_thread")]
+ async fn slow_startup_does_not_stall_other_host_work() {
+ let (release, waiting) = std::sync::mpsc::channel();
+ let start = fixture_start("ready");
+ let probe = read_live(
+ move || {
+ waiting.recv_timeout(Duration::from_secs(5)).context("async work could not release startup")?;
+ start()
+ },
+ Duration::from_secs(10),
+ );
+ let resume = async {
+ tokio::task::yield_now().await;
+ release.send(()).unwrap();
+ };
+ let (result, ()) = tokio::join!(probe, resume);
+ crate::agent::acp::stopped().await;
+ assert!(result.unwrap().is_some());
+ }
+
+ #[tokio::test]
+ async fn startup_errors_retain_their_cause_and_context() {
+ let result = read_live(
+ || Err(std::io::Error::new(std::io::ErrorKind::PermissionDenied, "probe denied").into()),
+ Duration::from_secs(10),
+ )
+ .await;
+ let error = result.unwrap_err();
+ assert!(format!("{error:#}").contains("starting Codex usage probe: probe denied"));
+ }
+
+ #[tokio::test]
+ async fn protocol_errors_identify_the_failed_handshake() {
+ let result = fixture("bad-handshake", Duration::from_secs(10)).await;
+ let error = result.unwrap_err();
+ assert!(format!("{error:#}").contains("initializing Codex usage probe: initialize rejected"));
}
}
diff --git a/host/src/usage/mod.rs b/host/src/usage/mod.rs
index 3f7f75e1..b768c7f2 100644
--- a/host/src/usage/mod.rs
+++ b/host/src/usage/mod.rs
@@ -1,7 +1,7 @@
//! Subscription usage, read on the host.
//!
//! Claude: `claude -p /usage`, the status line, and the ACP rate-limit event.
-//! Codex: the newest rollout's `rate_limits`. The other agents Codync runs are
+//! Codex: the CLI's live account rate limits. The other agents Codync runs are
//! read the same way when they can report locally: `omp usage`, `amp usage`,
//! `kiro-cli /usage`, a `kimi` screen, Antigravity's language server, OpenCode's
//! database, Vibe's session logs, and the `JetBrains` IDE quota file.
@@ -146,7 +146,7 @@ pub async fn refresh(hub: &Hub) {
junie,
cursor_windows,
) = tokio::join!(
- tokio::task::spawn_blocking(codex::collect),
+ codex::collect(),
claude::collect(),
omp::collect(),
amp::collect(),
@@ -158,7 +158,7 @@ pub async fn refresh(hub: &Hub) {
tokio::task::spawn_blocking(junie::collect),
cursor::collect(),
);
- apply(hub, joined(codex), "codex", "Codex", "sessions");
+ apply(hub, codex, "codex", "Codex", "Codex CLI");
apply(hub, claude, "claude", "Claude", "claude");
apply(hub, omp_windows, "omp", "oh-my-pi", "omp usage");
apply(hub, amp_windows, "amp", "Amp", "amp usage");
diff --git a/host/tests/fixtures/codex_usage.py b/host/tests/fixtures/codex_usage.py
new file mode 100644
index 00000000..6f42e123
--- /dev/null
+++ b/host/tests/fixtures/codex_usage.py
@@ -0,0 +1,35 @@
+"""Only the read-only Codex account handshake is accepted; no thread or turn may start."""
+
+import json
+import sys
+
+mode = sys.argv[1]
+initialized = False
+ready = False
+
+for line in sys.stdin:
+ message = json.loads(line)
+ method = message["method"]
+ if method == "initialize":
+ assert not initialized
+ assert message["params"]["clientInfo"]["name"] == "codync"
+ if mode == "bad-handshake":
+ print(json.dumps({"id": message["id"], "error": {"code": -32600, "message": "initialize rejected"}}), flush=True)
+ continue
+ initialized = True
+ result = {}
+ elif method == "initialized":
+ assert initialized
+ ready = True
+ continue
+ elif method == "account/rateLimits/read":
+ assert ready
+ if mode == "hang":
+ continue
+ if mode == "signed-out":
+ print(json.dumps({"id": message["id"], "error": {"code": -32000, "message": "Sign in required"}}), flush=True)
+ continue
+ result = {"rateLimits": {"primary": {"usedPercent": 23, "windowDurationMins": 10080, "resetsAt": 2000000000}}}
+ else:
+ raise AssertionError("A usage probe must not invoke " + method)
+ print(json.dumps({"id": message["id"], "result": result}), flush=True)
diff --git a/web/content/docs/agents.mdx b/web/content/docs/agents.mdx
index 30674499..23963569 100644
--- a/web/content/docs/agents.mdx
+++ b/web/content/docs/agents.mdx
@@ -2,6 +2,12 @@ Every bot runs one coding agent on your computer. Codync drives agents through t
Codync uses the agents with the accounts they're already signed in to on your computer, such as Claude Code with your Claude plan or Codex with your ChatGPT plan. It never calls a provider's API with your login.
+## Usage limits
+
+On desktop, open **Settings > Usage** to see the limits reported by your connected computers. The host refreshes usage every five minutes.
+
+Codex needs its CLI installed and signed in on the computer. The host reads current account limits without starting a conversation or using a model. If the login stops working or the current limits are unavailable, old session-file readings are not shown. Sign in again from **Extensions** or run `codex login --device-auth` on that computer.
+
## Agents Codync knows by name
For these agents, Codync knows the command it looks for, how to install it and how to sign in. The agent must be installed on the computer before a bot can use it.
diff --git a/web/content/docs/conversations.mdx b/web/content/docs/conversations.mdx
index c0a384ba..d04521b3 100644
--- a/web/content/docs/conversations.mdx
+++ b/web/content/docs/conversations.mdx
@@ -148,7 +148,7 @@ When you send a message from the iPhone, a Live Activity for that bot appears on
## Usage limits
-Codync reads plan limits from the agents installed on your computer. Claude Code and Codex come from their own usage report and session files. oh-my-pi, Amp, Kiro, Kimi, Antigravity, OpenCode, Mistral Vibe and Junie are read the same way, from a command, a local database or an IDE file. Cursor has no usage command: Codync uses the sign-in Cursor saved on this computer and asks cursor.com for the summary. Nothing else is sent with an agent's login. To see them:
+Codync reads plan limits from the agents installed on your computer. Claude Code uses its usage report and status line. The signed-in Codex CLI reports current account limits without starting a conversation or model turn. oh-my-pi, Amp, Kiro, Kimi, Antigravity, OpenCode, Mistral Vibe and Junie are read the same way, from a command, a local database or an IDE file. Cursor has no usage command: Codync uses the sign-in Cursor saved on this computer and asks cursor.com for the summary. Nothing else is sent with an agent's login. To see them:
- **iPhone:** the **State** tab, then **Usage limits**. There's also a Usage widget.
- **Desktop:** the menu bar or tray menu, or **Usage** in the account menu at the bottom of the sidebar.
diff --git a/web/content/docs/privacy.mdx b/web/content/docs/privacy.mdx
index 4353be88..c01ffc63 100644
--- a/web/content/docs/privacy.mdx
+++ b/web/content/docs/privacy.mdx
@@ -5,7 +5,7 @@ Codync keeps your work on your computer. The phone and desktop apps are windows
- **Bots, conversations, routines and memory** are kept by the host in `~/.codync` on your computer. Your phone keeps a cache so the app opens quickly.
- **Agents run with their own logins.** Claude Code, Codex and the other agents use the sign-ins you set up on the computer. Your prompts go from the agent to its provider, as they would without Codync.
- **Secrets are encrypted.** Connector credentials, voice API keys and other keys you enter in Codync are stored encrypted on the computer. The encryption key is held by the system's credential store (Keychain on macOS, Secret Service on Linux, Credential Manager on Windows). They're never sent to Codync's cloud.
-- **Usage limits are read on your computer.** The host reads them from the agents installed there: Claude Code's usage command and status line, Codex's session files, and the same kind of local report from oh-my-pi, Amp, Kiro, Kimi, Antigravity, OpenCode, Mistral Vibe and Junie. Cursor is the exception. It has no local report, so the host reads the sign-in Cursor saved and asks cursor.com for the summary. That token is not logged, and Codync does not call any other provider's API with an agent's login. To read Claude Code's limits, `codync-host install` routes its status line through `codync-host statusline`; a status line you already had keeps working and is restored when you uninstall.
+- **Usage limits are read on your computer.** The host reads them from the agents installed there: Claude Code's usage command and status line, the Codex CLI's read-only current-account query, and the same kind of local report from oh-my-pi, Amp, Kiro, Kimi, Antigravity, OpenCode, Mistral Vibe and Junie. The Codex query does not start a conversation or model turn, and its CLI manages its own sign-in. Cursor is the exception. It has no local report, so the host reads the sign-in Cursor saved and asks cursor.com for the summary. That token is not logged, and Codync does not call any other provider's API with an agent's login. To read Claude Code's limits, `codync-host install` routes its status line through `codync-host statusline`; a status line you already had keeps working and is restored when you uninstall.
## The relay