The Claude desktop app has side chats: select a sentence, ask about it in a side panel, keep going. In terminal Claude Code there's nothing like it. You get /btw, which forgets the answer, or you ask in the main thread and add noise to the context the agent is working from.
I kept hitting this in long sessions, so I built Tangent.
Type /tg in any Claude Code session. Your conversation opens in the browser. Highlight a sentence, press B, and ask. The answer streams into a side panel, and the main session stays exactly as it was.
The part I use most is that branches stay around:
Install it as a plugin:
/plugin install tangent --marketplace closeup1202/tangent
A branch is just another claude -p run. It gets the sentence you picked plus the question and answer it came from, not your whole session. That keeps answers focused and cheap. Follow-ups use --resume.
The UI is one local Node server (no dependencies) and one HTML page. It binds to 127.0.0.1 with a it only ever reads your session log. Branches get no tools by default. Turn on Read files and they
The UI is one local Node server (no dependencies) and one HTML page. It binds to 127.0.0.1 with a random token per launch, and it only ever reads your session log. Branches get no tools by default. Turn on Read files and they get read-only Read, Grep and Glob, nothing that would need a permission prompt.
Live refresh polls the session log. My first version re-parsed the whole .jsonl each time: 240–290 ms on a 21 MB session, blocking the server while branch answers were streaming.
Now each session is parsed once, and later reads only process the bytes appended since the last read. The trick is keeping the unfinished last line as raw bytes, so a multi-byte character split across two reads never gets mangled. Refresh went to 5–7 ms, and server memory dropped from about 200 MB to about 50 MB.
claude
I didn't want CI to call a real model, so the tests start real Tangent servers against a ~60-line fake claude script. It speaks just enough stream-json and logs every argument it receives.
That makes assertions like these cheap:
24 tests run in about 15 seconds on Linux, macOS and Windows, with no API usage.
To check the tests actually catch things, I re-introduced two old bugs. Each one made a test fail.
Windows and Linux passed and macOS failed. The temp folder on macOS is /var/..., which is a symlink to /private/var/.... Node's process.cwd() returns the real path, but Claude Code names the session folder after the path you're in, so Tangent looked in the wrong folder.
That isn't only a test problem. Anyone whose project folder is a symlink would have hit it. Tangent now tries the given path, the shell's PWD and the real path, and uses whichever has sessions.
I built most of it with Claude Code itself.
It's MIT licensed: github.com/closeup1202/tangent. Issues and ideas are welcome, especially from people who live in the terminal.