Skip to content

Slack bot: enforce per-run token and spend budgets #1396

Open

Description

@samuv

Summary

Apply a tighten-only token or spend budget to every run started by the Slack
bot.

The existing per-user request-rate limit bounds prompt frequency. It does not
bound the cost of one accepted run. Mecatl supports run limits internally, but
the Slack integration does not have a supported SDK option for applying a
per-run limit.

Scope

  • Define the supported server and TypeScript SDK path for a caller-supplied,
    tighten-only per-run limit.
  • Configure the Slack bot with an operator-controlled default limit.
  • Apply the limit to every DM and channel run without weakening stricter
    server policy.
  • Report a budget terminal outcome to the requesting Slack user without
    exposing internal diagnostics or credentials.
  • Document how the run budget relates to the existing per-user request-rate
    limit.
  • Add SDK and Slack integration tests for the configured limit and terminal
    behavior.

Completion criteria

  • Every Slack-started run receives the configured limit.
  • The bot cannot raise a stricter server-owned limit.
  • Budget exhaustion produces a bounded, user-scoped Slack response.

References


Fully or partially written by an AI agent.

Activity

  1. added
    enhancement
    on Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions