Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>VSCode Codex SpeedNew to Visual Studio Code? Get it now.
VSCode Codex Speed

VSCode Codex Speed

NO00

|
16 installs
| (0) | Free
Monitor Codex output token/s in the VS Code status bar, including Remote SSH.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VSCode Codex Speed

在状态栏查看 Codex 输出速度,包括 Remote SSH 服务器上的会话。

See Codex output speed in your VS Code status bar, including sessions on a Remote SSH server.

简体中文 · English · GitHub · 反馈问题 / Report an issue

Codex 85.0 tok/s          输出速度 / Measured rate
Codex ~85.0 tok/s         生成中估算 / Generation estimate
Codex 0.0 tok/s          无当前输出 / No current output

简体中文

能帮你做什么

  • 直接在状态栏查看 Codex 的输出 token/s,悬停查看最近调用的模型、输出数量和耗时。
  • 在 Remote SSH 窗口读取服务器上的 Codex 日志,不用手动同步日志或再次配置 SSH 连接。
  • 汇总多个会话和子 agent,也可以只查看当前工作区中的会话。
  • 点击状态栏打开仪表盘:数字读数、1/2/5 分钟曲线、会话列表及可切换范围的用量。
  • 按模型估算 API 等值美元费用,拆分普通输入、缓存输入与输出,支持自定义单价。
  • 查看订阅额度已用比例、重置时间与剩余时间,区分首段内容等待和最近已观测调用,并按模型汇总当前速度。

这是独立的社区扩展,不属于 OpenAI 官方产品。界面默认跟随 VS Code 显示语言,支持英文、简体中文和繁体中文;其他语言使用英文。

设置 codexSpeed.language 可选 auto(默认)、en、zh-cn 或 zh-tw。手动切换立即更新状态栏、悬浮提示、仪表盘及诊断提示,无需重载。Remote SSH 跟随客户端语言,手动选择请写入远程设置。命令面板标题和设置说明始终跟随 VS Code 显示语言。

仪表盘

悬停显示简洁摘要,点击状态栏打开完整仪表盘。核心测速采用与 Agent Speed 相同的 Codex 口径:三秒窗口合计实测与在途估算;完成计数到达后按调用区间重建历史,替换此前估算。曲线为最近三百个一秒桶,蓝线是实测部分,蓝绿色虚线为含估算的合计;悬停或方向键可查看每秒组成与占比。主读数是三秒平均,不必与某个一秒值完全相等。

用量支持近 30 分钟、今天、近 7 天和近 30 天,默认“今天”,按客户端时区划分。近 7/30 天是滚动小时窗口。输入可能含缓存 token,平均速度取耗时已知的完成调用;五分钟监测峰值可能含估算,并会随曲线重建而校正。

首次使用会分批索引历史,显示进度及不完整提示。缓存保存计数与读取断点,重启后继续增量读取;只支持 sessions 目录下近 30 天内更新的未压缩 JSONL。缓存文件保存在扩展存储目录,Codex 日志保持只读。

支持新版分页子会话,排除继承的父历史,避免用量和费用重复;子 agent 邮箱计时与原生缓存写入计数也已兼容。升级后会分批重新核算历史;源日志已删除时保留旧统计,并提示尚未验证的缓存可能包含继承历史。

监控台采用蓝色实测线和浅蓝绿色估算线:宽屏为并排趋势区、横向用量数据和会话表格,窄窗口转为紧凑卡片。顶部可选择语言、重新扫描或打开设置,连接信息在下方按需展开。关闭面板后仍按已有监控周期采样,未增加额外扫描计时器;不监测网络流量。

运行概况

订阅额度直接读取 Codex 日志中的账户快照,显示实际提供的 5 小时、每周或其他周期、已用比例、重置日期和剩余时间。它覆盖当前 Codex 数据目录的全部工作区,不累加不同会话的百分比,也不随用量日期范围改变。没有记录时显示暂无额度;旧于一小时会标记旧快照。重置时间已到时等待新日志确认,不假定用量已经归零;点击重新扫描只会读日志,不请求额度 API。

“首段内容等待”指请求起点到首个思考、助手消息或工具调用事件写入日志的时间,并非精确的首 token 延迟。等待中显示当前最久请求的已等待时长(≥);活跃请求已有首段时显示已观测均值,空闲时显示最近半小时中最近一次可确认的调用。缺少起点或首段事件时显示暂无数据。

按模型汇总与主读数共用最近三秒窗口,区分实测和估算。模型切换后,上一条完成调用仍归属它实际记录的模型,新的在途估算归属当前模型;模型汇总不会改变费用计价。

API 等值费用

费用卡片随用量时间范围和工作区范围更新,显示美元总额、普通输入/缓存输入/输出费用及模型明细。按离线 OpenAI 标准 API 价格快照估算所选完成记录,当前快照为 2026-10-27,并处理已核对模型的长上下文加价。无需 API Key,不增加模型请求。

这不是 Codex 实际账单。未知模型显示“未计价”;日志缺少输入或缓存拆分时显示已知小计及覆盖率,不按零价处理。单列的缓存写入、工具、服务档位和地区附加费用不包含。旧缓存会渐进补齐元数据,无法读取的旧日志保留用量但可能无法计价。

有独立缓存写入价格的模型若缺少写入计数,剩余输入无法确定为普通输入;此时只合计能够确认的缓存读取与输出,显示缺失提示。日期型号不会自动套用未经核实的价格。

可点击“配置模型单价”,或在用户/远程设置中填写 "codexSpeed.priceOverrides": { "gpt-6.1-sol": { "input": 2, "cachedInput": 0.1, "output": 10 } }。单位为美元/百万 token,改价立即重算;界面语言切换继续生效。

安装后怎么用

  1. 在扩展市场搜索 VSCode Codex Speed,或使用 @id:NO00.vscode-codex-speed 安装。
  2. 使用 Remote SSH 时,确认它安装在 SSH: 服务器名 一侧。
  3. 在同一台主机上,以同一用户运行 Codex。状态栏会自动出现速度读数。

默认读取 CODEX_HOME,未设置时使用 ~/.codex。新会话通常在约五秒内被发现,之后默认每半秒刷新。

如果使用独立的 Codex 数据目录,请在 VS Code 的用户或远程设置中填写包含 sessions 子目录的路径:

{
  "codexSpeed.codexHome": "/home/your-user/.codex"
}

数字代表什么

状态栏显示 含义
85.0 tok/s 已完成响应的日志计数在最近三秒窗口内折算的速度
~85.0 tok/s 生成中,依据该会话近期调用速度估算
等待计数 尚无可靠速度参考,或已关闭估算
0.0 tok/s 三秒窗口已无输出;上次调用速度与时间在仪表盘单独展示
工具中 / 0.0 tok/s 等待工具结果,或当前空闲

~ 表示包含估算,并非逐 token 遥测。 完成记录按响应耗时均匀重建历史,因此校正后的实线也可能呈水平。工具中仍有刚完成响应的三秒窗口贡献可以正常出现;窗口排空后归零。速度含首 token 等待,输出含 reasoning。

默认统计此主机的全部近期会话,所以当前聊天停下来时,其他会话仍可能贡献速度。如果缺少结束事件,生成估算可能持续到最近一条日志后的五分钟。

常用设置

设置 默认值 用途
codexSpeed.usageRange today 用量范围,可选 30m、today、7d、30d
codexSpeed.priceOverrides {} 每模型的普通输入、缓存输入及输出美元单价(每百万 token)
codexSpeed.language auto 跟随 VS Code,或手动选择 en、zh-cn、zh-tw,立即生效
codexSpeed.scope all 改为 workspace,仅查看当前工作区中的会话
codexSpeed.showEstimates true 改为 false,生成中等待完成记录再显示实测结果
codexSpeed.pollIntervalMs 500 刷新间隔(毫秒);可调为 3000,降低轮询频率
codexSpeed.enabled true 开启或停止监控

看不到速度时

先悬停状态栏查看提示,或在命令面板执行 Codex Speed: 查看诊断日志。确认扩展和 Codex 位于同一主机,运行用户有权读取日志;codexHome 应指向 .codex 数据目录,而非 sessions 本身。此版本仅读取未压缩的会话 JSONL。

从旧的 local-codex-tools 版本迁移时,请先卸载旧扩展,避免重复状态栏。已有 codexSpeed.* 设置可继续使用。

隐私与资源占用

扩展只读会话日志,不修改 Codex 设置,不读取登录凭证,不上传对话内容,也不发起模型请求或额外消耗 token。监控会产生文件读取和计算开销。更多设置、资源限制和开发步骤请看完整中文说明。

English

What you get

  • Codex output tokens per second in the status bar. Hover for the latest measured call's model, output count, and duration.
  • Direct log monitoring on your Remote SSH host, with no manual log synchronization or extra SSH connection setup.
  • Combined readings for multiple sessions and subagents, or a view limited to your workspace folders.
  • A dashboard with a digital speed readout, 1/2/5-minute charts, session summaries and selectable usage periods.
  • API-equivalent USD estimates by model, separating uncached input, cached input and output, with configurable prices.
  • Subscription quota usage, reset dates and time remaining, first-content wait states, and live speed grouped by model.

This is an independent community extension, not an official OpenAI product. The UI follows the VS Code display language by default. English, Simplified Chinese and Traditional Chinese are supported; other languages fall back to English.

Set codexSpeed.language to auto (default), en, zh-cn or zh-tw in User or Remote settings. Manual changes immediately update the status bar, hover details, dashboard and diagnostic messages without reloading. Remote SSH follows the client's display language, not the server's system locale. Command Palette titles and Settings descriptions always follow VS Code's display language.

Dashboard

Hover for a compact summary, or click to open the dashboard. Core Codex speed follows Agent Speed's rules: a three-second window combines measured records and in-flight estimates. Completed usage reconstructs its interval and replaces the earlier estimate. The chart has 300 one-second buckets: blue for measured components, teal dashed totals when estimates contribute. Hover or use arrow keys to inspect each second. A one-second chart value need not equal the three-second main reading.

Usage supports the last 30 minutes, today, the last 7 days and the last 30 days. Today follows the client time zone; 7/30-day periods use rolling hours. Input may include cached tokens; averages use timed completed calls. The five-minute monitored peak can include estimates and is corrected with reconstructed history.

The console uses blue measured lines and teal estimate lines. Wide windows show the reading beside its trend, a horizontal usage strip and a session table; narrow windows use compact cards. Language, rescan and Settings are in the toolbar, with connection metadata in expandable details. Closing the dashboard keeps the existing status-bar sampling active, without another scanning timer. Network traffic tracking is not included.

Runtime insights

Subscription quota comes directly from rate_limits snapshots in Codex logs. The dashboard shows the reported 5-hour, weekly or other windows, percentage used, reset date and time remaining. This is account-level data for the current Codex Home across all workspaces; percentages are not added across sessions or filtered by the usage period. Missing records remain unavailable, snapshots older than one hour are labeled, and a passed reset time waits for new logs instead of assuming usage is zero. Rescan only rereads logs; no quota API or credentials are used.

First-content wait measures request start to the first reasoning, assistant or tool-call event written to the log, rather than exact first-token arrival. While waiting, ≥ shows elapsed time for the longest waiting request. Active observed requests show their mean wait; when none are generating, the most recent available observed call within thirty minutes is shown. Missing timing remains unavailable.

Speed by model uses the same three-second window as the main reading. Completed calls retain their recorded model when the session switches models; in-flight estimates use the current model. This breakdown does not change cost pricing.

API-equivalent cost

The cost card follows the selected usage period and workspace scope, showing a USD total plus uncached input, cached input and output costs for each model. Completed records use the offline OpenAI Standard API price snapshot, verified 2026-10-27, including known long-context adjustments. No API key or additional model request is needed.

This is not your actual Codex bill. Unknown models remain Unpriced. Missing input or cache details produce a Known subtotal and coverage information. Separately reported cache writes, tools, service tiers and regional premiums are excluded. Older caches are progressively enriched from available logs; deleted logs retain their counts but may remain unpriced.

When a model has a separate cache-write tariff but logs omit write counts, the remaining input is not assumed uncached: only confirmed cache reads and output are included, with a missing-count warning. Unverified date-suffixed model IDs do not inherit prices automatically.

Click Configure model prices, or set "codexSpeed.priceOverrides": { "gpt-6.1-sol": { "input": 2, "cachedInput": 0.1, "output": 10 } } in User or Remote JSON settings. Rates are USD per million tokens. Changes reprice retained usage immediately, and language switching remains available.

Get started

  1. Install VSCode Codex Speed from the Marketplace, or search for @id:NO00.vscode-codex-speed.
  2. In a Remote SSH window, confirm installation on SSH: your-server.
  3. Run Codex on that host as the same user. The status item appears automatically.

The extension uses CODEX_HOME, falling back to ~/.codex. New sessions are normally discovered within about five seconds, followed by half-second polling by default.

For a custom data directory, set codexSpeed.codexHome in VS Code User or Remote settings to the directory containing sessions, for example /home/your-user/.codex.

Read the numbers

Display Meaning
85.0 tok/s Rate derived from completed response records over the trailing three-second window
~85.0 tok/s Generation estimate based on this session's recent measured calls
Waiting for counts Waiting for usage counts; no reference is available or estimates are disabled
0.0 tok/s No current output in the three-second window; last-call rate and time appear separately in the dashboard
Tools / 0.0 tok/s Waiting for tool results, or idle

~ means estimates contribute; it is not per-token telemetry. Completed records distribute output uniformly over their response intervals, so corrected measured lines can be flat. A tools phase can still show a just-completed response's contribution to the three-second window; it returns to zero when the window empties. Duration includes time to first token; output includes reasoning.

The default host-wide scope includes other sessions, even when the chat you are viewing has stopped. Missing completion events can leave generation estimates active until five minutes after the latest log event.

Historical usage is indexed in batches from uncompressed JSONL files under sessions modified within the last 30 days. Initial indexing and incomplete results are clearly marked. Counters and read cursors are cached in extension storage so indexing can resume after a restart; Codex logs remain read-only.

Paginated Codex subagents exclude inherited parent history to prevent duplicate usage and cost. Addressed agent messages supply request timing, and native cache-write counters are supported. Upgrades progressively reanalyze available logs; deleted source logs retain old totals with an explicit warning that inherited history may remain.

Useful settings

Setting Default Purpose
codexSpeed.usageRange today Usage period: 30m, today, 7d or 30d
codexSpeed.priceOverrides {} Per-model uncached input, cached input and output USD prices per million tokens
codexSpeed.language auto Follow VS Code or manually select en, zh-cn or zh-tw; applies immediately
codexSpeed.scope all Use workspace to include only sessions inside the current workspace folders
codexSpeed.showEstimates true Set to false to wait for completed usage records rather than show generation estimates
codexSpeed.pollIntervalMs 500 Poll interval in milliseconds; use 3000 for less frequent polling
codexSpeed.enabled true Start or stop monitoring

Troubleshooting

Hover over the status item for a diagnostic message, or run Codex Speed: Show Diagnostic Logs from the Command Palette. Check that the extension and Codex run on the same host and that the extension user can read the logs. Point codexHome to the data directory, not the sessions folder. This version reads uncompressed session JSONL only.

If upgrading from an old local-codex-tools build, uninstall that extension first to avoid duplicate status items. Existing codexSpeed.* settings remain compatible.

Privacy and resource use

The extension reads logs without modifying Codex settings, reading login credentials, or uploading conversation text. It makes no model requests and consumes no extra model tokens. File reads and calculations have some resource overhead. See the full English documentation for additional settings, limits, and development instructions.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft