TidebreakDocs

Tidebreak documentation

Code mode

Point Tidebreak at a git repository and supervise coding agents — Claude Code, Codex CLI, opencode, and Grok CLI — each in its own worktree.

Code mode takes a Git repository from task prompt to reviewed pull request. You register a local git repo, open a workspace for a piece of work, and run a coding agent inside it — with the same permission modes, approval cards, and review step the rest of Tidebreak uses. For chats that produce files, switch to Work.

Switch surfaces with the Code / Work control at the top of the sidebar. A first walkthrough is in the Code mode quickstart.

Repos, workspaces, and sessions

Three nouns, and they nest:

  • A repo is a local git repository you registered: its root path, the base branch new work starts from, and a branch prefix.
  • A workspace is one unit of work on that repo. It owns exactly one git worktree and one branch for its whole life, and it carries the pull-request state for that branch.
  • A session is one conversation with one harness inside a workspace.

The worktree is the important part. Each workspace is a separate checkout, so several agents can work on the same repository at once without writing over each other, and none of them touches the copy you have open in your editor.

By default worktrees are created under ~/Tidebreak/workspaces. You can change where the next one goes in settings; existing workspaces stay where they are, because git records absolute paths and moving a checkout is a repair operation rather than a rename.

Repository trust

A repository can carry settings for the coding agents themselves: Claude Code hooks and MCP servers in .claude/settings.json and .mcp.json, Codex's .codex/config.toml, opencode's opencode.json and plugins, and instruction files such as CLAUDE.md and AGENTS.md. Those settings can run commands on your computer as soon as a session starts, outside Tidebreak's approvals.

So Tidebreak starts every agent without a repository's own settings until you trust the repository. Before the first session in a repository that has them, Tidebreak lists each file and what it would do, and asks you to Trust this repository or Continue without its settings. Your answer covers every workspace of the repository. To change it later, open the repository's settings and use the Trust this repository switch.

Trust a repository only if you trust everyone who can change it.

Harnesses

A harness is the coding-agent CLI Tidebreak drives. Four are supported:

HarnessNotes
Claude CodeThe reference tier — the most complete integration
Codex CLI
opencode
Grok CLIPinned 1.0.13 uses ACP and structured approvals; see below

Tidebreak downloads its own pinned copy of each engine the first time you pick it. Your PATH is not the engine, and the downloaded copy still needs its own sign-in. Settings → Coding engines runs a doctor that reports which engines are ready and what is missing. Sign in on an engine's row runs that engine's own sign-in command, such as claude auth login, in a terminal inside Tidebreak, then checks the sign-in again when the command finishes. Tidebreak observes that login and never brokers it — your Claude or OpenAI subscription stays between you and the tool it belongs to.

Each harness runs on the model you configured for it, so the model choices from Models and providers apply here too.

A turn, and the review that follows

A turn is one exchange with the agent. While it runs you see tool activity as it happens, and approval cards whenever the agent asks for something its permission mode does not cover. Denying opens a field so you can say why, and that reason goes back to the agent.

When the turn ends you get a review card: what changed, how long it took, and the diffstat. Diffs open per file and are anchored per turn, so you can read one turn's work without untangling it from the rest.

Nothing reaches your branch because a turn finished. The worktree holds the change until you commit it.

Undo and source control

Every turn ends in a checkpoint, a saved copy of the worktree. To throw away what an agent did, open the turn's menu on its review card and choose Restore to before this turn.

  • A restore puts every file back to how it was before the turn started, including new files the turn created and files it deleted. Files your .gitignore covers stay as they are. If one stands where the restore would write, Tidebreak names it and waits for you to move it, because no checkpoint holds it and no undo could bring it back. A nested Git repository or a submodule in the way is refused the same way.
  • Everything changed since then is lost: that turn, later turns, other agents in the workspace, and edits you made by hand. The confirmation lists those files, and names the other agents' turns, before anything changes.
  • Tidebreak saves the state it replaces, byte for byte, even when a Git filter changes a file on its way into Git, such as one that strips notebook output. The conversation shows the restore with an Undo that puts that state back. If a restore stops partway, Tidebreak puts back the files it had changed and checks each one. If Tidebreak quits in the middle of a restore, the conversation shows it stopped partway when Tidebreak starts again. The Undo stays on the restore however it ended, so you can always put back everything it replaced.
  • Your commits and your branch stay as they are. If a turn committed, the restore shows up as uncommitted changes that undo the commit.
  • The agent still remembers the turns a restore undid. When you send your next message, Tidebreak tells it which files changed.

To undo less, use the diff. Revert in a file's header puts that file back, and Revert beside a hunk puts back just those lines, at exactly the place the diff shows. In the workspace diff a revert goes back to the base branch. In a turn's diff it undoes what that turn changed and keeps later edits. If a later edit changed the same lines, Tidebreak refuses the revert rather than overwrite it. A renamed file's diff shows the rename, and a hunk revert changes only those lines under the new name.

Source control holds the commit box. Write a message and choose Commit, or press ⌘Enter (Ctrl+Enter on Windows and Linux). The commit carries exactly the changes in the list you reviewed; if the files changed since, Tidebreak refuses and reads the list again. Leave the message empty to use the suggested one. If Git refuses the commit, for example because a hook failed, the box shows what the hook printed. A hook or a signing prompt gets ten minutes before Tidebreak stops the commit and says so. To throw away a file's uncommitted changes, open its menu in the list and choose Discard uncommitted changes. Discard changes only the paths that row shows: the file goes back to its last commit, and a rename you have not committed goes back to the old name. It refuses when a folder you did not pick stands where the file goes, and it cannot be undone. Revert and discard both refuse a file a Git filter changes in a way Git cannot give back, such as a notebook whose output a filter strips, because they would lose that part; change such a file in your editor.

Restore, revert, discard, and commit refuse while a turn runs, and commit also refuses while a message waits in the queue, so an agent never has its files changed under it and a commit never carries a turn's work you did not review. A sandbox workspace keeps its files in the sandbox, so you ask the agent there instead.

Editing files

To change a file yourself, open it from the Files tab and choose Edit. Press ⌘S (Ctrl+S on Windows and Linux) or choose Save to write it back to the worktree. To throw your changes away, choose Discard and confirm.

  • A dot on the file's tab means it has unsaved changes. They stay when you switch tabs. Closing the tab or leaving the workspace asks first, and so does reloading the page in a browser.
  • An agent can change the same file while you edit it. Tidebreak keeps your text and says This file changed on disk. Choose Reload to take the version on disk, or Keep my changes.
  • A save does not replace changes you have not seen. If the file changed since you opened it, the save stops and offers Compare, which shows the version on disk beside yours, and Overwrite, which replaces it after you confirm.
  • Markdown files (.md, .mdx, .markdown) open as a rendered preview. Choose Preview to switch between the page and its source, while you read or while you edit.

Images, binary files, files over 512 KB, text that is not UTF-8, and files in a sandbox workspace stay read-only. The file's header says why.

Permission modes

Code mode uses the same four modes as chats — Plan, Ask, Auto, and Allow all — with the same meaning: how much the agent may do before it stops to ask. The selector sits in the composer, per session.

Grok CLI on the pinned 1.0.13 ACP channel honors Ask, Auto, and Allow all. It still refuses Plan: the engine's own plan and sandbox flags do not confine writes. Older print-mode pins honor only Auto and Allow. Tidebreak states the modes that pin actually supports where you pick the mode.

Terminals

Every workspace has a terminal. It opens as a tab in the editor area, next to files, diffs, and the browser — not as a drawer. It runs in that workspace's worktree, so you are always in the checkout the agent is working in. Use it for the things that are faster to type than to ask for — a test run, a git command, a quick look at a file.

The terminal starts with your login shell's environment. Tidebreak adds the engines it downloaded to the end of its PATH, so claude, codex, opencode, and grok work there even if you never installed them. If you installed an engine yourself, your copy runs instead.

Pull requests

The review sidebar carries git state, the pull request, and its comments. From there you can push the branch, open a pull request, watch its checks, read review comments, and merge — without leaving the workspace that produced the change.

Pull-request operations shell out to your own gh CLI. Tidebreak observes that authentication the same way it observes a harness login. If gh is missing or signed out, you get copyable instructions rather than a button that fails.

What it does not do yet

Code mode is a full surface, not a preview, but some things are deliberately out of scope for now:

  • The file viewer edits one existing text file at a time. It does not create, rename, or delete files, and it does not replace the editor you write in.
  • A restore puts files back, not the conversation. The agent still remembers the turns you undid. Tidebreak tells it which files changed, but it does not forget what it did in them.

Harnesses run on the machine that owns the session. On a laptop that is your computer. On a hosted machine (signed in through Model Gateway) the engine runs there, and you can watch from the desktop, the hosted web UI, or the mobile preview. The phone app is for Model Gateway and self-hosted machines; it does not attach to a local-only desktop install.

The longer-term direction is to drop the mode switch entirely: one conversation concept, where binding it to a workspace is what makes it behave like code mode.

On this page