Repository navigation
feat(agy-proxy): emit cached_tokens from agy cache_read_tokens + muse warm-host kill test (#480) - #3764
Merged
Conversation
…muse warm-host kill degradation (#480)
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…P session ids now unique per session)
Closed
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Verification follow-up for #480 (queue task 4810), two changes:
agy-proxy: cached-token emission (settles the agy question). The agy CLI's stream-json
result.usageDOES carry a cached-input figure —cache_read_tokens, cumulative over the session like its sibling counters (verified against the real CLI's result shape on the laptop 2026-11-01: usage keysinput_tokens, output_tokens, thinking_tokens, cache_read_tokens, total_tokens). agy-proxy now deltas it per turn and emitsprompt_tokens_details.cached_tokensin both response shapes when > 0 — the same opencode#394 contract the sibling proxies (muse/codex/commandcode) already implement. Omitted entirely when the CLI reports none. Header comment records the settled answer.muse-proxy test: warm-host kill degradation. New test 'warm host killed mid-turn degrades to a successful cold exec request (#480)': the stub MSP host SIGKILLs itself mid-turn on turn 2 (before any delta), and the request must still answer via the cold exec path. This was the one spike criterion whose muse-side path was previously only covered by a serve-start failure test (codex already had 'daemon death mid-turn falls back to exec and still answers').
Tests
node --test bin/agy-proxy.test.mjs bin/muse-proxy.test.mjson the laptop: 39/39 pass, including both new tests.#480 criteria
Per-criterion verification evidence for all five spike criteria is posted on #480 with this PR; the issue closes when this PR merges.
Need help on this PR? Tag
@codesmith-botwith what you need.