Skip to content

bug(acp): /scheduler slash command not forwarded to agent loop in ACP sessions #1658

@bug-ops

Description

@bug-ops

Bug

/scheduler list (and any /scheduler subcommand) returns unknown command: /scheduler when invoked via ACP (e.g., from Zed/Helix/VS Code).

Root Cause

handle_prompt() in crates/zeph-acp/src/agent/mod.rs (line 1047) intercepts all inputs starting with / and routes them to the ACP-specific handle_slash_command(), except /compact and /model refresh which are explicitly excluded (lines 1048–1049) and passed through to the agent loop.

handle_slash_command() has a hardcoded match with {/help, /model, /review, /mode, /clear} and returns "unknown command: /scheduler" for anything else.

When PR #1648 added /scheduler list to the zeph-core agent loop's slash command handler, it was not added to the ACP exclusion list.

Fix

Add /scheduler to the ACP pass-through exclusion list alongside /compact:

if trimmed_text.starts_with('/')
    && trimmed_text != "/compact"
    && trimmed_text != "/model refresh"
    && !trimmed_text.starts_with("/scheduler")  // add this
{
    return self.handle_slash_command(&args.session_id, trimmed_text).await;
}

This allows /scheduler list to be forwarded to input_tx → agent loop → handle_scheduler_slash_command() where list_tasks tool is dispatched.

Reproduction

client.request("session/prompt", {
    "sessionId": sid,
    "prompt": [{"type": "text", "text": "/scheduler list"}],
})
# Returns: {"code": -32600, "message": "Invalid request", "data": "unknown command: /scheduler"}

Impact

/scheduler list and any future /scheduler subcommands are silently inaccessible from ACP clients. The list_tasks tool works correctly (LLM can call it) but the slash command shortcut does not.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions