From 4de95f0bde86ee98df91262bb08a679f2bc0ae62 Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Sat, 7 Mar 2026 16:04:17 +1000 Subject: [PATCH] v1.0.11 - Hide the Claude CLI token refresh window so it does not flash on screen --- src/poller.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/poller.rs b/src/poller.rs index 339a479..1325abc 100644 --- a/src/poller.rs +++ b/src/poller.rs @@ -2,12 +2,14 @@ use std::path::PathBuf; use std::process::Command; use std::time::{Duration, SystemTime, UNIX_EPOCH}; +use std::os::windows::process::CommandExt; use serde::Deserialize; use crate::models::{UsageData, UsageSection}; const USAGE_URL: &str = "https://api.anthropic.com/api/oauth/usage"; const MESSAGES_URL: &str = "https://api.anthropic.com/v1/messages"; +const CREATE_NO_WINDOW: u32 = 0x08000000; const MODEL_FALLBACK_CHAIN: &[&str] = &[ "claude-3-haiku-20240307", @@ -74,6 +76,7 @@ fn cli_refresh_token() { }; cmd.env_remove("CLAUDECODE") .env_remove("CLAUDE_CODE_ENTRYPOINT") + .creation_flags(CREATE_NO_WINDOW) .stdout(std::process::Stdio::null()) .stderr(std::process::Stdio::null());