Skip to content

Dashboard: /fork command passed to LLM instead of intercepted #400

Description

@Hrovatin

Summary

When a user types /fork in the dashboard composer and submits, the command is passed to the LLM instead of being intercepted. The LLM recognizes it as a built-in command but generates a fake acknowledgment rather than executing it. No actual fork is created.

Current Behavior

  1. User types /fork in the dashboard composer
  2. Text is sent via api.prompt()session.prompt()
  3. Built-in commands are not handled by session.prompt() (only extensions, skills, templates)
  4. Text reaches the LLM as regular user input
  5. LLM's thinking shows confusion: "Actually, looking at this more carefully, '/fork' is likely a built-in dreb command that the system handles, not something I need to process."
  6. LLM outputs fake acknowledgment: "Forking this conversation. You'll have a separate branch..."
  7. No fork is created — /resume doesn't show the fork

Expected Behavior

When user types /fork in the dashboard composer:

  • Option A: Intercept the command and trigger the fork modal (same as clicking the fork button)
  • Option B: Show an error/hint that fork should be accessed via the button
  • At minimum: Do not pass built-in commands to the LLM

Root Cause

The TUI intercepts /fork in the UI layer (interactive-mode.ts:2305-2308) before calling session.prompt():

if (text === "/fork") {
    this.showUserMessageSelector();
    this.editor.setText("");
    return;
}

The dashboard has a dedicated button-based fork flow (fork button → modal → RPC), but does not intercept /fork text submitted via composer. Built-in commands are also not included in the get_commands RPC response, so the autocomplete doesn't show /fork as an option.

Relevant Files

  • packages/dashboard/src/client/screens/session.tsx — Composer submit handling, fork modal
  • packages/dashboard/src/server/server.ts — RPC endpoints
  • packages/coding-agent/src/modes/interactive/interactive-mode.ts:2305 — TUI reference implementation

Acceptance Criteria

  • Typing /fork in dashboard composer does not send the command to the LLM
  • Either triggers the fork modal OR shows user-friendly guidance
  • Same pattern should apply to other built-in TUI commands that have dashboard equivalents

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions