Skip to content

SessionStart hook injects superpowers context twice into Claude Code sessions #648

Description

@djm204

Problem

The session-start hook outputs the superpowers skill content in two JSON fields for Cursor/Claude cross-platform compatibility:

{
  "additional_context": "<superpowers content>",
  "hookSpecificOutput": {
    "hookEventName": "SessionStart",
    "additionalContext": "<superpowers content>"
  }
}

Claude Code reads both fields and doesn't deduplicate, so the full superpowers prompt gets injected into the conversation context twice. This wastes context window tokens on every session.

Location

hooks/session-start lines 41-48

Suggested Fix

Only emit the field that the current platform consumes. For Claude Code, that's hookSpecificOutput.additionalContext. The top-level additional_context is the Cursor path.

Options:

  1. Detect the runtime (Claude Code vs Cursor) and emit only the relevant field
  2. Drop the top-level additional_context if Claude Code is now the primary target
  3. Keep both but document that Claude Code will double-inject (so users can patch locally)

Workaround

Remove the "additional_context" line from the hook output manually. This survives until the next plugin update overwrites the cache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-codeClaude Code (Anthropic CLI) issueshooksHook system (SessionStart, Stop, etc.)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions