Code sessions

This is the part that does things: the agent reads files, edits code, runs commands, commits and opens PRs inside your repository — with line-level review and rollback.

Projects

ItemDetails
TypesLocal directory, or SSH remote (user@host:port plus path)
OrganizationGroups; each card offers “Open in Code”, “Generate Wiki”, “Copy path”
CredentialsSSH passwords are encrypted with DataProtection

Workspace: current branch or isolated worktree

ModeBehaviour
Current branchWork directly in the project directory; the branch chosen at session creation is checked out immediately
New worktreegit worktree creates a separate directory and branch so the main checkout is untouched. Default location: .hetu-worktrees/<repo>/<worktree> next to the repository; the name comes from your first message
The worktree root is configurable in Settings → Workspace (absolute path, must not be inside a repository). Finished worktrees are cleaned up when their changes are merged, the working tree is clean and they have been idle past the threshold — configurable interval (1 / 6 / 12 / 24 h), idle time, and whether the branch is deleted too.
Project local / SSH Workspace: current branch work directly in the project directory Workspace: new worktree .hetu-worktrees// Agent read / write / commands / search Changes panel line diffs and rollback Checkpoints pre-task snapshots, restorable Git panel stage (including partial) and commit PR panel gh / glab: view and create Automatic cleanup merged + clean + idle past threshold
From choosing a workspace to post-merge cleanup: every agent edit is reviewable line by line, revertible from a checkpoint, and committable through the Git / PR panels.

Branches and Git sync

  • The branch picker lists local and remote branches; picking a remote ref creates a local tracking branch.
  • Once a session starts, its workspace and branch are fixed (so edits never land in the wrong place); the badge next to the title always shows them.
  • A single sync button next to the title pulls, pushes or refreshes based on state, and reports the result in a tooltip.

Directory layout

PathContent
<repo>/Main checkout; sessions never edit it directly unless you pick “current branch” mode
<repo parent>/.hetu-worktrees/<repo>/<worktree>/The session's isolated worktree (root configurable)
<data dir>/hetu.dbSQLite database (sessions, messages, checkpoint metadata, code chunk vectors)
<data dir>/logs/Backend logs (Serilog daily rolling)

Commands underneath

ActionImplementation notes
Status and syncgit status --porcelain=v2 --branch parses branch, ahead / behind and per-file state (never localized output)
Branch listLocal via for-each-ref, remote via rev-parse --symbolic --remotes (filtering origin/HEAD)
Create / checkoutgit worktree add, git checkout; picking a remote ref creates a local tracking branch
Commitgit add (partial staging supported) plus git commit; author comes from repo config
Pull / pushgit pull --ff-only / git push, with results and conflicts surfaced in the UI
PR / MRGitHub via gh pr view|list|create (body sent through --body-file -), GitLab via glab mr view|list|create
TerminalConPTY on Windows, script on Unix, so interactive programs work

The seven panels

PanelCapabilities
FilesDirectory tree, filename and content search, built-in editor with save; files touched by the agent are marked
ChangesFiles changed during this session with line-level diffs (add / remove / modify) and per-file rollback
CheckpointsSnapshots taken before each task; restore the whole workspace to a checkpoint
GitBranch and working-tree state, per-file diff, staging (including partial) and commit
PRDetects gh (GitHub) or glab (GitLab) from the origin remote: current-branch PR status, open PR list, create form (title / description / base branch / draft); prints platform install hints when the CLI is missing; warns when the branch is not pushed yet
BrowserEmbedded browser with address bar, back / forward, reload and quick links (local dev server, API docs, GitHub)
TerminalA real PTY (ConPTY on Windows, script on Unix) so vim / htop work; SSH projects run ssh -tt inside the PTY

What the agent can do

ToolPurpose
File read / writeList directories, read files (binary detection), write files, batch replace, move and delete
Command executionRun commands in the workspace (build, test, scripts); output is fed back to the model
Terminal interactionFor interactive programs, use the Terminal panel or let the agent drive a PTY
Code searchFilename and content search, plus semantic search over code chunks stored separately

Every side-effecting action is governed by the permission mode (see Agent workspace); risky operations go through approval, edits land in checkpoints, and everything can be rolled back.

A typical flow

  1. Open the project card in Code and pick a workspace mode (a new worktree is usually best for one-off tasks).
  2. Describe the task; keep permission mode at ask or switch to auto as needed.
  3. Review the diff in the Changes panel; use Checkpoints to revert wholesale if needed.
  4. Stage and commit in the Git panel, then create the PR (a draft first is fine).
  5. After merge, the worktree is cleaned up while idle; the branch is kept or deleted per your settings.