Skip to content
MeghaOS
Download

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

src/auth/middleware.ts
Staged. Review it before it touches the working tree.
typescript
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;
}
src
auth
routes
tests
auth.test.ts
The plan it wrote for itself
1.
Add sign and verify helpers
2.
Replace session lookups in middleware
3.
Update six route handlers
4.
Run the auth suite before staging
Plan complete50%

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
How agents are budgeted

Typical plan

  1. 1
    Resolve the working set
    Which files does this change actually touch?
  2. 2
    Checkpoint the workspace
    A restore point, before anything is written
  3. 3
    Make the change
    Every edit shown as a reviewable diff
  4. 4
    Verify it
    Tests run in the workspace before it reports done
  5. 5
    Yours to keep or undo
    One 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.

Code Studio
auth.tssession.tstokens.ts
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 }
Interface, rebuilt in the pagev0.1.10

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.

01

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.

02

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.

03

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.

04

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.