CLI: timmy chat breaks on multi-word messages and backticks #26

Closed
opened 2026-03-14 13:33:34 +00:00 by Rockachopa · 0 comments
Owner

What

The CLI has UX issues:

  1. Backticks in messagestimmy chat "read \file.md`"` gets interpreted by zsh before reaching Timmy. Users must know to use single quotes.

  2. Multi-word quotingtimmy chat "Stage a git commit for..." with embedded quotes/pipes fails with "Got unexpected extra argument"

  3. No interactive mode — every timmy chat creates a new agent instance, loads memory, connects MCP tools. That's 5-10 seconds of setup PER MESSAGE. There's no REPL mode where the agent stays warm.

  4. Tool confirmation UX — the model picks shell for file reads (HIGH impact confirmation) instead of read_file (SAFE). This is a model quality issue but could be mitigated by prompt hints.

What to do

  1. Add timmy repl command — interactive REPL that keeps the agent warm between messages. Typer supports this pattern. This alone would cut response latency by 5-10 seconds per message.

  2. Accept stdinecho "message" | timmy chat - for piped input, avoids all shell quoting issues

  3. Consider pre-routing tool hints — before sending to the model, if the user says "read X", inject a system hint: "Use read_file tool for file reading, not shell"

Files

  • src/timmy/cli.py — add repl command, stdin support
  • src/timmy/session.py — the singleton agent is already there, just needs a REPL wrapper

Estimated effort: 2-3 hours

## What The CLI has UX issues: 1. **Backticks in messages** — `timmy chat "read \`file.md\`"` gets interpreted by zsh before reaching Timmy. Users must know to use single quotes. 2. **Multi-word quoting** — `timmy chat "Stage a git commit for..."` with embedded quotes/pipes fails with "Got unexpected extra argument" 3. **No interactive mode** — every `timmy chat` creates a new agent instance, loads memory, connects MCP tools. That's 5-10 seconds of setup PER MESSAGE. There's no REPL mode where the agent stays warm. 4. **Tool confirmation UX** — the model picks `shell` for file reads (HIGH impact confirmation) instead of `read_file` (SAFE). This is a model quality issue but could be mitigated by prompt hints. ## What to do 1. **Add `timmy repl` command** — interactive REPL that keeps the agent warm between messages. Typer supports this pattern. This alone would cut response latency by 5-10 seconds per message. 2. **Accept stdin** — `echo "message" | timmy chat -` for piped input, avoids all shell quoting issues 3. **Consider pre-routing tool hints** — before sending to the model, if the user says "read X", inject a system hint: "Use read_file tool for file reading, not shell" ## Files - `src/timmy/cli.py` — add `repl` command, stdin support - `src/timmy/session.py` — the singleton agent is already there, just needs a REPL wrapper ## Estimated effort: 2-3 hours
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#26