Conversation
… tokens Every spawned worker session inherits the full MCP server catalog (Figma: 42 tools, Notion: 43, ClickUp: 58, Canva: 34, ...) and all bundled skills even when the task needs none of them. On a typical setup this fixed overhead consumes ~85,000–100,000 tokens before any work begins, leaving a worker with a nominal 200K tokenCap with only ~100K of real working budget. Changes: - SpawnRequest: add optional mcpAllow (string[]) and skillsAllow (string[]) - AgentSpawnOptions: thread mcpAllow + skillsAllow into spawnAgentCore - hive.ensureAgent opts: add mcpAllow + skillsAllow typed fields - buildDefaultMcpServers: accept allow param; skip servers not in allowlist - copyBundledSkills: accept allow param; copy only specified skill dirs - hookSettings: pass allow through to buildDefaultMcpServers - COMMANDS.md + identity-prompt spawn docs: document both fields, show tokenCap ≥ 500K guidance, and explain the ~85–100K bootstrap overhead Backward-compatible: omitting both fields preserves current full-catalog behaviour.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every spawned worker session inherits the full MCP server catalog (Figma: 42 tools, Notion: 43, ClickUp: 58, Canva: 34, ...) and all bundled skills even when the task needs none of them. On a typical setup this fixed overhead consumes ~85,000–100,000 tokens before any work begins, leaving a worker with a nominal 200K tokenCap with only ~100K of real working budget.
Changes:
Backward-compatible: omitting both fields preserves current full-catalog behaviour.
What & why
Every spawned worker session — regardless of task — receives the full MCP server catalog and all bundled skills before any work begins. On a typical setup (Figma: 42 tools, Notion: 43, ClickUp: 58, Canva: 34) this fixed overhead consumes ~85,000–100,000 tokens per session. A worker with
tokenCap: 200000is therefore left with only ~100K tokens of real working budget, which causes them to exhaust their budget and fail to complete non-trivial tasks.This PR adds two optional fields to the spawn-request schema:
mcpAllow: only inject these MCP server IDs into the worker'ssettings.json. Omit for the current full-catalog behaviour.skillsAllow: only copy these skill directories into the worker's.claude/skills/. Omit for all bundled skills.For a code task, this eliminates Figma, Notion, ClickUp, and Canva, saving ~60,000 tokens of tool-schema overhead. It also updates the COMMANDS.md spawn docs and god's identity prompt to document the new fields.
Type of change
Evidence
Before
After
How I tested it
npm run typecheck,npm run test:focused, andnpm run buildlocally to ensure the typescript and unit tests pass with the new schema parameters.mcpAllow/skillsAllowand observed full payload generation.mcpAllowset to["filesystem"]andskillsAllowset to["capabilities"]and verifiedsettings.jsonand.claude/skillswere explicitly constrained, eliminating >80% of the bootstrap token payload.Credit (optional)
Discord:
X:
Checklist
npm run typecheckpasses.npm run test:focusedpasses.npm run buildsucceeds.commented-out code, or unrelated formatting churn in it.
DESIGN.md/tokens.ts— no ad-hoc colors,spacing, or fonts.
ATTRIBUTION.md.