Skip to content

Add Claude and Codex usage tracking from status lines for better budget estimates#2

Merged
akhilsinghcodes merged 1 commit into
mainfrom
feature/better_cost_estimates
Jun 2, 2026
Merged

Add Claude and Codex usage tracking from status lines for better budget estimates#2
akhilsinghcodes merged 1 commit into
mainfrom
feature/better_cost_estimates

Conversation

@akhilsinghcodes
Copy link
Copy Markdown
Owner

This PR adds best-effort usage tracking for interactive agent sessions by parsing Claude Code and Codex status-line output in PTY streams.

What changed

  • Added parsing logic in apps/server/src/processManager.ts for:
    • Claude status-line output
    • Codex token usage/status output
  • Extended shared websocket message types in packages/shared/src/index.ts to support usage tick events.
  • Added UI support in apps/web/src/TerminalPane.tsx to surface live usage tracking updates.
  • Updated README.md with setup instructions for:
    • Claude Code status line configuration
    • Codex status line configuration

Why

Agents Fleet previously relied on rough token/cost estimation for PTY sessions. This change improves accuracy by reading usage data directly from the agent CLIs when available, which helps with:

  • better budget enforcement
  • more accurate cost estimates
  • clearer live session visibility

@akhilsinghcodes akhilsinghcodes merged commit 83fd88d into main Jun 2, 2026
1 check passed
@akhilsinghcodes akhilsinghcodes deleted the feature/better_cost_estimates branch June 2, 2026 08:47
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.

1 participant