Let your agent call the control plane.

Codex and OpenCode expose the same explicit tools over the shared local client. The host decides what is allowed; TokenSize cannot expand it.

Codex#

Install the public plugin

Add the TokenSize marketplace, then enable the plugin. The plugin exposes $delegate as an agent tool.

shell
codex plugin marketplace add tokensize/skills
codex plugin add tokensize@tokensize

What it can do

  • Inspect local harnesses and normalized allowances
  • Open the browser authorization callback
  • Preview a metadata-only route
  • Execute only with an unexpired receipt

OpenCode#

Add the exact package to your project or user configuration. OpenCode's own permission layer remains active alongside TokenSize's local policy.

shell
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@tokensize/opencode@beta"],
  "permission": {
    "tokensize_status": "allow",
    "tokensize_route": "allow",
    "tokensize_connect": "ask",
    "tokensize_execute": "ask",
    "tokensize_feedback": "allow"
  }
}

OpenCode execution is inspect-only in this beta. Edit and test delegation stays disabled until it has dedicated non-interactive and worktree acceptance coverage.

Shared tools#

tokensize_statusDiscovery, models, normalized allowance and cache freshness.
tokensize_connectExplicit browser callback authorization; credentials remain local.
tokensize_routeMetadata-only route preview with an opaque receipt.
tokensize_executeReceipt-bound local execution under the selected permission.
tokensize_feedbackContent-free, receipt-bound outcome feedback.
Permission layering is intentional.

Host permissions can deny a tool, TokenSize policy can deny a route and the receipt binds execution to the exact task. All three must allow the action.