Skip to content

context-budget: two open measurements — interactive-session deferral eligibility; deferred-tool count_tokens billing #2954

Description

@kyle-sexton

Follow-ups graduated from the context-budget topic slice (PR #2932) via the work-item tracker seam. Both are measurements the plugin's catalogue currently words around; each has a designed probe that could not run in the authoring environment.

1. Interactive-session deferral eligibility

Headless measurements stamp sessionKind: headless because deferral eligibility is partly server-decided and interactive sessions may compose the payload differently. The authoring container had no TTY, so this was never differenced.

Probe design: on a machine with an interactive terminal, run /context in an interactive session and diff its category table and deferred bucket against a headless measure.mjs snapshot taken from the same cwd, same binary, same settings, back to back. A divergence in which tools sit deferred (or in bucket totals beyond Messages jitter) confirms session-kind sensitivity; identity lets the report drop the caveat for that version.

2. Does the API bill for deferred-but-never-loaded tool definitions?

Decides how the report words the deferred bucket's cost ("recurring request weight" is currently justified by the documented send-semantics of defer_loading, not by a billing measurement). Blocked in the authoring container: no API credential (x-api-key header is required from the gateway).

Probe design (two count_tokens calls): identical requests except one carries an extra tool definition marked defer_loading: true (tool-search beta header on both). If the count rises by the tool's schema weight, deferred-but-never-loaded definitions are billed input; if not, the deferred bucket costs context-window-eligibility only and the report wording should soften.

Context

  • Measured background: PR feat(context-budget): ship the startup-payload measurement plugin (0.6.0) #2932's pre-prune evidence record (docs/topics/context-budget/FINDINGS.md at the pre-prune SHA named in that PR's body); durable method and citations live in plugins/context-budget/skills/audit/reference/.
  • Related resolved-by-measurement items (same session, v2.1.232 headless): PreToolUse ask fires and blocks under bypassPermissions; Streamable HTTP MCP tools defer into a dedicated MCP tools (deferred) category; denying ToolSearch is an anti-lever.

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

    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: mediumReal value, no hard deadline; normal backlog flow.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions