Code Studio
A coding agent that holds the whole working set.
Code Studio is a VS Code-style environment with a dedicated coding agent. It reads across files, plans the change in the open, and works inside the folder you opened, with a checkpoint before every turn so any of it can be undone.
01 — A refactor, composed
Ask for a change. Read the diff. Decide.
A replay of a Code Studio composition, drawn by the desktop's own renderer: the file tree, the staged diff, and the agent's plan with its budget. The code is invented.
Pick a request
export async function authenticate(req: Request) {
- const session = await store.get(req.cookies.sid);
- if (!session) throw new Unauthorized();
+ const token = bearer(req.headers.authorization);
+ const claims = await verify(token, publicKey);
+ if (claims.exp < Date.now() / 1000) throw new Unauthorized();
- return session.user;
+ return claims.sub;
}02 — Multi-file work
Refactors that span files, not snippets that span lines.
Most coding assistants operate on the buffer in front of you. The Code Studio agent operates on the working set: it opens what it needs, tracks what it has changed, and keeps the change coherent across every file it touches.
- Reads and edits across the whole working set in one plan
- Tracks which files are read, edited, and added, and shows you
- Runs the test suite in the workspace before declaring itself done
- Every step is visible as it runs, and stoppable if it is going wrong
Typical plan
- 1Resolve the working setWhich files does this change actually touch?
- 2Checkpoint the workspaceA restore point, before anything is written
- 3Make the changeEvery edit shown as a reviewable diff
- 4Verify itTests run in the workspace before it reports done
- 5Yours to keep or undoOne click rewinds files and chat together
03 — The surface
And this is Code Studio as it ships.
A full editor with a file tree, a tab strip, and the agent in a rail beside it, asking before it touches three files, not after.
Explorer
- src
- auth
- auth.tsM
- session.tsM
- tokens.tsA
- components
- LoginForm.tsx
- AccountMenu.tsx
- lib
- db.ts
- env.ts
- tests
- auth.test.ts
- package.json
- README.md
Changes · 3
- auth.tsM
- session.tsM
- tokens.tsA
1
import { sign, verify } from 'jsonwebtoken';
2
import { rotate, revoke } from './tokens';
3
import { db } from '../lib/db';
4
5
const SECRET = process.env.AUTH_SECRET;
6
7
export async function issueSession(userId: string) {
8
const token = sign({ sub: userId }, SECRET, {
9
expiresIn: '15m',
10
});
11
12
// Refresh tokens rotate on every use.
13
const refresh = await rotate(userId);
14
await db.sessions.insert({ userId, refresh });
15
return { token, refresh };
16
}
17
18
export async function endSession(refresh: string) {
19
const claims = verify(refresh, SECRET);
20
await revoke(claims.sub, refresh);
21
return { ok: true };
22
}
Before I start, one question
Should refresh tokens rotate on every use, or only on expiry?
04 — Security
An agent that writes code is a security question.
These are the controls that ship today: a folder scope, a command policy, approvals, and a restore point for every turn. Kernel-enforced confinement and default-deny egress are in development.
Work happens in the folder you opened
File reads, writes and deletes are scoped to the folder you opened, and paths that try to climb out of it are rejected. Commands run with the workspace as their working directory.
Destructive commands are refused outright
Privilege escalation, anything that powers the machine down or reformats a disk, and deletes aimed at absolute or home-relative paths are refused by the command policy before they start.
Risky commands stop and ask
Recursive deletes, history rewrites, anything that publishes to a remote, and piping the network into a shell are held for an approval card in the IDE. You see the exact command before it runs.
Every turn is a restore point
The workspace is checkpointed into a shadow history, separate from your own version control, before each turn. Undo rewinds the files and the conversation together, so a bad refactor is one click rather than an archaeology session.
Point it at a real repository.
Free to download. With a local model, your code never leaves your machine.