Sentinel for VS Code
Sentinel is a coding agent that runs entirely on your machine: a local server runs the
agent, keeps an audit trail of everything it does and enforces its guardrails; a web UI
talks to it. This extension puts that UI in VS Code's side bar, starts the server for you,
and works with the editor: the file and lines in front of you are the chat's context, and
the chat's files, diffs and proposed changes open in VS Code's own editors.
It is a thin client. The extension edits no file and calls no model; everything happens in
the server, which the extension carries (its Python source and prebuilt UI, about 12 MB)
and runs on the Python already on your machine.
What you need
- VS Code 1.100 or newer.
- Python 3.11 or newer on the machine. The extension finds it (the
py launcher, then
python3 / python on PATH, or the path in sentinel.pythonPath); it never installs it.
pip able to install packages. On a managed machine that is the package index already in
your pip configuration; the extension carries no index address of its own and downloads
nothing itself. If pip is not configured for you, set sentinel.pipIndexUrl.
- An open folder: Sentinel works on the folder open in the window.
First run
- Open a folder.
- Click the Sentinel shield in the activity bar (or run Sentinel: Open). Drag the
view to the secondary side bar if you want the chat on the right.
- The first time, the runtime is prepared: a virtual environment, then
pip install of the
server's packages. A few minutes once; seconds afterwards. The Sentinel output channel
shows every line.
- The chat opens on its Settings panel: enter your model endpoint and key, pick a
model, save. The key is stored in the operating system's credential store, never a file.
In the editor
- Context follows you. Click in a file or select lines: the chat's context chip shows
them, and "what does this do?" is about them. Only the path and line numbers are sent; the
agent reads the lines itself, audited.
- Add to Chat and Explain This on the editor's right-click menu; Fix with
Sentinel in the light bulb on an error or warning.
- Files and diffs open in VS Code. File links open at their line; a changed file opens
in the diff editor against its checked-in copy.
- Proposed changes are reviewed in the diff editor, with Accept and Reject in its
title bar. The decision goes through Sentinel's own approval (recorded, checkpointed,
verified, audited).
- Unsaved work is safe. The agent will not write a file you have unsaved changes in; it
asks you to save or discard first.
- The agent sees your Problems. After it edits, the errors VS Code's language servers
report in those files go back to it once, to fix or explain.
- TFVC in Source Control. In a TFVC workspace, VS Code's Source Control view lists the
pending changes as Included and Excluded, with gutter markers and a diff per file. Check
In offers one changeset per solution when the changes span several, lets you pick the
work item from the ones assigned to you, and goes through Sentinel's own check-in (the work
item your team requires, an audit record) after you confirm. The chat's Source Control
button opens this view. It lists the loaded chat's changes, with Git's letters and colours,
and shows the chat's work item in the status bar, where Git shows the branch.
- Work Items. A Work Items view in the Source Control side bar: the chat's work item,
your open ones (filter by type), a search of the whole backlog, Associate with This Chat
and Open in Browser.
- The chat follows VS Code's theme.
The full app in your browser
The same Sentinel also runs as the full application in your browser (file tree, split
viewer, a wide window), with the same chats: click the globe in the chat. Each folder
keeps its address. A browser's sign-in lasts until the browser closes or VS Code closes the
window, whichever comes first; the globe signs it in again.
Where things live
Everything the extension creates is under one folder, %LOCALAPPDATA%\Sentinel on Windows
(~/.local/share/sentinel elsewhere, or sentinel.dataFolder):
| Path |
What |
runtime\venv\ |
The virtual environment with the server's Python packages |
agent.config.yaml |
Sentinel's configuration, edited by its own Settings panel |
sessions\ |
Your chats |
logs\ |
The server's log and its audit trail |
Nothing is written into the extension's folder or into your project. Deleting runtime\
is always safe; the next start rebuilds it (Sentinel: Reinstall Python Runtime).
Settings
| Setting |
Default |
Meaning |
sentinel.pythonPath |
empty |
The Python to build the runtime with; empty finds one |
sentinel.pipIndexUrl |
empty |
A package index for pip; empty uses pip's own configuration |
sentinel.dataFolder |
empty |
Where everything above goes |
sentinel.port |
0 |
A fixed port on 127.0.0.1; 0: each folder keeps its last port while free |
sentinel.autoStart |
false |
Start the server when a folder opens |
Commands
Sentinel: Open, Open in Editor Tab, Open in Browser, New Chat, Add to
Chat, Explain This, Accept Change / Reject Change (in a proposal's diff),
Sentinel TFVC: Check In / Refresh (in Source Control), Restart Server, Stop
Server, Show Server Log, Open Data Folder, Reinstall Python Runtime, and Menu (the status bar item).
Privacy and security
- The server listens on
127.0.0.1 only, on a port chosen for this window, and every call
to it needs a session token the extension mints per start; the panel and Open in
Browser sign in through one-time links, so the bare address shows a sign-in wall. The
browser's sign-in is a session cookie: it ends when the browser closes or the server
stops.
- The only network traffic is the model calls you configure in Sentinel's Settings panel.
The extension itself sends nothing anywhere and has no telemetry.
- The UI is shown in a webview that may frame only the local server, and the server allows
only that webview to frame it; by default the server refuses to be framed at all.
- Between the editor and the chat pass paths, line numbers and short prompts, never your
files' text. The webview's one script relays only a fixed list of message types, on the
local server's origin only, and the extension accepts only paths inside your open folder.
- When the window closes, the server is told to stop; if VS Code dies without a word, the
server notices and exits on its own.
Troubleshooting
The Sentinel output channel (Sentinel: Show Server Log) has pip's and the server's
output; the last lines say what went wrong. No Python found: install one or set
sentinel.pythonPath. pip install failed with a connection or certificate error: pip is
not configured for your package index; set sentinel.pipIndexUrl or ask whoever manages the
machine. The server did not come up: the traceback is at the end of the log; a broken
agent.config.yaml in the data folder is the usual cause.
Limitations
Local windows only (no Remote-SSH, WSL or container windows). A link inside the UI to another
site may not open from inside the frame; use Open in Browser.
Documentation, source and issues: https://github.com/jamesshca/coding-agent.
| |