FYI: registered agent bodies are idle-resident on current Claude Code (~2k each) — measurement + a registration-free build

Open
#860 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
devtools

Research direction

The issue reports token measurements and links to the registration-free reference build at https://github.com/ak2k/ce-lite, but does not specify a change for this repository. Read the linked discussion in #139, #156, and #652 to understand the trade-offs around registered agents and tool restrictions. Done criteria are not defined in this issue.

Written by the indexing model from the issue text.

Description

Following up on #139 and #156 with current numbers.

#139 reasonably treated agent bodies as spawn-time-only ("loaded when spawning, so less critical"), with descriptions (~3k) as the idle cost. On current Claude Code (2.1.150, Opus 4.7) that's changed: interactive /context shows the bodies idle-resident too — a standing slot in the window before the first turn, separate from the Task-tool descriptions #139 measured.

With compound-engineering v3.8.4 installed, a fresh /context:

Custom agents: ~88k tokens   (~2k per registered agent)

The per-agent rate (~2k) is the stable figure; the total scales with how many of v3.8.4's 49 agents register in a given session — I saw ~88k, and all 49 would be ~100k. Either way it's the dominant idle cost. (Aside: in my run, claude plugin details reported only ~5.7k "always-on" for the same plugin — it counts the ~50-token descriptions, not the loaded bodies — so the built-in projection understates what /context shows.)

I've been running a registration-free build of CE that drops the agents/ registrations, moves the persona prompts to references/, and dispatches them on demand — emptying that slot, same specialist coverage. Plugin-attributable idle delta across the window is roughly −94k (−88k custom agents, −13.5k system tools, +7.5k skills descriptions). It's at https://github.com/ak2k/ce-lite as a reference / data point.

Honest trade-off (why this isn't a no-brainer upstream), related to #652: without registrations the harness can't enforce each persona's tools: allowlist — dispatch goes through a general-purpose subagent, so the restrictions become advisory. A PreToolUse hook could restore enforcement at trigger time without re-incurring the idle cost — I haven't needed it. Sharing the measurement either way.

Dominant language
TypeScript
Stars
25.6k
Forks
2.1k
Avg merge
3h 57m
Merged PRs (30d)
170

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EveryInc/compound-engineering-plugin

All issues in EveryInc/compound-engineering-plugin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.