Chat with a local model about your sites

On this page

Chat is a small assistant that runs on your computer. It reads Short Leash the way a coding assistant does, through the same tools: your sites, logs, requests, dumps, queries, mail, the Monitor's findings, your tasks and notes, and meeting notes. Ask it "Why is shop.test slow?" or "What failed in the last hour?" and it looks before it answers.

Chat is part of Short Leash Pro.

It's much smaller than cloud assistants, so it's best for quick questions about Short Leash, not for writing code. Nothing you ask, and nothing it reads, leaves your computer, unless you let it read pull requests from GitHub.

Set it up

Open Work › Chat. The first time, it needs a model: Download model fetches the one Short Leash picked for your computer's memory (Qwen3.5 9B on most Macs with 16 GB, Qwen3.5 4B on smaller ones). You can leave the page while it downloads. Settings › Models shows the choice and why, and Change picks another. Models and settings lists every model Short Leash offers, by purpose, with Download on each; downloading one doesn't switch to it.

Without a graphics card Short Leash can use, the model runs on the processor and the chat says "Running on the processor, so replies are slower".

While it answers

Your message shows as soon as you send it. Until the first words come, a line says what chat is doing: Starting the model, then Loading Qwen3.5 9B while it loads (the first answer after Short Leash opens takes longer), then Thinking, with the seconds once it takes a while. Each read shows as its own row saying Reading, and the answer appears as it's written. Stop ends it at once. It also stops what chat started and only that: a stage or commit, as Stop on the Changes page does, or a branch workspace it's making, which Short Leash stops and undoes as Stop on the Branch workspaces page does. Any other action you allowed, like adding a service, finishes first, so it's never left half done: its row shows how it went, and the answer ends there. If you scroll up to reread, the chat stays where you are instead of jumping to new text. Explain and Draft message on a site's Changes page use the same model, so after one of them chat's next answer reads its tools again and starts a few seconds later.

What it can do

  • Reads run on their own. Each one shows in the chat as a row, like Read slow routes shop.test; open the row to see exactly what chat read.
  • It can read a site's changes. Reads include a site's changes from Git, uncommitted or everything on its branch (Read changes): the files first, then a file's diff. A diff is cut to what the chosen model reads at once, about 14,000 characters with Qwen3.5 4B and 30,000 with the 9B, and to the room left in the chat. Characters that hide text show as codes such as ⟦U+202E⟧.
  • Actions wait for you. Starting or stopping a site, service or process, creating a database (Create database) or adding a service (Add service), adding a task (Add task), adding a note to one (Add note), changing its title, description, priority or tags (Change task) or marking it done (Mark done), writing a note (Write note) or changing one (Change note), staging a site's changes (Stage files) and committing them (Commit), stopping sharing and ending a Pair call each open a confirm that names the action and shows every value it would use. Focus starts on Don't run, and nothing runs until you choose the action's own button, like Stop site.
  • It signs what it does to tasks. A task chat adds, a note it writes and a change it makes are signed "Short Leash chat", and agents see its notes the next time they read the task. A task chat marks done is done at once, without waiting in Review, because you already said yes in its confirm; a task already waiting in Review is done too, and its review is cleared. No coding agent can sign as Short Leash chat.
  • Some things it never does. Chat can't share a site, let someone into a Pair call, run code or Artisan, send calls, resend webhooks, change PHP versions or HTTPS, claim, block or release tasks or ask for their review, drop databases, remove services, or discard changes or push. Those can expose a site, send data elsewhere or lose data, so they stay with you and your coding assistant.

Chat about one site

Every site has a Chat page beside Requests and the Monitor. A chat started there is about that site: every read and action that takes a site uses it, whatever the model asks for, and its logs are the site's own unless it asks for PHP's or a service's. Its list shows only that site's chats. Work › Chat lists every chat and names the site on a site's chats.

To ask about another site, or compare two, start a chat from Work › Chat instead.

Ask in chat on a site's Changes page starts a chat in the site's chat with a file's diff, the lines you selected or every change already read in, uncommitted or on its branch. A chip above the message box says what's attached; close it to ask without it.

Pull requests

Chat can read the GitHub pull request for a site's branch once you turn on Let chat read pull requests from GitHub in Settings › Chat. It's off until you do. If you ask about a pull request while it's off, the read's row says "Reading pull requests from GitHub is off." with Turn on, which asks first and says what goes online; then ask again. Nothing is sent by itself.

Chat then reads the pull request with your own GitHub CLI: install gh and run gh auth login once in a terminal. It reads the title, description, state, reviews, comments, checks and changed files, and a file's diff when it asks for one. Comments on single lines aren't read. Short Leash never sees your GitHub token and never posts to GitHub. The pull request's text was written by people on GitHub, so the chat is marked Has outside text.

Coding assistants (leash mcp) follow the same setting. Short Leash keeps an answer for a minute, so a new comment can take that long to show. Only pull requests on github.com are read. See ADR 0084.

How much one answer reads

One answer can use up to eight tools. When it has used them all, chat asks the model to answer with what it has; if it still can't, the answer says "That's as many tools as one answer may use. Ask a narrower question." Asking about one site, one route or a shorter time keeps it within that.

Each read also gets only the room left in the chat, counted on the safe side, so a long chat never grows past what its model can read. Once there's no room for another read, its row says Not run: no room left in this chat and the model answers with what it has. Start a new chat to read more. The model checks there's room for its whole answer before it starts. If a chat is still too long for it, Short Leash asks again with less until it fits: older results are left out first, then the newest read is cut short. The chat keeps every result.

Has outside text

Logs, mail and requests hold text Short Leash didn't write, and text like that can try to steer a model. Once a chat has read some, it's marked Has outside text for good, and every confirm in it asks you to check each value before you allow the action.

Links in an answer show their full address and open in your browser only after you say so. Answers show no images and no HTML.

From the terminal

Terminal window
leash ai chat "What failed in the last hour?"

The answer prints as it's written, with a line for each tool chat used. An action asks Run it? [y/N]; anything but y leaves it alone, and so does a run with no terminal to ask in. Leave out the question to keep chatting until an empty line, and carry on an earlier chat with leash ai chat --chat ID (leash ai chats lists them). --site shop starts a chat about one site, and leash ai chats --site shop lists that site's. See the CLI reference.

Short Leash has to be running for chat to answer.

Use Short Leash's model from other apps

Settings › Models › Models and settings › Let other apps use the model lets apps on your computer, such as an editor's AI extension or your own scripts, use the model Short Leash chose for summaries and chat, through an OpenAI-compatible API. It's off until you turn it on.

  • Address: http://127.0.0.1:9915/v1, with /v1/chat/completions, /v1/completions and /v1/models. Answers can stream.
  • Key: send it as Authorization: Bearer dk-local-…. Show key and Copy key are in Settings; Make a new key replaces it, and apps using the old key stop working.
  • max_tokens is a limit. An answer gets the room the model has left after the messages, up to max_tokens, and stops there with finish_reason "length". A request that leaves under 64 tokens for the answer gets an error saying the text is too long for the model.
  • One request at a time. Others get 429 until it's done; while the model loads they get 503 "The model is loading. Try again in a moment."
  • Only on this computer. It listens on 127.0.0.1 only, refuses requests from web pages (any with an Origin or Sec-Fetch-* header) and for any host name but 127.0.0.1 and localhost, and never offers Short Leash's tools.
  • Messages are text. A message that writes the model's own markers, such as <|im_end|> or <think>, is read as plain text, never as the end of a turn or the start of thinking, so a prompt can't write its own turns.
Terminal window
curl http://127.0.0.1:9915/v1/chat/completions \
  -H "Authorization: Bearer $LEASH_KEY" -H "Content-Type: application/json" \
  -d '{"model":"leash","messages":[{"role":"user","content":"Say hi"}]}'

If port 9915 is in use by another program, Settings names it; quit it, then turn this on again.

Where chats are kept

Chats are saved in Short Leash's database on your computer and deleted after 90 days. Settings › Models › Models and settings changes that to 30 days or a year, and Delete all chats… deletes them now.