Skip to content

Hide inert slash commands#898

Merged
natllian merged 1 commit into
mainfrom
nathan/compact-provider-research
Jun 24, 2026
Merged

Hide inert slash commands#898
natllian merged 1 commit into
mainfrom
nathan/compact-provider-research

Conversation

@natllian

@natllian natllian commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

closes #794
closes #635

Summary

Hide the /compact (Claude-only) and /clear (all agents) slash commands from the composer menu, which showed up in the command list but were no-ops when executed.

What changed

  • Added SUPPRESSED_AGENT_COMMANDS map to filter out /compact for Claude sessions (the Agent SDK exposes no programmatic compaction path, unlike Codex's thread/compact/start)
  • Added GLOBALLY_SUPPRESSED_AGENT_COMMANDS set to filter out /clear for all agents (it's a REPL-only command; sent through the SDK, the next turn still resumes the same session, so context is never cleared)
  • Updated memoizedFilteredSlashCommands to apply both filters when merging SDK-reported and builtin commands
  • Added test coverage for both suppression rules

Why

These commands appeared in the UI but provided no functionality, creating a poor user experience. Codex and OpenCode keep their working /compact implementations; Claude suppresses only the broken one to avoid confusion.

Testing

  • Two new test cases verify /compact suppression for Claude and /clear suppression globally
  • Updated existing tests to reflect the new filtering behavior
  • All existing composer tests pass

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 24, 2026
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
helmor-marketing Ignored Ignored Jun 24, 2026 7:43pm

Request Review

@natllian natllian merged commit ebf63e4 into main Jun 24, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

1 participant