The ?? Syntax

Inline intent → the agent does the work → you stay in control. Tool calls ask for permission, and a command the agent hands back never runs until you press Enter.

Three patterns

1. Full request

?? <prompt>

A full request is an agent turn. The agent can run commands itself, each tool call prompting allow/deny/always, and stream its answer:

?? find all Go files modified today
# → Found 31 Go files modified today, mostly under internal/shell
# and internal/history. The largest change is in internal/shell/shell.go.
# [Enter: done] [Tab: copy] [r: reply] [Esc: cancel]

When the reply is a single command, Hash offers to run it instead of running it for you:

?? one-liner to count lines in every Go file
# → find . -name "*.go" | xargs wc -l
# [Enter: run] [Tab: edit] [Esc: cancel]

2. Pipe transforms

cmd | ?? <prompt>

cat logs.txt | ?? summarize failure
# → Analysis: Connection refused on port 80...

3. Inline fill

cmd ?? <prompt> or --flag=?? <prompt>

git log --format=?? oneline with hash
# → git log --format="%h %s"

find . -name ?? all test files
# → find . -name "*_test.go"

Turn-by-turn conversations

A full ?? <prompt> request doesn't have to end after one answer. When the agent's response ends in a question, Hash automatically opens a conversation prompt so you can reply:

?? help me pick a postgres index for this query

Is the query mostly reads, or does the table also see heavy writes?

╭─ conversation Enter sends · Esc/Ctrl+C leaves · /exit ends
│ you › mostly reads, writes are batched at night
│ agent › Then a covering index fits: CREATE INDEX ... ON orders (user_id, created_at)

Each reply is sent as a new turn in the same agent session, so the agent keeps its context. You can also redirect mid-conversation ("pause that and list my kubernetes contexts"), and the agent can request tool calls as usual.

Replying when there's no question

If the response doesn't end in a question, Hash shows the normal confirmation hints with a reply action: [Enter: done] [Tab: copy] [r: reply] [Esc: cancel]. Press r to continue the conversation anyway.

Leaving a conversation

  • Press Esc or Ctrl+C, or submit an empty line
  • Type /exit
  • Natural exits work too: "done", "quit", "that's all", "never mind"

Command suggestions still go through the run/edit/cancel flow, and pipe transforms (cmd | ??) stay single-turn.

Detection order

  1. ?? at line start → full request
  2. | ?? (pipe with space) → pipe transform
  3. |?? (pipe no space) → pipe transform
  4. ?? mid-line → inline completion
  5. ?? after text (like =??) → inline completion

When NOT to use ??

  • For simple commands you know — just type them
  • When offline with no local agent configured
  • For destructive commands — always review carefully