One live console to monitor Claude Code and Codex agents across machines, track context and spend, and unblock sessions that need you.
import { useEffect, useState } from "react";
/** The current time, refreshed every `ms`, so elapsed times move between server messages. */
export function useNow(ms = 1000): number {
const [now, setNow] = useState(Date.now);
useEffect(() => {
const timer = setInterval(() => setNow(Date.now()), ms);
return () => clearInterval(timer);
}, [ms]);
return now;
}