Kiro Threads for VSCode
Kiro Threads runs kiro-cli chat in VS Code terminals and lists them as threads in a sidebar. Each thread shows its status, and a stopped thread reopens with the same Kiro session. It is a VS Code port of Zed's Terminal Threads, built for Kiro CLI only.
The extension owns the thread list: titles, status, notifications, and reopening after a reload. Kiro CLI owns everything else: auth, models, agents, MCP, steering, and skills.
Before you install
You need the following:
- VS Code 1.93 or later.
- Kiro CLI installed and signed in. The extension never signs you in.
- Terminal shell integration, which is on by default for zsh, bash, fish, and pwsh. Without it, threads still start, but titles, status, and notifications stay blank.
Install the extension
Install from the Visual Studio Marketplace:
- Open the Extensions view.
- Search for
Kiro Threads.
- Select Install.
You can also install from the command line:
code --install-extension christianbonzelet.kiro-threads
To install a local build, pass the .vsix file instead:
code --install-extension kiro-threads-<version>.vsix
Kiro IDE and other VS Code-compatible editors that use Open VSX get the extension from Open VSX. In your editor, search for Kiro Threads in the extensions view and install it.
After the install, a Kiro ghost icon appears in the activity bar. It opens the Threads view.
Work with threads
Start a thread with Kiro Threads: New Kiro Thread, or select + in the Threads view. The extension opens a terminal in the folder of the active editor and runs kiro-cli chat in it.
| Task |
How |
| Focus a thread |
Select it in the Threads view. |
| Reopen a stopped thread |
Select it. It reopens with kiro-cli chat --resume-id <session>. |
| Switch threads |
Run Kiro Threads: Switch Thread. The list is sorted by last use. |
| Rename a thread |
Right-click, then Rename Title, or press F2 in the view. Clear the title to follow the kiro-cli session title again. |
| Stop a thread |
Select ×, close the terminal tab, or type exit. The thread stays in the list. |
| Delete a thread |
Right-click, then Delete Thread, or press Delete (⌘⌫ on macOS) in the view. You confirm first. |
| Send code to a thread |
Select lines, right-click, then Add Selection to Kiro Thread. |
| Load sessions started elsewhere |
Select Refresh in the view title. |
Stopping a thread differs from Zed. In Zed, closing a terminal thread removes it. Here the thread stays, so you can resume it another day.
Deleting a thread removes it from the list only. The kiro-cli session stays on disk, and a later refresh does not bring the thread back.
Add Selection to Kiro Thread types a reference such as src/threadManager.ts:12-40 into the active thread. The path is relative to the thread's folder when the file is inside it, and absolute otherwise.
Sessions started outside Kiro Threads
On startup, and when you select Refresh, the extension runs kiro-cli chat --list-sessions --format json in each workspace folder. Every saved local session that is not in the list yet appears as a stopped thread. Cloud sessions and empty sessions are skipped. Without an open folder, nothing is imported.
In a multi-root workspace, the view groups threads by workspace folder. Threads outside every folder go to Other.
Read the thread status
Each thread shows an icon and a short label for its state.
| Icon |
Label |
Meaning |
| Spinner |
working |
kiro-cli is working. |
| Shield |
needs permission |
kiro-cli waits for you to allow a tool. |
| Question mark |
needs input |
kiro-cli asked you a question. |
| Check |
done |
kiro-cli finished the turn. |
| Error |
error |
kiro-cli stopped with an error. |
| Terminal |
kiro-cli exited |
The shell runs, but kiro-cli does not. |
| Restart arrow |
not running |
The thread has no terminal. Select it to reopen. |
When a thread you are not looking at finishes, fails, waits for you, or rings the terminal bell, the thread gets a dot (●). The view icon gets a badge, and a notification offers Show Thread. To turn off the pop-up, set kiroThreads.notifyWhenWaiting to false.
Settings
| Setting |
Default |
Effect |
kiroThreads.command |
kiro-cli chat |
Command typed into the shell when a thread starts or reopens. Leave it empty for a plain shell. |
kiroThreads.resumeSessions |
true |
Appends --resume-id <session> when a stopped thread reopens. Applies only when the command runs kiro-cli chat. |
kiroThreads.cliPath |
empty |
Path to the kiro-cli used to list saved sessions. When empty, the extension tries the executable in kiroThreads.command, then PATH, then ~/.local/bin/kiro-cli. |
kiroThreads.terminalLocation |
editor |
Opens thread terminals as editor tabs (editor) or in the panel (panel). |
kiroThreads.notifyWhenWaiting |
true |
Shows a pop-up for threads that need attention. |
Set kiroThreads.cliPath when the view says that kiro-cli was not found. VS Code started from the Dock on macOS does not always see ~/.local/bin.
Known limits
- Session resume reads the process table with
ps. It works on macOS and Linux. On Windows, a stopped thread reopens with a fresh kiro-cli chat.
KIRO_NO_PROGRAM_STATUS=1 turns off the status reports of kiro-cli, and with them the status icons.
- VS Code does not tell extensions which terminal is on screen. The extension counts a thread as visible when the window has focus and the thread is the active terminal. For editor terminals, the active tab must also be a terminal. Expect the odd extra or missing notification.
- The terminal tab keeps the name it had when the thread started. The current title is in the Threads view.
How the extension works
The extension never talks to kiro-cli directly while a thread runs. It reads the terminal output and the files that kiro-cli writes.

The diagram source is docs/architecture.html.
Status comes from escape sequences
VS Code does not give extensions terminal title or bell events. So ThreadManager reads the raw output of each shell command with TerminalShellExecution.read(). That API only works with shell integration, which is why the extension needs it. TerminalSignalParser in src/terminalSignals.ts picks out these sequences:
OSC 0 and OSC 2 set the title. kiro-cli sends kiro: <session title>, and while it works, a spinner glyph in front. src/titles.ts strips both.
OSC 7501 is a private status report from kiro-cli:
ESC ] 7501 ; state=<idle|working|blocked|done|error|clear> [:kind=<question|permission>] :app=kiro-cli BEL
OSC 9, OSC 777, and a bare BEL count as a request for attention.
Resume needs the session id
kiro-cli does not print its session id, so src/kiroSession.ts finds it after the fact. kiro-cli writes a lease file per open session to ~/.kiro/session-leases/<sessionId>.lease (or under $KIRO_HOME). The lease holds the process id of the kiro-cli backend. The extension walks the ps process tree from that process up to the shell of the thread terminal. When more than one lease matches, the newest wins. The id is saved with the thread in VS Code workspaceState, so threads are scoped to the workspace.
The lookup runs 1.5 s after a status or title report. When you stop a thread that has no session id yet, the lookup runs once more before the terminal closes, because the lease is gone after that.
Mapping to Zed
The behavior was reverse engineered from the Zed source (commit 7279c76, 2026-11-19) and Zed 1.29.2, and the Kiro side from kiro-cli 3.5.0.
| Zed |
Kiro Threads |
sidebar_terminal_threads SQLite table |
ThreadStore in workspaceState (src/threadStore.ts), plus the Kiro session id |
write_terminal_init_command: wait 5 s for the shell handshake, then type the command |
Wait 5 s for shell integration, then executeCommand, else sendText (src/threadManager.ts) |
TerminalEvent::TitleChanged, compose_terminal_thread_title |
OSC parser (src/terminalSignals.ts) and title helpers (src/titles.ts) |
TerminalEvent::Bell to mark_terminal_notification, suppressed while visible |
BEL, OSC 9, and OSC 7501 changes to dot, badge, and notification |
| Restore reruns the init command |
Restore runs kiro-cli chat --resume-id (src/kiroSession.ts) |
"Add Selection to Thread" pastes file.rs:2-3 |
Same format (src/mention.ts) |
| Thread switcher by last access |
Kiro Threads: Switch Thread |
Contribute
To report a bug, run the extension from source, or open a pull request, follow Contribute to Kiro Threads.
License
MIT