Skip to content

Add config options to cap max number of open tabs #1804

Closed

Description

@w32zhong

It is very easy for agents to keep opening tabs without closing them. I know there are an inactive timeout option to keep the number of daemon sessions from growing up, however, the total number of tabs should also be capped and i don't find a way to do this. Any ideas?

Activity

  1. holny commented on Sep 7, 2026

    @holny
    Contributor

    Taking this. Proposed shape:

    • New global option --max-tabs <n> (plus AGENT_BROWSER_MAX_TABS env), 0/unset = unlimited, applies per daemon session like the other launch options.
    • Enforced daemon-side so both CLI and MCP surfaces are covered: tab new and any action that would create an additional tab fail with a clear error stating the current count, the cap, and pointing at tab close / close to free a slot.
    • Deliberately no automatic tab killing: silently closing the agent's pages would be worse than a refusal, so the cap refuses instead.

    PR to follow.

  2. added a commit that references this issue on Sep 7, 2026
    78fbb9b
  3. locked and limited conversation to collaborators on Nov 3, 2026
  4. converted this issue into a discussion #2370 on Nov 3, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions