Skip to content

Add targeted usage limit commands#1004

Merged
m-abdelwahab merged 2 commits into
masterfrom
mahmoud/usage-limit-targets
Jul 8, 2026
Merged

Add targeted usage limit commands#1004
m-abdelwahab merged 2 commits into
masterfrom
mahmoud/usage-limit-targets

Conversation

@m-abdelwahab

Copy link
Copy Markdown
Collaborator

Summary

  • Add railway usage limit status --target <agent|workspace>, with no target showing both usage limit types
  • Require --target for railway usage limit set
  • Wire agent usage limit status/set through the public agentUsage query and agentUsageLimitSet mutation
  • Add target-specific validation and formatting for agent vs workspace limits
  • Support cent-level dollar inputs for agent limits while preserving whole-dollar workspace limits

Notes

  • Agent hard limit is required when setting agent limits
  • Agent --hard 0 is allowed and blocks agent usage
  • Workspace limits preserve existing behavior, including whole-dollar validation

Test plan

  • cargo test usage
  • cargo test
  • Manually tested status/set variants against a logged-in workspace

@m-abdelwahab m-abdelwahab added the release/minor Author minor release label Jul 8, 2026
@m-abdelwahab m-abdelwahab marked this pull request as ready for review July 8, 2026 21:20
@m-abdelwahab m-abdelwahab merged commit 3e08d36 into master Jul 8, 2026
6 checks passed
@m-abdelwahab m-abdelwahab deleted the mahmoud/usage-limit-targets branch July 8, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/minor Author minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant