Lash
Lash is a fork of OpenCode. Everything OpenCode does, Lash does: 15+ model providers, MCP tools, sessions, agents, the TUI. Those are documented at opencode.ai/docs, and that documentation is accurate for Lash.
This page covers only what Lash adds on top.
The short version: OpenCode gives you an agent in your terminal. Lash gives you an agent and a shell in the same prompt, and lets you stop deciding which one you meant.
Execution modes
The prompt has three modes. ctrl+space cycles them.
| Mode | Icon | What a line of input does |
|---|---|---|
| Auto | ∞ | Runs as a shell command. If the shell chokes on it, hands it to the agent. |
| Shell | > | Runs as a shell command. Always. |
| Agent | ◆ | Goes to the agent. Always. |
Auto is the default, and it is the reason the fork exists. You type git status and it
runs. You type fix the build error in src/index.ts and the agent takes it. You do not
prefix, toggle, or think about it.
To run one command without leaving the mode you are in, prefix it with !.
If you want a different key, set mode_toggle in your keybinds. It takes precedence over
ctrl+space.
How Auto decides
Auto does not guess up front. It runs your input as a shell command and watches how the shell fails.
Some failures mean you typed English:
> make sure the tests pass
make: *** No rule to make target 'sure'. Stop.
No rule to make target on a line whose second word is sure is not a build problem. It
is a sentence. Lash reroutes it to the agent and you see the answer, not the error.
The signals it watches for are shell parse and syntax errors, command not found,
unknown-option and unknown-subcommand errors from tools like git, go, cargo, docker and
kubectl, and a list of words that are ordinary in English but odd as the second token of a
command.
A command that fails for a real reason still fails. git psuh gets you git's error, not a
conversation about it.
The two bars
The prompt draws two vertical bars down its left edge instead of one.
The outer bar is the agent color. The inner bar is the execution mode color. Together they tell you, without reading anything, which agent is live and whether the next line is going to the shell or the model. The mode icon sits in the prompt as well, but the bar is what you catch out of the corner of your eye.
The working directory follows you
cd inside shell mode changes the directory for everything after it, and the footer shows
where you are.
This sounds obvious and is not. Each shell command normally runs in its own process, so a
cd would evaporate the moment the command exited. Lash tracks the directory across
commands and propagates it back to the UI, so a session behaves like a terminal rather than
a series of unrelated one-shot commands.
The change is also published as an EventCwdUpdated event on the JS SDK, if you are
building something that needs to follow along.
Tab
Tab completes shell paths and commands. Shift+Tab cycles agents.
Upstream maps Tab to the agent cycle. Lash moves it, because in a prompt where half of what you type is a shell command, Tab completing a path is worth more than Tab switching models.
Versions
Lash versions independently of upstream. Released as lashcode on npm and
lacymorrow/tap/lash on Homebrew, and it installs alongside OpenCode rather than over it:
different binary name, different install directory. Running both is fine.