Code Projects and Remote Workspaces
When HeyS writes code or edits scripts, it needs a stricter way of working than it uses for documents: read before changing, change only the lines that need changing, and run the tests itself afterwards. This page covers "code projects" and the set of tools built for them: separate worktrees, the Changes panel, verification badges, the Git panel, the built-in terminal, background processes, and confirmation before acting. Finally, it explains how to put a project on a Linux server or in WSL so the agent works on that machine.
Code projects
How a code project differs from a regular project
Once a project is set as a code project, the agent works the way a programmer does:
Whether or not it is a code project, each time the agent changes a file the process line shows file +N −M; click it to see the diff for that change. When a change is too large, it shows This change is too large to show inline. and offers View in the Changes panel.
Two levels of settings
Whether a project is a code project is decided at two levels, and the project setting wins:
When you create a project, HeyS takes a look at the folder: if it contains project files such as .git, package.json, Cargo.toml, go.mod, pyproject.toml or Makefile, Code project is preselected, and you can change it. If an existing project looks like a code project but has never been set, when you create a task under it the top edge of the input box shows This folder looks like a code project. Work on it like a coder? You can click Make it a code project, or Don't ask again.
Hover over the Code badge next to the session title to see which level the setting comes from (set on the project / following your space setting / default); click it to go to the project page.
A change to the project setting affects only tasks started afterwards. Tasks that are running, or stopped and waiting to continue, keep the setting they started with.
Project settings at a glance
⋯ → Project settings on the project row in the sidebar opens Project settings, project name, which contains:
Additional rules
If you want the agent to keep to some fixed rules when it writes code ("run pnpm lint after editing", "write new files in TypeScript"), put them in the When coding set under Settings → Spaces → Additional rules: every task that works like a coder reads them, added after the built-in coding rules. You can write the rules directly or load .md files, which are read each time a task starts, so edits to a file apply to the next task (Spaces, Appearance and General Settings).
If a project needs different rules, choose Set for this project under Additional rules in the project settings and write text or load a .md file from the project folder (such as docs/ai-rules.md); this project's tasks then use these rules whether or not they are coding. Leaving both the text and the files empty means no additional rules for this project. Follow space setting uses the matching set from the space.
Quick actions
On the new-task page of a code project, there are two extra quick actions above the input box. Clicking one only fills in the input box; nothing is sent automatically:
- Write AGENTS.md: has the agent read through the project and write a guide covering how to build, how to test, code conventions and directory structure;
- Review changes: reviews the current uncommitted changes, reporting only problems introduced by them, sorted by severity, with
path:line.
If a task in the same code project is already changing files and you start another task, the top edge of the input box warns Another task is already changing files in this project; working at the same time may overwrite each other. It does not stop you, but the safer approach is to use a separate worktree.
Separate worktrees
A separate worktree lets a task change code in its own copy of the project (its own folder plus its own branch) without touching the project's main directory. Several sessions can change the same repository at the same time without affecting each other, then merge back or open a PR when done.
Turning it on
- On the new-task page of a code project, click the gear Run settings on the top edge of the input box.
- Turn on Run in a separate worktree; if needed, choose which branch to branch off from under Base branch (merging and syncing also use it as the baseline).
- Write the task goal and send it. The agent works in the newly created worktree, and the top edge of the input box shows Worktree: branch name.
- If the project folder is not yet a git repository, turning on a worktree first initializes it as one (with an empty initial commit). If the folder already has files, they are not committed for you; commit once yourself first.
- Dependencies such as
node_modulesare not carried over; the agent installs them as needed. Files that are not in git but are needed to run (such as.envor local config) can be listed under Files copied into worktrees in the project settings, and are copied automatically when a worktree is created (one glob pattern per line, relative to the repository root). - To run every new task in a worktree, turn on Run new tasks in a separate worktree by default in the project settings; you can still turn it off before sending.
- A session that has already started in the main directory can switch over from ⋯ → Continue in a separate worktree… on the session in the sidebar. Later tasks (including continuing an unfinished one) then run in the worktree. Uncommitted changes in the main directory are not carried into the worktree; commit them first if you need them. If a task is running, wait for it to stop before switching.
Worktree operations
Worktree operations are in two places: the ⋯ menu of the session in the sidebar, and the worktree bar at the top of the Git panel (which shows "N commit(s) ahead of the base, N behind").
Merging back into the base has a few prerequisites: the project's main directory must be on the base branch and have no uncommitted changes, and changes in the worktree must be committed first (or check the "commit first" option). If these are not met, the dialog states the reason directly.
Conflicts
Branch status
The session row in the sidebar and the session title bar show the worktree's branch, with an icon next to it marking its status:
When you archive or delete a session that runs in a worktree, you are asked What about the worktree? You can delete the worktree along with it, or keep it.
The Changes panel
The Changes panel lists the files the agent has changed. It appears only in sessions of code projects; open Changes from the panel icons at the top right of the session.
Undo
Before undoing, HeyS lists which files will be restored and which newly created files will be deleted. Files changed again after the agent changed them are not overwritten by default and are listed separately; if you really want to overwrite them, check Overwrite them anyway. Files without a checkpoint cannot be undone and are also listed. You cannot undo while a task is running; wait for it to stop.
Exporting a patch
Export patch in the panel header exports the changes in the current scope as a patch file, convenient for sending to someone or applying elsewhere.
Reviewing these changes
Review these changes in the panel opens a new read-only session (titled "Review: original session name") in which an agent reviews these changes independently: it can read the code but cannot run tests. The review lists problems graded Critical / Major / Suggestion, each marked Verified or Speculative, with file:line.
Check the problems you want handled and click Send back to the original session. HeyS jumps back to the original session and fills these problems into the input box (nothing is sent automatically). After you confirm and send, the original agent checks and fixes them one by one. The review session has Open original session at the top.
Verification badges and check commands
When a code task wraps up, HeyS checks against the commands the agent actually ran and their results: whether it ran checks again after changing the code, and whether they passed. If the checks were not run or did not pass and no reason was given, the task is sent back once, asking the agent to run them or explain why not.
Verification badges on the session title bar and in the Changes panel:
Hover over a badge to see how many code files were changed, which checks were run after the last change and whether each passed, and the agent's explanation.
Which commands count as "checks" is decided by Check commands in the project settings (see Code projects); when it is empty, common test and build commands are recognized automatically.
The Git panel
When a project is a code project and its folder is a git repository, the panel icons on the right include Git. Above the input box, "branch name, N uncommitted changes" is also shown; click it to open the Git panel.
The Git panel does not push, pull, rebase or merge; do these in the terminal (for merging worktrees and opening PRs, see Separate worktrees).
- If git is not installed on this computer, the panel shows git was not found and how to install it (macOS:
xcode-select --install; Windows: download and install from git-scm.com). After installing, reopen the app. - In a project with several directories, the Git panel can switch which directory it shows.
- When connected to a collaboration node or the web app, only administrators can perform Git write operations; regular accounts can only view.
Built-in terminal and background processes
Built-in terminal (local desktop only)
In sessions and on the new-task page of a code project, the panel icons at the top right include a terminal icon, where you can type commands directly.
- It starts in the project folder; the sessions of one project share one set of terminals.
- Collapsing the panel or switching sessions does not end the shell; when you come back, the earlier output is still there.
- New terminal opens additional terminals, switched with tabs; closing a tab ends that shell.
- The panel header has Open in system terminal, which opens the same folder in the system's own terminal.
- This terminal is for your own use; the agent does not use it (the agent has its own way of running commands).
Remote windows opened from the web app or CoWork have no built-in terminal. In a remote workspace (Remote workspaces (SSH / WSL, local desktop only)), the terminal opens on the remote machine.
The background processes panel
For commands that do not end by themselves, such as development servers or watch-mode builds, the agent does not sit waiting after starting them, and they are not killed when time runs out; instead they move to the background and keep running. When a session has background processes, a Background processes icon appears at the top right (in all projects, not only code projects).
The Processes section of the task details panel (Understanding Task Execution) also shows the foreground command currently running and the background processes.
Confirmation before acting
Choose under Confirm before acting in the project settings:
With Before writes, when the agent wants to write a file or run a command, the task stops and a Needs your OK card appears in the session, showing the command to run, or the file to write with a preview of the change:
You can also skip the buttons and reply directly in the input box (for example, "don't touch the config files yet, only change the tests"). While a task is stopped here, the task list shows Stopped to ask whether to go ahead.
For an unfamiliar repository, you can use Read only first to have the agent draft a plan, then after reviewing it switch to Never or Before writes to carry it out.
Remote workspaces (SSH / WSL, local desktop only)
When the project files are on a remote Linux server, or in WSL2 on this Windows computer, you can put the project on that machine: the agent reads and writes files and runs commands there, while the interface is still the HeyS on your own computer. Nothing needs to be preinstalled on the remote side; it is deployed automatically on first connection.
The connection wizard
- On the new-task page, click the project picker and choose Remote connection….
- Type: SSH server (the project is on a Linux x64 server) or WSL (the project is in a WSL2 distro on this computer; shown only on Windows). Recent connections below can prefill everything in one click.
- Settings: for SSH, you can pick an alias from Host from ~/.ssh/config to prefill, or enter the host, port and username by hand. Choose Password or Private key as the authentication method (leave the private key file empty to use ssh-agent or the default keys in ~/.ssh; for an encrypted key, enter its passphrase). Check Remember the password / passphrase in the system keychain so you don't have to type it next time. For WSL, choose the distro; leave Linux user empty to use the default user.
- Connect: logs and upload progress are shown live, and you can Abort. The first time you connect to a host, its host key fingerprint pops up; check it and click Trust and continue.
- Folder: browse remote folders (you can create a New folder or Show hidden folders), enter a project name and click Open this folder. The project is created on the remote machine and you jump to its new-task page. You can also Skip for now.
The host key fingerprint is confirmed only on first connection. If it changes later, the connection is refused outright, with the message that the server may have been reinstalled, or someone may be impersonating it in the middle. Once you have confirmed the server really has a new key, delete that line from the record as instructed and connect again.
Working in a remote project
- Remote projects and local projects are in the same sidebar. Remote ones have a cloud icon, with the machine they are on written under the name (such as
SSH dev@10.0.0.8:22orWSL Ubuntu). Whichever one you click is the machine you send tasks to and browse files on; the project picker groups projects by machine. - The file panel, Office preview, Changes, Git and background processes all point at the remote machine; the built-in terminal opens in the remote project folder. Running on in the task details shows the remote connection.
- Remote sessions notify you when they finish, just like local ones.
- The model settings of your current space on this computer are carried over automatically when you connect, so nothing needs to be configured on the remote side. In organization mode, the models your organization assigns you are valid only on this computer and are not synced to the remote; the remote uses its own model settings. Model services you added yourself are synced as usual.
Managing connections
The bottom of the sidebar lists the machines connected during this run, each with a status dot and a menu:
After a disconnection, remote projects turn gray and the page shows Lost the connection to the remote workspace. Click refresh or Reconnect; if the password was not saved, the wizard opens for you to enter it. Connections are not restored automatically after the app restarts; click refresh when you need one.
Requirements and limits
Remote projects have no built-in browser, Computer Use or Sprite; remote windows opened from the web app or CoWork have no entry for remote workspaces.
FAQ
The agent broke something and I want to go back to before the change. In the Changes panel, use Go back to before this turn, or Undo changes to this file for a single file. You can also use Rewind to here from Understanding Task Execution and choose Rewind conversation and files.
Merging into the base reports that the main directory is not on the base branch. First switch the main directory back to the base branch (with the branch switcher in the Git panel, or in the terminal), then merge.
Creating a PR reports that gh was not found on this computer. Install the GitHub CLI gh and sign in, or push the branch yourself in the terminal and open the PR on the website.
I can't see the terminal icon. The terminal appears only in code projects on the local desktop; first make sure the project is set to Code project.
SSH reports authentication failed. Check the username, password or private key; an encrypted private key needs its passphrase; for servers that allow only public key login, choose Private key.
