Skip to content

Four SKILL.md hubs exceed the 5,000-token post-compaction re-attach slice, dropping their own gates #4255

Closed

Description

@kyle-sexton

Per https://code.claude.com/docs/en/skills.md (fetched 2026-09-19, 115,336 bytes, line 518): "Claude Code re-attaches the most recent invocation of each skill after the summary, keeping the first 5,000 tokens of each. Re-attached skills share a combined budget of 25,000 tokens." Line 308 adds "so every line is a recurring token cost". Line 471's 500-line tip is a separate budget these files satisfy.

Measured on disk, tier E1; the bytes-to-tokens conversion below is judgment.

  • planning/0.39.11/skills/plan/SKILL.md: 42,249 bytes, 315 lines, 5,918 words; spokes 37,014 bytes (82,259 total)
  • discovery/0.19.18/skills/explore/SKILL.md: 29,819 bytes, 235 lines, 4,227 words; 1.7x its 15,382-byte reference/dispatch.md spoke
  • discovery/0.19.18/skills/research/SKILL.md: 35,130 bytes, 258 lines, 5,212 words, over a 5,000-token window unconverted
  • implementation/0.16.8/skills/implement-dispatch/SKILL.md: 25,187 bytes, 126 lines, no reference/ offload; cross-references five sections of the 28,906-byte implement/SKILL.md, so the orchestrator holds both
  • source-control/0.55.89/skills/worktree/SKILL.md: 28,914 bytes, 204 lines

The planning-plan/20260919T205610Z packet (F7) reproduced the cut: at roughly 4 characters per token, 5,000 tokens is about 20,000 bytes, and head -c 20000 SKILL.md | wc -l is 148 lines, ending inside Step 3. Step 4.7's outcome gate and Step 5, the approval gate the skill calls "the point", fall outside the slice. Its evidence-2.md (D) records an unresolved discrepancy: the session log says about 25 KB loaded against 42,249 bytes on disk, so the boundary is approximate but holds at either figure.

explore is inverted: SKILL.md:35 states "keeping that out of the orchestrator's context window is the point", yet lines 86-235 are worker content the worker gets again via its own skills: preload. contract.test.sh:217-222 (assertion 8) pins the equivalent fix for research; nothing pins explore.

Cheapest fix per hub: delete spoke-duplicated content, leave a load-when pointer. In plan, eight of nine Step 4.5 substeps and the Step 4.6 gate body already sit in context/plan-template.md and context/tag-decisions.md, roughly 4 KB. Two hub-only clauses must move, not be deleted: "hard-to-reverse decisions escalate EARLY" at SKILL.md:212 and the agent-teams routing surface at :199/:207. In explore, move lines 86-235 into reference/workflow.md. Fuller fix: reorder each hub so mandatory gates sit inside the first ~20 KB.

Verification: extend contract.test.sh assertion 8 to each hub against its largest spoke; head -c 20000 SKILL.md must contain every gate the skill treats as mandatory.

🤖 Generated with Claude Code

https://claude.ai/code/session_01F7GFS5autRMSaea6kSoXzx

Activity

  1. added
    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.
    and removed
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    on Sep 27, 2026
  2. added 2 commits that reference this issue on Sep 28, 2026
    ecb7ce8
    afa2c53
  3. kyle-sexton commented on Sep 29, 2026

    @kyle-sexton
    MemberAuthor

    Comment only; this issue stays closed. This comes from the 2026-09-29 audit of the Cursor agent run. Status per hub, with sizes measured on the fix branch (PR #5301) by head -c 20000:

    So not all five hubs are confirmed done. #5301 uses Refs #4255.

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.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions