[{"data":1,"prerenderedAt":1149},["ShallowReactive",2],{"post-en-codexbar-5h-vs-weekly-quota-calculation":3,"surround-en-blog\u002Fen\u002Fblog\u002Fcodexbar-5h-vs-weekly-quota-calculation.md":1136},{"id":4,"title":5,"body":6,"canonical":151,"category":1118,"date":1119,"description":1120,"extension":1121,"image":1122,"meta":1123,"navigation":342,"path":1124,"seo":1125,"slug":1126,"status":1127,"stem":1128,"tags":1129,"translationSlug":1126,"__hash__":1135},"blog\u002Fen\u002Fblog\u002Fcodexbar-5h-vs-weekly-quota-calculation.md","How Much Weekly Quota Does a 5-Hour Window Consume? Calculating Claude, Codex, and Antigravity with CodexBar History",{"type":7,"value":8,"toc":1105},"minimark",[9,14,18,21,88,91,98,104,108,111,123,126,136,140,145,193,208,235,239,257,302,309,313,320,724,727,745,748,756,759,785,788,791,830,833,837,840,859,909,924,928,933,940,944,1080,1084,1087,1101],[10,11,13],"h2",{"id":12},"_1-background-and-bluf-bottom-line-up-front","1. Background and BLUF (Bottom Line Up Front)",[15,16,17],"p",{},"I subscribe to Claude Pro, ChatGPT Plus (using Codex), and Google AI Pro (using Antigravity). All three enforce a two-tier quota model: a rolling 5-hour session window and an overall weekly allotment. I wanted to understand two questions: How much of the weekly quota does a full 5-hour window consume? And what daily pacing ensures you don't waste unused quota before the weekly reset?",[15,19,20],{},"CodexBar logs percentage snapshots locally. I wrote a Python script to parse these logs and extract consumption deltas within matching windows:",[22,23,24,43],"table",{},[25,26,27],"thead",{},[28,29,30,34,37,40],"tr",{},[31,32,33],"th",{},"Account \u002F Pool",[31,35,36],{},"One 5h Window ≈ Weekly Quota",[31,38,39],{},"Windows per Week",[31,41,42],{},"Confidence",[44,45,46,61,74],"tbody",{},[28,47,48,52,55,58],{},[49,50,51],"td",{},"Claude Pro",[49,53,54],{},"12.5%–13%",[49,56,57],{},"7.5–8",[49,59,60],{},"High",[28,62,63,66,69,72],{},[49,64,65],{},"Codex (ChatGPT Plus)",[49,67,68],{},"~16%",[49,70,71],{},"~6.4",[49,73,60],{},[28,75,76,79,82,85],{},[49,77,78],{},"Antigravity Regular Gemini (Google AI Pro)",[49,80,81],{},"~28.6%",[49,83,84],{},"~3.5",[49,86,87],{},"Moderate",[15,89,90],{},"Running this analysis revealed that October 22 was my Claude weekly reset day. At 11:54 AM, I had only used 46% of my weekly quota. Even by maxing out every remaining 5-hour window until the 10:00 PM reset, the total would cap out at ~73%. Because usage was too light earlier in the week, no amount of late sprint could recover the lost quota.",[15,92,93,97],{},[94,95,96],"strong",{},"TL;DR",": Don't count individual session resets—monitor your daily weekly quota growth. For a 7-day work week, Claude requires burning slightly more than one full 5-hour window every day, Codex needs about 90% of a full window daily, and Antigravity only needs half a window per day.",[15,99,100],{},[101,102,103],"em",{},"Note: These benchmarks reflect real usage on my personal accounts in October 2026. Providers do not publish static conversion factors.",[10,105,107],{"id":106},"_2-core-mental-model-why-you-cannot-simply-divide-current-percentages","2. Core Mental Model: Why You Cannot Simply Divide Current Percentages",[15,109,110],{},"The intuitive approach is dividing the two current numbers shown in CodexBar: e.g., Claude 5h at 85% and weekly at 46%. This produces a meaningless ratio because 46% includes all cumulative sessions earlier in the week.",[15,112,113,114,117,118,122],{},"Valid ratios require computing matching ",[94,115,116],{},"deltas",". Within the same 5-hour window, any activity draws down both quotas simultaneously. Therefore: ",[119,120,121],"code",{},"(Weekly Quota Delta) ÷ (5-Hour Quota Delta) = Equivalent Weekly Quota for a Full 5-Hour Window",". Between 12:58 and 13:58 on October 19, my Claude 5h usage jumped from 48% to 80% (+32), while weekly usage moved from 8% to 12% (+4): 4 ÷ 32 = 12.5%. A subsequent window the next evening recorded +48 and +6, again exactly 12.5%.",[15,124,125],{},"Two critical constraints to keep in mind:",[127,128,129,133],"ul",{},[130,131,132],"li",{},"A \"5-hour window\" represents a quota bucket, not 5 hours of continuous typing. Under agentic loads, a bucket can be depleted rapidly.",[130,134,135],{},"Changing clients does not provide separate quota. Anthropic documentation clarifies that claude.ai, Claude Code, and Claude Desktop share a single quota pool; OpenAI notes ChatGPT Work and Codex share usage, and Codex Pro currently has no 5-hour limit. Quota draw rate also varies with model selection, reasoning effort, context length, and tool calls.",[10,137,139],{"id":138},"_3-reproduction-steps","3. Reproduction Steps",[141,142,144],"h3",{"id":143},"step-1-locate-codexbar-local-history-files","Step 1: Locate CodexBar Local History Files",[146,147,152],"pre",{"className":148,"code":149,"language":150,"meta":151,"style":151},"language-sh shiki shiki-themes github-light github-dark","codexbar --help | head -1\nls ~\u002FLibrary\u002FApplication\\ Support\u002Fcom.steipete.codexbar\u002Fhistory\u002F\n","sh","",[119,153,154,177],{"__ignoreMap":151},[155,156,159,163,167,171,174],"span",{"class":157,"line":158},"line",1,[155,160,162],{"class":161},"sScJk","codexbar",[155,164,166],{"class":165},"sj4cs"," --help",[155,168,170],{"class":169},"szBVR"," |",[155,172,173],{"class":161}," head",[155,175,176],{"class":165}," -1\n",[155,178,180,183,187,190],{"class":157,"line":179},2,[155,181,182],{"class":161},"ls",[155,184,186],{"class":185},"sZZnC"," ~\u002FLibrary\u002FApplication",[155,188,189],{"class":165},"\\ ",[155,191,192],{"class":185},"Support\u002Fcom.steipete.codexbar\u002Fhistory\u002F\n",[15,194,195,196,199,200,203,204,207],{},"On CodexBar 0.79.0, the history directory contains ",[119,197,198],{},"antigravity.json",", ",[119,201,202],{},"claude.json",", and ",[119,205,206],{},"codex.json",". You can query live usage via the CLI:",[146,209,211],{"className":148,"code":210,"language":150,"meta":151,"style":151},"codexbar usage --provider claude --format json --pretty\n",[119,212,213],{"__ignoreMap":151},[155,214,215,217,220,223,226,229,232],{"class":157,"line":158},[155,216,162],{"class":161},[155,218,219],{"class":185}," usage",[155,221,222],{"class":165}," --provider",[155,224,225],{"class":185}," claude",[155,227,228],{"class":165}," --format",[155,230,231],{"class":185}," json",[155,233,234],{"class":165}," --pretty\n",[141,236,238],{"id":237},"step-2-understand-the-json-schema","Step 2: Understand the JSON Schema",[15,240,241,242,245,246,249,250,245,253,256],{},"Files are organized by account key. Each account contains two series: ",[119,243,244],{},"session"," (",[119,247,248],{},"windowMinutes: 300",") and ",[119,251,252],{},"weekly",[119,254,255],{},"windowMinutes: 10080","). Entries record three fields:",[146,258,262],{"className":259,"code":260,"language":261,"meta":151,"style":151},"language-json shiki shiki-themes github-light github-dark","{\"capturedAt\": \"2026-10-19T04:58:37Z\", \"resetsAt\": \"2026-10-19T08:30:00Z\", \"usedPercent\": 48}\n","json",[119,263,264],{"__ignoreMap":151},[155,265,266,270,273,276,279,281,284,286,289,291,294,296,299],{"class":157,"line":158},[155,267,269],{"class":268},"sVt8B","{",[155,271,272],{"class":165},"\"capturedAt\"",[155,274,275],{"class":268},": ",[155,277,278],{"class":185},"\"2026-10-19T04:58:37Z\"",[155,280,199],{"class":268},[155,282,283],{"class":165},"\"resetsAt\"",[155,285,275],{"class":268},[155,287,288],{"class":185},"\"2026-10-19T08:30:00Z\"",[155,290,199],{"class":268},[155,292,293],{"class":165},"\"usedPercent\"",[155,295,275],{"class":268},[155,297,298],{"class":165},"48",[155,300,301],{"class":268},"}\n",[15,303,304,305,308],{},"Timestamps are stored in UTC, sampled roughly once per hour. They represent percentage snapshots rather than individual transaction billings. A file may contain multiple accounts; ",[119,306,307],{},"preferredAccountKey"," marks the active one.",[141,310,312],{"id":311},"step-3-filter-paired-windows-and-calculate-ratios","Step 3: Filter Paired Windows and Calculate Ratios",[15,314,315,316,319],{},"Save the following script as ",[119,317,318],{},"quota_ratio.py",":",[146,321,325],{"className":322,"code":323,"language":324,"meta":151,"style":151},"language-python shiki shiki-themes github-light github-dark","#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"用 CodexBar 本地历史估算：一整轮 5 小时额度约等于多少周额度。\n\n用法：python3 quota_ratio.py \u003Cclaude|codex|antigravity> [起始时间] [5 小时增量下限]\n\"\"\"\nimport json\nimport sys\nfrom datetime import datetime\nfrom pathlib import Path\n\nprovider = sys.argv[1]\nsince = sys.argv[2] if len(sys.argv) > 2 else \"1970-01-01\"   # 只用这个时间之后的采样（UTC）\nmin_delta = float(sys.argv[3]) if len(sys.argv) > 3 else 15  # 整数百分比的产品建议 15\n\npath = Path.home() \u002F \"Library\u002FApplication Support\u002Fcom.steipete.codexbar\u002Fhistory\" \u002F f\"{provider}.json\"\ndata = json.loads(path.read_text())\nseries = data[\"accounts\"][data[\"preferredAccountKey\"]]       # 只取当前账户\n\n\ndef entries(name, minutes):\n    return {e[\"capturedAt\"]: e for s in series\n            if s[\"name\"] == name and s[\"windowMinutes\"] == minutes for e in s[\"entries\"]}\n\n\ndef ts(t):\n    return datetime.fromisoformat(t.replace(\"Z\", \"+00:00\"))\n\n\ndef close(a, b):                                             # resetsAt 会有 ±1 分钟抖动\n    return abs((ts(a) - ts(b)).total_seconds()) \u003C= 60\n\n\nsession, weekly = entries(\"session\", 300), entries(\"weekly\", 10080)\nsamples = [(t, session[t], weekly[t]) for t in sorted(session.keys() & weekly.keys()) if t >= since]\n\n\ndef same_window(a, b):\n    (_, sa, wa), (tb, sb, wb) = a, b\n    if not all(e.get(\"resetsAt\") for e in (sa, sb, wa, wb)):  # 空闲条目可能没有 resetsAt\n        return False\n    return (close(sa[\"resetsAt\"], sb[\"resetsAt\"]) and close(wa[\"resetsAt\"], wb[\"resetsAt\"])\n            and ts(sb[\"resetsAt\"]) > ts(tb)                   # 后一条还没过 5 小时重置点\n            and sb[\"usedPercent\"] >= sa[\"usedPercent\"]\n            and wb[\"usedPercent\"] >= wa[\"usedPercent\"])\n\n\ngroups = []\nfor s in samples:\n    if groups and same_window(groups[-1][-1], s):\n        groups[-1].append(s)\n    else:\n        groups.append([s])\n\ntotal_s = total_w = 0\nfor g in groups:\n    (ta, sa, wa), (tb, sb, wb) = g[0], g[-1]\n    ds = sb[\"usedPercent\"] - sa[\"usedPercent\"]\n    dw = wb[\"usedPercent\"] - wa[\"usedPercent\"]\n    if ds \u003C min_delta or dw \u003C= 0:\n        continue\n    total_s += ds\n    total_w += dw\n    print(f\"{ta} → {tb}  5h +{ds:g}  周 +{dw:g}  比例 {dw \u002F ds:.1%}\")\n\nif total_s:\n    r = total_w \u002F total_s\n    print(f\"合计：5h +{total_s:g}，周 +{total_w:g} → 一整轮 5h ≈ 周额度的 {r:.1%}，一周约 {1 \u002F r:.1f} 轮\")\nelse:\n    print(\"没有符合条件的样本：放宽起始时间，或调低 5 小时增量下限\")\n","python",[119,326,327,332,337,344,350,356,362,368,374,380,385,391,397,403,408,414,420,426,431,436,442,448,454,459,464,470,476,481,486,492,498,503,508,514,520,525,530,536,542,548,554,560,566,572,578,583,588,594,600,606,612,618,624,629,635,641,647,653,659,665,671,677,683,689,694,700,706,712,718],{"__ignoreMap":151},[155,328,329],{"class":157,"line":158},[155,330,331],{},"#!\u002Fusr\u002Fbin\u002Fenv python3\n",[155,333,334],{"class":157,"line":179},[155,335,336],{},"\"\"\"用 CodexBar 本地历史估算：一整轮 5 小时额度约等于多少周额度。\n",[155,338,340],{"class":157,"line":339},3,[155,341,343],{"emptyLinePlaceholder":342},true,"\n",[155,345,347],{"class":157,"line":346},4,[155,348,349],{},"用法：python3 quota_ratio.py \u003Cclaude|codex|antigravity> [起始时间] [5 小时增量下限]\n",[155,351,353],{"class":157,"line":352},5,[155,354,355],{},"\"\"\"\n",[155,357,359],{"class":157,"line":358},6,[155,360,361],{},"import json\n",[155,363,365],{"class":157,"line":364},7,[155,366,367],{},"import sys\n",[155,369,371],{"class":157,"line":370},8,[155,372,373],{},"from datetime import datetime\n",[155,375,377],{"class":157,"line":376},9,[155,378,379],{},"from pathlib import Path\n",[155,381,383],{"class":157,"line":382},10,[155,384,343],{"emptyLinePlaceholder":342},[155,386,388],{"class":157,"line":387},11,[155,389,390],{},"provider = sys.argv[1]\n",[155,392,394],{"class":157,"line":393},12,[155,395,396],{},"since = sys.argv[2] if len(sys.argv) > 2 else \"1970-01-01\"   # 只用这个时间之后的采样（UTC）\n",[155,398,400],{"class":157,"line":399},13,[155,401,402],{},"min_delta = float(sys.argv[3]) if len(sys.argv) > 3 else 15  # 整数百分比的产品建议 15\n",[155,404,406],{"class":157,"line":405},14,[155,407,343],{"emptyLinePlaceholder":342},[155,409,411],{"class":157,"line":410},15,[155,412,413],{},"path = Path.home() \u002F \"Library\u002FApplication Support\u002Fcom.steipete.codexbar\u002Fhistory\" \u002F f\"{provider}.json\"\n",[155,415,417],{"class":157,"line":416},16,[155,418,419],{},"data = json.loads(path.read_text())\n",[155,421,423],{"class":157,"line":422},17,[155,424,425],{},"series = data[\"accounts\"][data[\"preferredAccountKey\"]]       # 只取当前账户\n",[155,427,429],{"class":157,"line":428},18,[155,430,343],{"emptyLinePlaceholder":342},[155,432,434],{"class":157,"line":433},19,[155,435,343],{"emptyLinePlaceholder":342},[155,437,439],{"class":157,"line":438},20,[155,440,441],{},"def entries(name, minutes):\n",[155,443,445],{"class":157,"line":444},21,[155,446,447],{},"    return {e[\"capturedAt\"]: e for s in series\n",[155,449,451],{"class":157,"line":450},22,[155,452,453],{},"            if s[\"name\"] == name and s[\"windowMinutes\"] == minutes for e in s[\"entries\"]}\n",[155,455,457],{"class":157,"line":456},23,[155,458,343],{"emptyLinePlaceholder":342},[155,460,462],{"class":157,"line":461},24,[155,463,343],{"emptyLinePlaceholder":342},[155,465,467],{"class":157,"line":466},25,[155,468,469],{},"def ts(t):\n",[155,471,473],{"class":157,"line":472},26,[155,474,475],{},"    return datetime.fromisoformat(t.replace(\"Z\", \"+00:00\"))\n",[155,477,479],{"class":157,"line":478},27,[155,480,343],{"emptyLinePlaceholder":342},[155,482,484],{"class":157,"line":483},28,[155,485,343],{"emptyLinePlaceholder":342},[155,487,489],{"class":157,"line":488},29,[155,490,491],{},"def close(a, b):                                             # resetsAt 会有 ±1 分钟抖动\n",[155,493,495],{"class":157,"line":494},30,[155,496,497],{},"    return abs((ts(a) - ts(b)).total_seconds()) \u003C= 60\n",[155,499,501],{"class":157,"line":500},31,[155,502,343],{"emptyLinePlaceholder":342},[155,504,506],{"class":157,"line":505},32,[155,507,343],{"emptyLinePlaceholder":342},[155,509,511],{"class":157,"line":510},33,[155,512,513],{},"session, weekly = entries(\"session\", 300), entries(\"weekly\", 10080)\n",[155,515,517],{"class":157,"line":516},34,[155,518,519],{},"samples = [(t, session[t], weekly[t]) for t in sorted(session.keys() & weekly.keys()) if t >= since]\n",[155,521,523],{"class":157,"line":522},35,[155,524,343],{"emptyLinePlaceholder":342},[155,526,528],{"class":157,"line":527},36,[155,529,343],{"emptyLinePlaceholder":342},[155,531,533],{"class":157,"line":532},37,[155,534,535],{},"def same_window(a, b):\n",[155,537,539],{"class":157,"line":538},38,[155,540,541],{},"    (_, sa, wa), (tb, sb, wb) = a, b\n",[155,543,545],{"class":157,"line":544},39,[155,546,547],{},"    if not all(e.get(\"resetsAt\") for e in (sa, sb, wa, wb)):  # 空闲条目可能没有 resetsAt\n",[155,549,551],{"class":157,"line":550},40,[155,552,553],{},"        return False\n",[155,555,557],{"class":157,"line":556},41,[155,558,559],{},"    return (close(sa[\"resetsAt\"], sb[\"resetsAt\"]) and close(wa[\"resetsAt\"], wb[\"resetsAt\"])\n",[155,561,563],{"class":157,"line":562},42,[155,564,565],{},"            and ts(sb[\"resetsAt\"]) > ts(tb)                   # 后一条还没过 5 小时重置点\n",[155,567,569],{"class":157,"line":568},43,[155,570,571],{},"            and sb[\"usedPercent\"] >= sa[\"usedPercent\"]\n",[155,573,575],{"class":157,"line":574},44,[155,576,577],{},"            and wb[\"usedPercent\"] >= wa[\"usedPercent\"])\n",[155,579,581],{"class":157,"line":580},45,[155,582,343],{"emptyLinePlaceholder":342},[155,584,586],{"class":157,"line":585},46,[155,587,343],{"emptyLinePlaceholder":342},[155,589,591],{"class":157,"line":590},47,[155,592,593],{},"groups = []\n",[155,595,597],{"class":157,"line":596},48,[155,598,599],{},"for s in samples:\n",[155,601,603],{"class":157,"line":602},49,[155,604,605],{},"    if groups and same_window(groups[-1][-1], s):\n",[155,607,609],{"class":157,"line":608},50,[155,610,611],{},"        groups[-1].append(s)\n",[155,613,615],{"class":157,"line":614},51,[155,616,617],{},"    else:\n",[155,619,621],{"class":157,"line":620},52,[155,622,623],{},"        groups.append([s])\n",[155,625,627],{"class":157,"line":626},53,[155,628,343],{"emptyLinePlaceholder":342},[155,630,632],{"class":157,"line":631},54,[155,633,634],{},"total_s = total_w = 0\n",[155,636,638],{"class":157,"line":637},55,[155,639,640],{},"for g in groups:\n",[155,642,644],{"class":157,"line":643},56,[155,645,646],{},"    (ta, sa, wa), (tb, sb, wb) = g[0], g[-1]\n",[155,648,650],{"class":157,"line":649},57,[155,651,652],{},"    ds = sb[\"usedPercent\"] - sa[\"usedPercent\"]\n",[155,654,656],{"class":157,"line":655},58,[155,657,658],{},"    dw = wb[\"usedPercent\"] - wa[\"usedPercent\"]\n",[155,660,662],{"class":157,"line":661},59,[155,663,664],{},"    if ds \u003C min_delta or dw \u003C= 0:\n",[155,666,668],{"class":157,"line":667},60,[155,669,670],{},"        continue\n",[155,672,674],{"class":157,"line":673},61,[155,675,676],{},"    total_s += ds\n",[155,678,680],{"class":157,"line":679},62,[155,681,682],{},"    total_w += dw\n",[155,684,686],{"class":157,"line":685},63,[155,687,688],{},"    print(f\"{ta} → {tb}  5h +{ds:g}  周 +{dw:g}  比例 {dw \u002F ds:.1%}\")\n",[155,690,692],{"class":157,"line":691},64,[155,693,343],{"emptyLinePlaceholder":342},[155,695,697],{"class":157,"line":696},65,[155,698,699],{},"if total_s:\n",[155,701,703],{"class":157,"line":702},66,[155,704,705],{},"    r = total_w \u002F total_s\n",[155,707,709],{"class":157,"line":708},67,[155,710,711],{},"    print(f\"合计：5h +{total_s:g}，周 +{total_w:g} → 一整轮 5h ≈ 周额度的 {r:.1%}，一周约 {1 \u002F r:.1f} 轮\")\n",[155,713,715],{"class":157,"line":714},68,[155,716,717],{},"else:\n",[155,719,721],{"class":157,"line":720},69,[155,722,723],{},"    print(\"没有符合条件的样本：放宽起始时间，或调低 5 小时增量下限\")\n",[15,725,726],{},"Execution:",[146,728,730],{"className":148,"code":729,"language":150,"meta":151,"style":151},"python3 quota_ratio.py claude 2026-10-15\n",[119,731,732],{"__ignoreMap":151},[155,733,734,737,740,742],{"class":157,"line":158},[155,735,736],{"class":161},"python3",[155,738,739],{"class":185}," quota_ratio.py",[155,741,225],{"class":185},[155,743,744],{"class":185}," 2026-10-15\n",[15,746,747],{},"Observed output from October 22:",[146,749,754],{"className":750,"code":752,"language":753,"meta":151},[751],"language-text","2026-10-19T03:59:15Z → 2026-10-19T07:59:31Z  5h +56  周 +8  比例 14.3%\n2026-10-19T14:57:59Z → 2026-10-19T18:55:03Z  5h +19  周 +2  比例 10.5%\n2026-10-20T10:56:43Z → 2026-10-20T14:57:51Z  5h +91  周 +11  比例 12.1%\n2026-10-22T02:59:05Z → 2026-10-22T06:56:11Z  5h +64  周 +9  比例 14.1%\n2026-10-22T07:56:59Z → 2026-10-22T11:52:47Z  5h +44  周 +6  比例 13.6%\n合计：5h +274，周 +36 → 一整轮 5h ≈ 周额度的 13.1%，一周约 7.6 轮\n","text",[119,755,752],{"__ignoreMap":151},[15,757,758],{},"The script performs three tasks:",[760,761,762,775,782],"ol",{},[130,763,764,765,768,769,771,772,774],{},"Filters timestamps matching ",[119,766,767],{},"since"," for the active account and aligns ",[119,770,244],{}," and ",[119,773,252],{}," entries.",[130,776,777,778,781],{},"Identifies continuous windows where ",[119,779,780],{},"resetsAt"," aligns within 60 seconds and neither metric decreases.",[130,783,784],{},"Calculates delta per window using first and last records, filters out trivial increments, and sums totals before dividing.",[15,786,787],{},"Individual window ratios fluctuate between 10.5% and 14.3% due to integer truncation. The aggregated 13.1% lines up closely with the manual 12.5% samples, making 12.5%–13% a reliable budgeting baseline.",[15,789,790],{},"For other providers:",[146,792,794],{"className":148,"code":793,"language":150,"meta":151,"style":151},"python3 quota_ratio.py codex 2026-10-20T07:23:40Z   # 从本周周窗口开始的时间算起（UTC）\npython3 quota_ratio.py antigravity 2026-10-14 2     # 百分比是小数，但会回落，下限设成 2\n",[119,795,796,812],{"__ignoreMap":151},[155,797,798,800,802,805,808],{"class":157,"line":158},[155,799,736],{"class":161},[155,801,739],{"class":185},[155,803,804],{"class":185}," codex",[155,806,807],{"class":185}," 2026-10-20T07:23:40Z",[155,809,811],{"class":810},"sJ8bj","   # 从本周周窗口开始的时间算起（UTC）\n",[155,813,814,816,818,821,824,827],{"class":157,"line":179},[155,815,736],{"class":161},[155,817,739],{"class":185},[155,819,820],{"class":185}," antigravity",[155,822,823],{"class":185}," 2026-10-14",[155,825,826],{"class":165}," 2",[155,828,829],{"class":810},"     # 百分比是小数，但会回落，下限设成 2\n",[15,831,832],{},"Codex yields 15.6% (~15.7% in interactive runs). Antigravity yields 28.9% (~28.57% across 2\u002F7 integer fractions).",[141,834,836],{"id":835},"step-4-translating-ratios-into-daily-pacing-targets","Step 4: Translating Ratios into Daily Pacing Targets",[15,838,839],{},"Formulas:",[127,841,842,848],{},[130,843,844,845],{},"Windows per week ≈ ",[119,846,847],{},"1 \u002F r",[130,849,850,851,854,855,858],{},"Target usage per day across ",[119,852,853],{},"D"," active days = ",[119,856,857],{},"1 \u002F (D × r)"," full windows",[22,860,861,874],{},[25,862,863],{},[28,864,865,868,871],{},[31,866,867],{},"Account (r)",[31,869,870],{},"7 Active Days \u002F Week",[31,872,873],{},"5 Active Days \u002F Week",[44,875,876,887,898],{},[28,877,878,881,884],{},[49,879,880],{},"Claude (12.5%)",[49,882,883],{},"1 full window daily + 1 extra window on 1 day",[49,885,886],{},"2 windows daily at ~80% each",[28,888,889,892,895],{},[49,890,891],{},"Codex (16%)",[49,893,894],{},"~90% of a full window daily",[49,896,897],{},"~125% of a window daily (e.g., 80% morning, 45% evening)",[28,899,900,903,906],{},[49,901,902],{},"Antigravity (28.6%)",[49,904,905],{},"Half a window daily",[49,907,908],{},"~70% of a window daily",[15,910,911,912,915,916,919,920,923],{},"Mid-week rebalancing formula: ",[119,913,914],{},"Remaining Weekly Quota ÷ Remaining Days ÷ r"," determines needed daily window throughput. Alternatively, compare elapsed weekly window percentage against consumed quota. The ",[119,917,918],{},"expectedUsedPercent"," field in ",[119,921,922],{},"codexbar usage --format json"," directly tracks this pace.",[141,925,927],{"id":926},"step-5-near-reset-feasibility-check","Step 5: Near-Reset Feasibility Check",[15,929,930],{},[119,931,932],{},"Maximum Achievable Quota = Current Weekly % + (Remaining in Current Window % + Max Usable Future Windows × 100%) × r",[15,934,935,936,939],{},"On October 22: at 11:54 AM, Claude weekly usage was 46% with 22:00 reset; the 5-hour window was at 85% with 15:20 reset. Burning the remaining 15%, completing a full window after 15:20, and running a final window before 22:00 yields: ",[119,937,938],{},"46% + (15 + 100 + 100) × 12.5% ≈ 73%",". Over a quarter of weekly allocation was mathematically unreachable.",[10,941,943],{"id":942},"_4-troubleshooting-and-edge-cases","4. Troubleshooting and Edge Cases",[22,945,946,959],{},[25,947,948],{},[28,949,950,953,956],{},[31,951,952],{},"Symptom",[31,954,955],{},"Root Cause",[31,957,958],{},"Fix",[44,960,961,976,990,1019,1030,1041,1052,1063],{},[28,962,963,970,973],{},[49,964,965,966,969],{},"Hardcoded timestamps throw ",[119,967,968],{},"KeyError"," on repeat runs",[49,971,972],{},"Snapshots within the same hour are overwritten by newer samples",[49,974,975],{},"Filter entries dynamically rather than hardcoding timestamps",[28,977,978,984,987],{},[49,979,980,981,983],{},"Window ",[119,982,780],{}," values misalign",[49,985,986],{},"Idle entries use synthetic timestamps; resets jitter by ±1 min",[49,988,989],{},"Allow 60-second tolerance; treat missing fields as window breaks",[28,991,992,999,1009],{},[49,993,994,995,998],{},"Antigravity ",[119,996,997],{},"primary"," is not 5 hours",[49,1000,1001,1002,1004,1005,1008],{},"Field mapping differs: Antigravity ",[119,1003,997],{}," tracks Gemini weekly, ",[119,1006,1007],{},"secondary"," tracks Claude\u002FGPT 5h",[49,1010,1011,1012,1015,1016],{},"Key off ",[119,1013,1014],{},"windowMinutes"," and bucket ",[119,1017,1018],{},"id",[28,1020,1021,1024,1027],{},[49,1022,1023],{},"Menu bar displays 80% while CLI shows 85%",[49,1025,1026],{},"Menu bar UI uses cached state",[49,1028,1029],{},"Trust CLI values for calculations",[28,1031,1032,1035,1038],{},[49,1033,1034],{},"Adjacent sample ratios swing wildly between 12.5% and 20%",[49,1036,1037],{},"Integer percentage quantization",[49,1039,1040],{},"Use larger window deltas and aggregate before division",[28,1042,1043,1046,1049],{},[49,1044,1045],{},"Antigravity usage drops backward",[49,1047,1048],{},"Unknown server-side reconciliation; quota pools are fragmented",[49,1050,1051],{},"Only evaluate strictly increasing windows with large deltas",[28,1053,1054,1057,1060],{},[49,1055,1056],{},"Estimating Claude vs Gemini cost multiplier in Antigravity",[49,1058,1059],{},"Claude and GPT share a combined quota pool",[49,1061,1062],{},"Insufficient discrete logging; requires controlled benchmark tasks",[28,1064,1065,1068,1077],{},[49,1066,1067],{},"CLI dumps contain email or organization names",[49,1069,1070,771,1073,1076],{},[119,1071,1072],{},"accountEmail",[119,1074,1075],{},"accountOrganization"," fields",[49,1078,1079],{},"Sanitize JSON before sharing logs",[10,1081,1083],{"id":1082},"_5-summary-and-scope","5. Summary and Scope",[15,1085,1086],{},"If you use CodexBar and need predictable capacity planning across multiple AI subscriptions, this delta-based method provides an actionable schedule:",[127,1088,1089,1092,1095,1098],{},[130,1090,1091],{},"Conversion ratios reflect single-account, single-cycle observations. Upgrades (e.g. Claude Max) or shifts in reasoning effort require re-evaluating.",[130,1093,1094],{},"Codex weekly reset timestamps can adjust mid-cycle. Follow live CLI reset values.",[130,1096,1097],{},"Complimentary quota resets are treated separately (e.g. Codex Full resets or Claude limit resets).",[130,1099,1100],{},"Antigravity's ~28.6% ratio has wider variance due to pool telemetry fluctuations.",[1102,1103,1104],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":151,"searchDepth":179,"depth":179,"links":1106},[1107,1108,1109,1116,1117],{"id":12,"depth":179,"text":13},{"id":106,"depth":179,"text":107},{"id":138,"depth":179,"text":139,"children":1110},[1111,1112,1113,1114,1115],{"id":143,"depth":339,"text":144},{"id":237,"depth":339,"text":238},{"id":311,"depth":339,"text":312},{"id":835,"depth":339,"text":836},{"id":926,"depth":339,"text":927},{"id":942,"depth":179,"text":943},{"id":1082,"depth":179,"text":1083},"coder","2026-10-22","Calculating the exact ratio of a 5-hour quota window relative to weekly limits across Claude Pro, Codex, and Antigravity using local CodexBar usage history and Python.","md",null,{},"\u002Fen\u002Fblog\u002Fcodexbar-5h-vs-weekly-quota-calculation",{"title":5,"description":1120},"codexbar-5h-vs-weekly-quota-calculation","publish","en\u002Fblog\u002Fcodexbar-5h-vs-weekly-quota-calculation",[1130,1131,1132,1133,1134],"CodexBar","Claude","Codex","Antigravity","AI Quota","WzRqsS233JFRtsbwHd15R1L3BSrBmwQim0SQQtQ8LD8",[1137,1143],{"title":1138,"path":1139,"stem":1140,"slug":1141,"date":1142,"children":-1},"Goodbye \"Use Mac Preview for Now\": Antigravity 2.28.0 Brings Built-in PDF Viewer and Browser","\u002Fen\u002Fblog\u002Fantigravity-2-28-0-builtin-pdf-viewer-browser","en\u002Fblog\u002Fantigravity-2-28-0-builtin-pdf-viewer-browser","antigravity-2-28-0-builtin-pdf-viewer-browser","2026-10-28",{"title":1144,"path":1145,"stem":1146,"slug":1147,"date":1148,"children":-1},"Guiding ChatGPT in Chrome: Navigating to Moodle Question Banks and Editing Questions","\u002Fen\u002Fblog\u002Fchatgpt-browser-moodle-question-bank","en\u002Fblog\u002Fchatgpt-browser-moodle-question-bank","chatgpt-browser-moodle-question-bank","2026-10-21",1793891963602]