Skip to content

fix(remote): forward Codex usage snapshots over SSH - #295

Open
F21HGG wants to merge 3 commits into
erha19:mainfrom
F21HGG:codex/remote-codex-usage
Open

fix(remote): forward Codex usage snapshots over SSH#295
F21HGG wants to merge 3 commits into
erha19:mainfrom
F21HGG:codex/remote-codex-usage

Conversation

@F21HGG

@F21HGG F21HGG commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • emit a codex_usage message from the remote bridge using the newest Codex rollout quota and token snapshot
  • merge local and remote quota snapshots by capture time while keeping remote token baselines qualified by SSH host
  • resend the current snapshot when an SSH control client attaches and cache unchanged rollout scans
  • document the forwarded usage data and add protocol, selection, analytics, and bridge coverage

Why

Remote Codex hook notifications and app-server thread events already reached Ping Island over SSH, but usage loading only scanned the Mac's local ~/.codex/sessions. As a result, sessions running exclusively on a remote host did not contribute usage data.

Validation

  • git diff --check
  • swiftc -frontend -parse for all changed Swift sources and tests
  • swift build --package-path Prototype --product PingIslandBridge
  • direct Unix-socket bridge check confirmed a live codex_usage payload with plan, quota windows, and token totals

Environment limitations

  • swift test --package-path Prototype --filter remoteAgentForwardsCodexUsageSnapshots is currently blocked in this Command Line Tools environment by the existing test target error no such module Testing
  • macOS app tests were not run because full Xcode is not installed on the validation machine

F21HGG added 2 commits August 31, 2026 21:01
- emit cached Codex quota and token snapshots from the remote bridge\n- merge remote snapshots by freshness and isolate per-host token baselines\n- cover the wire protocol and document forwarded usage data
Bound the initial rollout scan and coalesce overlapping polls so large Codex histories cannot block control connections.
@erha19

erha19 commented Sep 1, 2026

Copy link
Copy Markdown
Owner

@F21HGG 感谢提交,CI 检查未通过,麻烦解决一下

@F21HGG

F21HGG commented Sep 1, 2026

Copy link
Copy Markdown
Author

@erha19 维护者您好,#296 已修复此前的 CI 问题,我也已将本 PR 更新到最新 main。新的 CI 正在等待批准,麻烦您有空时帮忙点击 Approve and run,谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants