Skip to content

TUI treats any /-prefixed input as a slash command: absolute paths produce 'Unknown command' with no escape mechanism #624

Description

@guolvlin-cn

Summary

In the interactive TUI (astra), any user input that starts with / is unconditionally treated as a slash command. An absolute filesystem path such as /Users/guolvlin/astra-workspace/shaking-web-site is therefore parsed as a command and fails with Unknown command: /Users/... · type / to browse all commands — the agent never receives the message. There is no escape mechanism (e.g. // or a literal-send command), so on Unix systems the user cannot directly prompt the agent with a path-prefixed message.

Environment

  • Commit: 27c0c9e4 (2026-08-15)
  • Version: astra 0.1.0
  • OS: macOS
  • Mode: interactive TUI (astra)

Reproduction

  1. Run astra (interactive TUI).
  2. Type a bare absolute path as the first input:
    /Users/guolvlin/astra-workspace/shaking-web-site
    
  3. Observed:
    ✖ Error · Unknown command: /Users/guolvlin/astra-workspace/shaking-web-site · type / to browse all commands
    
  4. The agent never sees the text; it looks like the session "doesn't remember" the workspace, but the message was never sent.

Actual behavior

  • Any /-prefixed input routes to the slash-command dispatcher (submission_projection in crates/astra-cli/src/tui/event_loop.rs):
    } else if text.trim_start().starts_with('/') {
        SubmissionProjection::LocalAction(text)
    }
  • crates/astra-cli/src/tui/slash_dispatch.rs then matches cmd.trim_start_matches('/') against the command registry; no match → "Unknown command".
  • No escape path exists: no // literal handling, no "send as text" command, nothing in the command registry for arbitrary paths.

Expected behavior

One or more of:

  • Only treat input as a slash command if it matches a known command (or prefix of one), otherwise fall back to conversation, and/or
  • Provide an escape, e.g. //Users/... → send /Users/... as a literal message, and show the hint in the / menu, and/or
  • On "Unknown command", suggest the workaround (e.g. "start your message with text, or use // to send a literal path").

Impact

On Unix, absolute paths start with /. Users cannot directly ask the agent to work on a path by typing it first; they must prefix it with natural-language text (e.g. 看一下 /Users/...), which is non-obvious and produces a confusing "Unknown command" error that can be mistaken for the session losing its workspace context.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions