summary: "Augment provider notes: cookie auth, keepalive, and credits parsing." read_when:
- Debugging Augment cookie import or keepalive
- Updating Augment usage or credits parsing
- Adjusting Augment menu labels or settings
Augment Provider
The Augment provider tracks your Augment Code usage and credits through browser cookie-based authentication.
Features
- Credits Tracking: Monitor your remaining credits and monthly limits
- Usage Monitoring: Track credits consumed in the current billing cycle
- Plan Information: Display your current subscription plan
- Automatic Session Keepalive: Prevents cookie expiration with proactive refresh
- Multi-Browser Support: Chrome, Chrome Beta, Chrome Canary, Arc, Safari
Setup
1. Enable the Provider
- Open Settings → Providers
- Enable Augment
- The app will automatically import cookies from your browser
2. Cookie Source Options
Automatic (Recommended)
- Automatically imports cookies from your browser
- Supports Chrome, Chrome Beta, Chrome Canary, Arc, and Safari
- Browser priority: Chrome Beta → Chrome → Chrome Canary → Arc → Safari
Manual
- Paste a cookie header from your browser's developer tools
- Useful for troubleshooting or custom browser configurations
Off
- Disables Augment provider entirely
3. Verify Connection
- Check the menu bar for the Augment icon
- Click the icon to see your current usage
- If you see "Log in to Augment", visit app.augmentcode.com and sign in
How It Works
Cookie Import
The provider searches for Augment session cookies in this order:
- Chrome Beta (if installed)
- Chrome (if installed)
- Chrome Canary (if installed)
- Arc (if installed)
- Safari (if installed)
Recognized cookie names:
_session(legacy)auth0,auth0.is.authenticated,a0.spajs.txs(Auth0)__Secure-next-auth.session-token,next-auth.session-token(NextAuth)__Host-authjs.csrf-token,authjs.session-token(AuthJS)session,web_rpc_proxy_session(Augment-specific)
Cached cookies:
- Keychain cache
com.steipete.codexbar.cache(accountcookie.augment, source + timestamp). Reused before re-importing from browsers.
Automatic Session Keepalive
The provider includes an automatic session keepalive system:
- Check Interval: Every 5 minutes
- Refresh Buffer: Refreshes 5 minutes before cookie expiration
- Rate Limiting: Minimum 2 minutes between refresh attempts
- Session Cookies: Refreshed every 30 minutes (no expiration date)
This ensures your session stays active without manual intervention.
API Endpoints
The provider fetches data from:
- Credits:
https://app.augmentcode.com/api/credits - Subscription:
https://app.augmentcode.com/api/subscription
Troubleshooting
"No session cookie found"
Cause: You're not logged into Augment in any supported browser.
Solution:
- Open app.augmentcode.com in Chrome, Chrome Beta, or Arc
- Sign in to your Augment account
- Return to CodexBar and click "Refresh" in the menu
"Session has expired"
Cause: Your browser session expired and automatic refresh failed.
Solution:
- Visit app.augmentcode.com
- Log out and log back in
- Return to CodexBar - it will automatically import fresh cookies
Cookies not importing from Chrome Beta
Cause: Chrome Beta might not be in the browser search order.
Solution: This fork includes Chrome Beta support by default. If issues persist:
- Check that Chrome Beta is installed at
/Applications/Google Chrome Beta.app - Verify you're logged into Augment in Chrome Beta
- Try switching to regular Chrome temporarily
Manual Cookie Import
If automatic import fails, you can manually paste cookies:
- Open Chrome DevTools (⌘⌥I)
- Go to Application → Cookies → https://app.augmentcode.com
- Copy all cookie values
- Format as:
cookie1=value1; cookie2=value2; ... - In CodexBar: Settings → Providers → Augment → Cookie Source → Manual
- Paste the cookie header
Debug Mode
To see detailed cookie import logs:
- Open Settings → Debug
- Find Augment in the provider list
- Click Show Debug Info
This displays:
- Cookie import attempts and results
- API request/response details
- Session keepalive activity
- Error messages with timestamps
Privacy & Security
- Cookies are stored securely in macOS Keychain
- Only cookies for
*.augmentcode.comdomains are imported - Cookies are filtered by domain before sending to API endpoints
- No cookies are sent to third-party services
- Session keepalive only runs when Augment is enabled
Technical Details
Cookie Domain Filtering
The provider implements RFC 6265 cookie semantics:
- ✅ Exact match:
app.augmentcode.com→app.augmentcode.com - ✅ Parent domain:
augmentcode.com→app.augmentcode.com - ✅ Wildcard:
.augmentcode.com→app.augmentcode.com - ❌ Different subdomain:
auth.augmentcode.com❌→app.augmentcode.com
This prevents cookies from other subdomains being sent to the API.
Session Refresh Mechanism
- Keepalive checks cookie expiration every 5 minutes
- If expiration is within 5 minutes, triggers refresh
- Pings
/api/auth/sessionto trigger cookie update - Waits 1 second for browser to update cookies
- Re-imports fresh cookies from browser
- Logs success/failure for debugging
Related Documentation
- Provider Authoring Guide - How to create new providers
- Development Guide - Build and test instructions