Skip to content

fix(augment): parse updated auggie account status output#1224

Merged
steipete merged 5 commits into
steipete:mainfrom
bcharleson:fix/augment-auggie-cli-parse
May 30, 2026
Merged

fix(augment): parse updated auggie account status output#1224
steipete merged 5 commits into
steipete:mainfrom
bcharleson:fix/augment-auggie-cli-parse

Conversation

@bcharleson
Copy link
Copy Markdown
Contributor

Summary

Fixes Augment usage failing with Failed to parse auggie output: Could not extract credits from output after the auggie CLI changed how it prints account status.

Why this changed: auggie account status no longer prints the legacy used/total breakdown. It now renders credits in a boxed layout like:

319,054 credits remaining                     Max Plan
450,000 credits / month
9 days remaining in this billing cycle (ends 6/9/2026)

CodexBar still expected the old format:

11,657 remaining · 953,170 / 964,827 credits used

Because parsing failed with AuggieCLIError.parseError, the CLI strategy did not fall back to browser cookies, so Augment appeared broken even when auggie and the browser session were healthy.

This PR:

  • Parses the new auggie account status output (remaining + credits/month), while keeping legacy output support
  • Falls back to browser cookie fetch when CLI parsing fails
  • Restores session and web_rpc_proxy_session to Augment session cookie detection
  • Persists imported cookies after session refresh and clears stale cookie cache on force refresh

Test plan

  • swift test --filter 'AuggieCLIProbeParseTests|AugmentCLIFetchStrategyFallbackTests'
  • swift run CodexBarCLI usage augment returns Augment credits via CLI on a machine with authenticated auggie
  • Local CodexBar.app build shows Augment usage (71% left, 450,000 credits/month) instead of the parse error

Made with Cursor

bcharleson and others added 3 commits May 30, 2026 05:27
…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>
@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 30, 2026

Codex review: needs real behavior proof before merge. Reviewed May 30, 2026, 2:14 PM ET / 18:14 UTC.

Summary
The PR updates Augment's auggie account status parser, parse-error web fallback, session cookie detection, cookie cache refresh handling, and focused parser/fallback tests.

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: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted terminal output, logs, screenshot, or video showing Augment usage after the fix.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body claims local authenticated CLI and app validation, but no inspectable redacted terminal output, logs, screenshot, video, or artifact shows the after-fix Augment result; after adding proof, updating the PR body should trigger a fresh review, or a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] The contributor's authenticated after-fix Augment result remains uninspectable; reviewers only have the PR body's claims, not redacted terminal output, logs, screenshots, video, or artifacts.

Maintainer options:

  1. Decide the mitigation before merge
    Land the narrow Augment parser/fallback fix once the contributor adds inspectable redacted after-fix proof and CI finishes cleanly.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] Human review is needed because only the contributor can provide inspectable proof from their authenticated Augment setup; there is no narrow code repair left from this pass.

Security
Cleared: The diff touches Augment cookies and fallback behavior but stays within existing provider-specific CLI/browser-cookie mechanisms and adds no dependency, workflow, or broad secret-handling change.

Review details

Best 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 changes

Label justifications:

  • P2: This is a normal-priority Augment provider bug fix with limited blast radius, not a core runtime emergency.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body claims local authenticated CLI and app validation, but no inspectable redacted terminal output, logs, screenshot, video, or artifact shows the after-fix Augment result; after adding proof, updating the PR body should trigger a fresh review, or a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

What I checked:

Likely related people:

  • bcharleson: Git history shows this person introduced the auggie CLI integration and earlier Augment session-cookie and subscription behavior that this PR changes. (role: feature owner / prior area contributor; confidence: high; commits: 0bb2b55096b4, 717a8730c64c, a368f419efa1; files: Sources/CodexBarCore/Providers/Augment/AuggieCLIProbe.swift, Sources/CodexBarCore/Providers/Augment/AugmentProviderDescriptor.swift, Sources/CodexBarCore/Providers/Augment/AugmentStatusProbe.swift)
  • steipete: Recent commits touched Augment keepalive/provider runtime behavior and repository testing policy around Augment debug paths. (role: recent area contributor; confidence: medium; commits: dc16f9e04734, 6c77d7dde135, b327b14bfebe; files: Sources/CodexBarCore/Providers/Augment/AugmentSessionKeepalive.swift, Sources/CodexBar/Providers/Augment/AugmentProviderRuntime.swift, Tests/CodexBarTests/AugmentStatusProbeTests.swift)
  • BryantChen: This person added the auggie timeout/fallback regression coverage that the PR extends for parse-error fallback behavior. (role: adjacent contributor; confidence: medium; commits: b015660af8bf; files: Sources/CodexBarCore/Providers/Augment/AuggieCLIProbe.swift, Tests/CodexBarTests/AugmentCLIFetchStrategyFallbackTests.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

bcharleson added a commit to bcharleson/codexbar that referenced this pull request May 30, 2026
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>
@bcharleson
Copy link
Copy Markdown
Contributor Author

Merged to main on fork bcharleson/codexbar (commit 7d40fb4).

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 30, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@clawsweeper clawsweeper Bot added the P2 Normal priority bug or improvement with limited blast radius. label May 30, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@steipete steipete merged commit 4a2ef3a into steipete:main May 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants