Skip to content

Research spike: output token limits — pi-mono + Claude CLI patterns #491

Description

@bonk-moltbot

What

Research how other agent harnesses limit LLM output to prevent rate limit exhaustion, then decide what limits Anima should enforce.

Why

Anechka hit the 5-hour rate limit by noon today. The root cause: unconstrained output generation — long text responses, verbose tool calls, sub-agents generating large volumes. Existing tickets (#430 think tool char limit, #425 sub-agent tool call limits) cover specific cases, but there is no holistic output budget strategy.

Research targets

1. pi-mono (open source agent harness)

  • Repo: https://github.com/badlogic/pi-mono
  • How does it limit per-message output tokens?
  • Does it enforce limits on sub-agent output?
  • Any per-session or per-hour budget tracking?

2. Claude CLI (claude-code)

  • What max_tokens does it set per API call?
  • Does it vary by context (tool calls vs conversation)?
  • Any output budgeting across a session?

Deliverable

A thoughts note with findings + recommendation: should Anima limit output tokens per-message, per-session, or both? For the main agent and for sub-agents separately.

Related

Activity

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions