[BUG] No way to trigger /compact or /clear from Claude Code channels (by Discord)

Resolved 💬 2 comments Opened Mar 27, 2026 by HyeongJunMin Closed Mar 27, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using Claude Code via channels (Discord), there is no way to trigger built-in CLI commands like /compact or /clear from the remote side.

Since /compact and /clear are CLI-only built-in commands, messages sent from a channel (e.g. "/compact") are treated as plain text chat messages — they do not invoke the actual CLI command.

This means that during long channel-based sessions, the context window will inevitably fill up, and Claude stops responding entirely with no feedback to the remote user. From the channel user's perspective, Claude simply goes silent — there is no error message, no warning, and no way to recover the session without terminal access.

What Should Happen?

Remote chat users (via channels) should have a mechanism to trigger context management commands (/compact, /clear) without requiring direct terminal access. At minimum, when context is full, the remote user should receive a notification explaining why Claude has stopped responding.

Error Messages/Logs

Steps to Reproduce

  1. Start Claude Code with any channel plugin (Discord, Slack, etc.)
  2. Have a long conversation via the channel until context is nearly full
  3. Send "/compact" or "/clear" from the channel
  4. Observe: message is treated as chat text, context is not compacted
  5. Eventually context fills up and Claude stops responding — no error or notification is sent to the channel
  6. The remote user has no way to know why Claude went silent or how to recover

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.85

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗