openclaw - 💡(How to fix) Fix Feature: Support passing slash commands to ACP harness sessions [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#51424Fetched 2026-04-08 01:11:27
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Participants
Timeline (top)
commented ×1

Root Cause

When using ACP sessions (Claude Code, Codex, etc.) via Discord, users cannot send slash commands like /help or /compact to the harness because:

Fix Action

Fix / Workaround

Currently the only workaround is to describe the action in natural language, which is less efficient.

RAW_BUFFERClick to expand / collapse

Problem

When using ACP sessions (Claude Code, Codex, etc.) via Discord, users cannot send slash commands like /help or /compact to the harness because:

  1. Discord intercepts / prefixed messages as bot commands
  2. Quoting the command ('/help') passes it literally to the harness, which rejects the malformed format

This makes it impossible to invoke harness-native slash commands from Discord.

Proposed Solution

Add a pre-processing layer in acpx that:

  1. Detects quoted/escaped slash commands (e.g., '/help', "/help", `/help`)
  2. Strips the wrapper before forwarding to the harness
  3. Allows users to invoke harness-native slash commands from Discord

Use Case

Users in Discord thread-bound ACP sessions want to:

  • Use /help to see available commands
  • Use /compact to manage conversation context
  • Use other Claude Code native slash commands

Currently the only workaround is to describe the action in natural language, which is less efficient.

extent analysis

Fix Plan

To address the issue, we will implement a pre-processing layer in acpx to detect and strip quoted/escaped slash commands.

Steps:

  • Detect quoted/escaped slash commands using regular expressions
  • Strip the wrapper before forwarding to the harness
  • Test the implementation with various input formats

Example Code (Python):

import re

def preprocess_command(command):
    # Regular expression patterns to match quoted/escaped slash commands
    patterns = [r"^'/(.*)'$", r'^"/(.*)"$', r'^`` (.*) ``$']
    
    # Iterate over patterns and strip the wrapper if a match is found
    for pattern in patterns:
        match = re.match(pattern, command)
        if match:
            return match.group(1)
    
    # If no match is found, return the original command
    return command

# Example usage:
commands = ["'/help'", '"/help"', "`` /help ``"]
for command in commands:
    print(preprocess_command(command))  # Output: /help

Verification

To verify the fix, test the acpx implementation with various input formats, including quoted/escaped slash commands. Ensure that the harness receives the correct, stripped command.

Extra Tips

  • Consider adding support for other types of escaped commands
  • Test the implementation with different Discord clients and platforms to ensure compatibility
  • Document the pre-processing layer and its behavior for future reference and maintenance

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Feature: Support passing slash commands to ACP harness sessions [1 comments, 2 participants]