Skip to content

Code mode: enforce per-plan gating (saved-tool caps + inline Team+) #1446

Closed

Description

@helpcodeai

The code-mode plan gating agreed on 2026-10-31 was scaffolded but not enforced: checkCanCreateCodeTool only capped the Cloud trial and returned early on self-hosted, and inline code was gated by role only (ADMIN), with no plan check.

Build it, numbers in the backend (not the licence site): a code-mode-quotas.ts mirroring file-search-quotas.ts, so existing keys need no reissue. An Enterprise contract can still override per key via features.maxCodeTools.

  • Saved code tools, per plan (Cloud + self-hosted): Community 3 / Starter 5 / Team 20 / Business 20 / Enterprise unlimited. Unknown/no plan → Community. Enforced in LicenseGuardService.checkCanCreateCodeTool at creation time.
  • Inline code (code_execute / code_propose_tool): Team and above only. Enforced where the MCP endpoint exposes it (resolveInlineCode), on top of the per-server codeMode and the inlineCode role capability.

No schema change. Off by default everywhere. Writes / definer / shared-endpoint exposure stay Enterprise/admin as before. Per-tier audit retention and Cloud monthly run quotas are out of scope here (operational / separate).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions