fix(augment): parse updated auggie account status output#1224
Conversation
…ction The auggie account status format changed to show credits remaining on a separate line without used/total breakdown, which caused CLI parsing to fail without falling back to browser cookies. Update the parser for the new format, fall back to web on parse errors, restore session cookie names, and persist cookies after session refresh. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Codex review: needs real behavior proof before merge. Reviewed May 30, 2026, 2:14 PM ET / 18:14 UTC. Summary Reproducibility: yes. Source inspection gives a high-confidence reproduction path: current main requires the legacy used/total line and refuses web fallback on AuggieCLIError.parseError, while the reported new auggie output omits that line. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow Augment parser/fallback fix once the contributor adds inspectable redacted after-fix proof and CI finishes cleanly. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection gives a high-confidence reproduction path: current main requires the legacy used/total line and refuses web fallback on AuggieCLIError.parseError, while the reported new auggie output omits that line. Is this the best way to solve the issue? Mostly yes. Extending the parser and allowing web fallback on CLI parse errors is the narrow maintainable fix, with contributor proof still needed before merge. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against d7db9922b5fb. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Brings Augment auggie CLI parsing fix to fork main while preserving local Grok direct-credits fallback comment. Upstream PR: steipete#1224 Co-authored-by: Cursor <cursoragent@cursor.com>
|
Merged to |
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d73343876a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -95,10 +95,8 @@ struct AugmentCLIFetchStrategy: ProviderFetchStrategy { | |||
| // Fallback to web if CLI fails (not authenticated, etc.) | |||
| if let cliError = error as? AuggieCLIError { | |||
There was a problem hiding this comment.
Restrict parse-error fallback to auto mode
When the user explicitly requests the Augment CLI source, a parse failure now returns true here, so the pipeline continues into AugmentStatusFetchStrategy even though .cli was selected; that can unexpectedly import browser cookies/keychain data instead of surfacing the CLI parse error. This fallback should be limited to context.sourceMode == .auto (or the web strategy should be unavailable outside auto/web) so explicit CLI mode remains CLI-only.
Useful? React with 👍 / 👎.
Summary
Fixes Augment usage failing with
Failed to parse auggie output: Could not extract credits from outputafter theauggieCLI changed how it prints account status.Why this changed:
auggie account statusno longer prints the legacy used/total breakdown. It now renders credits in a boxed layout like:CodexBar still expected the old format:
Because parsing failed with
AuggieCLIError.parseError, the CLI strategy did not fall back to browser cookies, so Augment appeared broken even whenauggieand the browser session were healthy.This PR:
auggie account statusoutput (remaining + credits/month), while keeping legacy output supportsessionandweb_rpc_proxy_sessionto Augment session cookie detectionTest plan
swift test --filter 'AuggieCLIProbeParseTests|AugmentCLIFetchStrategyFallbackTests'swift run CodexBarCLI usage augmentreturns Augment credits via CLI on a machine with authenticatedauggieMade with Cursor