Code
A coding assistant that works in your project on your own device, with file access, a real terminal, Git and a live preview
DeutschlandGPT Code is a coding assistant that works directly in your project. It reads and changes files, runs commands in a real terminal, uses Git, and can show a running dev server in a preview. All of it on your machine, in the folders you shared with it.
Code and Cowork share the same engine and the same approval model. Code adds what a development workspace needs: terminal, Git, preview and project instructions.
Getting started
Switch to Code through the product switcher in the sidebar, or with Cmd/Ctrl+Shift+D.
Share the project folder. A workspace may hold several folders, for example a project plus a neighbouring package it depends on.
Describe the task. The assistant explores the project itself, you do not have to name files upfront.
Code opens with an empty conversation. Earlier conversations are in the history in the sidebar, see History.
The shared folders of Code and Cowork are kept separate: a folder you shared with Cowork is not reachable from Code, and the other way round.
What it can do
| Area | Details |
|---|---|
| Read the project | Full-text search, name patterns, directory listings, files read in windows so a huge file does not have to be swallowed whole |
| Change code | Targeted edits, new files, moving, renaming, deleting |
| Run commands | Build, test, lint, Git, package managers, anything else in a real terminal |
| Long-running commands | A dev server or a watch task keeps running in the background |
| Git | Status, diff, staging, commits, branches, remotes, fetch, pull, push, pull requests through the GitHub CLI |
| See the result | A live preview of a running dev server, plus screenshots and the browser console of that page |
| Delegate work | Hand a question or a whole sub-task to a sub-agent |
| Documents | Everything Cowork can do with Office files and PDFs, since the two share the same toolset |
Below the composer
The bar under the input field describes the next turn:
- + attaches images. Other files you drag onto the input field or paste: one from a shared folder is attached by its path in that folder, a text file, document or archive from elsewhere with its content. An SVG counts as a text file, whichever way it arrives, so the assistant gets its code and can edit the graphic. A Windows event log (
.evtx) from elsewhere is attached by its full path on your computer, and the assistant reads it there with PowerShell or Python. That command is approved like any other, see the modes below. - Tools shows whether Web Search is available with the current model, switches on Image Generation (if an image model is available to you; on request the assistant saves a generated image or a diagram as a file in your project, and Save to folder under a generated image does the same with one click), and narrows which Integrations the assistant may reach.
- The model menu shows model and effort in one button. Pick the model at the top and the effort in the Effort submenu. Both are remembered per conversation.
- The mode decides how much runs without asking, see below.
In a narrow window the bar hides the effort and shows only the icon of the mode. Both are then in the button's tooltip.
In the header, the Special app picker binds one of your special apps to the conversation. The choice takes effect with the first message and stays with that conversation. For a different special app, start a new chat.
Permission modes
The mode decides how much the assistant may do without asking. You pick it in the menu below the input field and can switch it at any time, also with Cmd/Ctrl+Shift+M. The menu shows one short line per mode. Hovering over or clicking the info icon at the top of the menu shows the full explanation of every mode, with a link to this section.
Your organization can set rules that apply in every mode: calls that are always allowed, always asked about or always denied, and which local MCP servers may start. A deny rule applies in Auto too. How the rules work with the modes is described under Agent permissions. Whether you can choose Accept edits and Auto is set by your organization per role, see Modes without confirmation.
Normal
The assistant asks before it changes or deletes files and before it runs a command.
Accept edits
File edits run without asking. So do plain file commands in the shared folders, for example creating folders, moving, copying or deleting single files. All other commands and external tools still ask. Before this mode takes effect, the app explains what it means and asks you to confirm. The other modes switch immediately.
Plan mode
The assistant only reads. It drafts a plan without changing files or running commands.
Plan mode is the safe way into an unfamiliar codebase: let it produce a plan first, read it, then switch modes and have it done. The assistant writes its plan to .deutschlandgpt/plans/ and then asks explicitly whether to implement it, so approving the plan is a deliberate step and not a side effect of your next message.
When you approve the plan, you pick on the card which mode the assistant carries it out in. The mode you were in before planning is preselected. If the plan should change, write your feedback in the card's field and choose "Stay in plan mode". The assistant then revises the plan.
For a large or unclear task, the assistant can also suggest planning first on its own. You then see a card with its reason. "Plan" turns plan mode on, "Continue directly" leaves everything as it is.
Auto
The assistant runs actions without asking, including actions of connected services. Reading, and editing files inside the shared folders, runs without a check. Every other step that no rule or earlier approval covers goes to a review model first: a shell command, starting a dev server, a tool of a local MCP server, a dangerous command, an access outside the shared folders. It lets the step run or refuses it with a reason, and the assistant carries on either way. Refused calls appear above the input field, where you can run them. It also asks where a rule requires it or settings files would change.
Don't ask
This mode is meant for unattended runs such as scheduled tasks. The assistant only runs what needs no approval: reading in the shared folders and steps that a saved approval or permission rule already covers. Everything else is declined without asking.
Critical commands
A force push, reset --hard, rm -rf, anything under sudo, piping a downloaded script into a shell, publishing a package: in Normal and Accept edits these always produce an approval card with the reason. A standing permission does not cover them, and the card offers no "always allow".
What Auto really means
Auto is the same assistant with fewer questions. It writes, moves and deletes files, and it runs commands without a confirmation each time. Every command that no rule covers and that does more than read or move files in the shared folders, and every access outside them, goes to the review model first. It lets it run or refuses it. When the review model refuses a call, the call does not run, and the assistant reads why. If the review model cannot be reached, an ordinary call runs. A critical one is refused then, and so is a command that sends data to another computer, such as an upload with curl or scp. Such commands cannot be allowed permanently either.
Auto never stops for this. The assistant carries on with the rest of the task and lists at the end what still waits for your approval. Every refused call appears with its reason above the input field. There you can run it, allow it for this chat or always, or dismiss it. Allowing it for the chat or always also covers later calls of the same kind, without asking the review model again.
Commands on another computer over ssh, scp or rsync count as ordinary steps of your task when you named that computer in the conversation, for example "work on my Linux machine devbox01 over ssh", or when one of your permission rules allows it. The review model then judges them like the same command on your own computer, so reading keys or piping a downloaded script into a shell stays refused there too. A connection to a computer you did not name is refused. A host name that only appears in a file or in command output does not count as named by you.
What stays in place:
- The file tools stay inside the shared folders. That boundary is enforced by the app, not by the mode, and widening it is a separate switch under Data storage.
- A sub-agent does not run a critical command or touch a path outside the shared folders in Auto. You did not watch it decide on that call, so it names the call in its report, and the assistant decides on it in the conversation.
Auto fits a scratch branch you can throw away. On a branch you care about, Accept edits gives you nearly the same speed while every command still stops and asks.
Approvals
A command or file change appears as an approval card with the actual diff or the actual command line.
| Key | Action |
|---|---|
Cmd/Ctrl+Enter | Approve |
Cmd/Ctrl+Shift+Enter | Approve everything pending |
Esc | Decline |
Alt+1 to Alt+9 | Select a card when several wait |
Alt+Up / Alt+Down | Move the selection |
"Always allow" is always narrow. For a file action it binds to that kind of action in one shared folder. For a command it binds to that command family, so approving pnpm test once does not approve everything. The Permissions menu in the header lists what you granted, with Revoke per entry and Revoke all. When you stop sharing a folder, its permissions are revoked too.
Actions of connected services, so integrations and MCP servers, have their own gate on the server side. Approve connections automatically lets them through independently of the file gate.
If your organization works under professional secrecy (§203), a notice about § 203 StGB appears first in three cases, and you confirm it with the checkbox:
- You switch to Auto mode, or pick Auto when approving a plan although you were in another mode before planning.
- You switch on Approve connections automatically.
- You choose Always allow for a call that can carry content off your computer, such as a command, a fetch from the internet or a tool of a local MCP server. File actions in a shared folder show no notice.
If you close the notice, the mode stays as it was and the card keeps waiting for your decision.
Delegating to sub-agents
The assistant can hand work to a sub-agent that runs in its own context and reports back:
- Explore only reads. It searches the project for an answer and returns it as a card in the conversation, folded so it does not take over the transcript.
- Agent is a full sub-agent for a self-contained sub-task. Its row shows progress while it works, and afterwards the brief and the result. The reply waits for its report by default. For long, independent work the assistant can run it in the background instead, so you can keep writing; its report then arrives as soon as it is done. Stop ends it together with the running turn.
Every tool a sub-agent calls passes the same approval gate as the assistant's own calls.
When the assistant starts several sub-agents in the same step, they work at the same time. Their rows then sit under one heading such as “3 agents working in parallel”, with the time since they started. When two of them write in the same workspace, the heading adds that shared files are locked and conflicts are listed in the report.
Up to eight sub-agents run at the same time in one conversation, and up to sixteen across all conversations in the app. At most five of them run in the background per conversation. A sub-agent beyond that is not queued: the assistant is told the limit is reached and carries on without it or starts it once another one has finished. There is no limit on how many sub-agents a conversation uses one after another.
Once a sub-agent has finished, Show full history in its row shows everything it did, with the inputs and shortened outputs of its tools. This works after a restart of the app too, because the app stores these histories on your computer. They are deleted after 30 days and together with the conversation. For organisations under professional secrecy the app stores none of it.
A sub-agent can hand part of its own sub-task to further sub-agents, up to three levels below the assistant; a sub-agent on the third level cannot start any more. Sub-agents on every level count toward the same limit of eight at a time, and a sub-agent keeps its place while its own sub-agents run. Their approval requests appear in your conversation and name the chain of tasks, for example “Refactor login › Update tests”. Stop ends every level at once.
Talking to a running assistant
- Send while it works. Your message joins the running turn at the next step boundary, so "no, use the existing helper instead" arrives while the work is happening rather than after it. A pending approval or a slash command waits for the current step first.
- Several messages in a row wait in a tray above the input and are dispatched in order. Each can be edited or removed there. Send now stops the current turn and sends the waiting messages right away.
- Stop ends the turn. Work already done stays done. Waiting messages stay and only go out when you choose Send now.
- If a turn runs out of steps with work left, a card asks whether it should keep going. Keep working resumes the same turn with every step intact. How many steps one instruction may take is set under Settings for Code.
The task list
For a multi-step job the assistant keeps a list of its steps, each with its state. As soon as there is one, a Plan icon appears at the left of the panel icons in the header and opens the list as a pane. The panel does not open by itself: when the list changes while you are not looking, the icon gets a dot.
While a step runs, it sits as a slim line above the input, for example “Running the tests, 3 of 7 done”. Clicking it opens the pane.
Switch it off with Show task list under Chat settings.
Undoing a change
Before each file change the assistant makes, Code sets the previous state aside. Hover over any of your messages and choose Rewind from here; /rewind does the same for the last message (/rewind 2 for the one before). You choose whether the files, the conversation or both go back to the state before that message. The app first shows which files are affected. If someone changed one of them afterwards, for example you in the editor, it is marked and stays as it is unless you explicitly include it. For the conversation, the message opens for editing and the conversation continues from there. After the files are rewound, a notice offers Undo.
In a folder under Git, Code also takes a snapshot of the working tree at the start and end of every turn. It stays out of your commits, branches and staging area. That way a rewind also takes back what the assistant's commands changed in the terminal, for example a formatter or a code generator. Below each such answer, Changes in this turn shows every file the turn changed, with the diff.
Outside Git, changes made by commands are not captured. There, and for anything older, Git remains the safety net: commit before a larger change, look at the diff in the Git pane, and have the assistant revert what you do not want. The Git graph can also revert a commit or reset a branch.
Settings for Code
The Code tab in the settings holds four options for this device:
- Font size: the text size of the transcript, in Code and Cowork alike.
- Check the file after every change: after each edit Code checks the changed file and hands the findings straight to the assistant, so it fixes them in the same turn. Python files go through ruff and Go files through gofmt. The project's own ESLint only runs in a folder you trust and only when you allowed the
eslintcommand without asking, because its configuration can run code from the project. On by default. - Max. steps per instruction: how many steps Code takes for one instruction before it pauses and offers Keep working. Empty means Unlimited.
- Keep computer awake while DeutschlandGPT works: prevents sleep while Code or Cowork is working, with a second switch Keep awake on battery power. For a single conversation, the same option sits in its menu in the history as Keep computer awake.
More
The history view, groups and what a conversation's menu offers.
Adding project folders, starting a new project, and the project brief in dgpt.md.
The built-in slash commands, plus your own commands and skills.
The panel, file tree, code editor, diffs and the document editor.
The real shell, background tasks, the Git pane and pull requests.
Dev server, viewport sizes, picking an element, screenshots and the browser console.