Skip to content

Slash commands inject command content twice (auto-slash-command + command-instruction) #29587

@moyaspace

Description

@moyaspace

Description

When a slash command (e.g. /stop-continuation, /rlwritefile) is invoked in the TUI, the command instruction content is injected into the AI context twice — once as an "auto-slash-command" block and once as a "command-instruction" block. Both contain identical content.

Impact

Wastes tokens on every command invocation. For commands with large instruction content (e.g. /opsx-explore), this wastes hundreds of lines per invocation. Compounds with existing #26185 for skill commands.

Steps to reproduce

  1. Type any slash command in the TUI (e.g. /stop-continuation)
  2. Observe both auto-slash-command and command-instruction blocks in the injected context
  3. Both contain identical command instructions

Expected behavior

Command content should be injected once, not twice via two parallel injection paths.

Additional context

This affects all slash commands (built-in, project skills, user-defined), not just skill-based ones. Root cause: two independent injection mechanisms running without deduplication. Differs from #26185 which is specifically about skill content + skill tool redundancy.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
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