Synara treats Git as a first-class part of the agent workflow, not an afterthought. Every thread can live on its own branch, every agent turn that writes files generates a diff you can inspect, and you can commit, push, and open a pull request without ever leaving the app. This page explains how Git integrates with threads and what operations are available.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Emanuele-web04/synara/llms.txt
Use this file to discover all available pages before exploring further.
Git worktrees: isolated branch checkouts per thread
When you create a thread withenvMode: "worktree", Synara calls git worktree add to create a separate directory on disk for that thread’s branch. Each worktree is a full working copy of the repository pinned to a specific branch. Multiple worktrees from the same repo coexist without interfering — the agent in one worktree can commit freely while another agent on a different branch does the same.
GitRemoveWorktreeInput:
Reviewing diffs: per-turn and per-thread
Every time an agent completes a turn that writes files, Synara records a checkpoint with a file-level summary. You can retrieve the exact diff for any single turn or for the entire history of a thread using thegetTurnDiff and getFullThreadDiff WebSocket methods.
path, kind (the change type), additions, and deletions:
Diffs attach to individual turns so you can trace exactly what the agent changed in response to each message. If an agent’s output looks wrong, scroll to the turn in question and inspect its checkpoint diff before reverting.
Git operations available in Synara
Synara exposes a stacked Git action system that can run multiple operations in sequence. The available actions are:Stage your changes
Select the files you want to include. Synara calls
GitStageFilesInput to add paths to the index:Generate a commit message
Click Generate message. Synara uses the
textGenerationModelSelection from your settings to summarize the staged diff into a conventional commit message. The default text-generation model is "gpt-5.4-mini" (the value of DEFAULT_GIT_TEXT_GENERATION_MODEL), but you can change it in Settings under textGenerationModelSelection.Commit and push
Choose
commit_push to create the commit and push to the remote in one action, or commit_push_pr to also open a draft pull request.AI-generated commit messages
TheGitRunStackedActionInput accepts an optional commitMessage. When you leave it blank, Synara summarizes the diff with the text-generation model configured in settings:
GitSummarizeDiffInput to preview what the model would produce before committing.
Working with branches
The branch picker lists all local and remote branches returned byGitListBranchesInput. Each branch entry includes whether it is the current branch, whether it has an active worktree, and whether it is the default branch of the repository:
GitCreateBranchInput to create a new branch, optionally publishing it to the remote immediately:
Worktree cleanup after closing a thread
When you delete or archive a thread that usedenvMode: "worktree", Synara can call git worktree remove via GitRemoveWorktreeInput to free up the disk space. This is called the worktree cleanup step. The force flag controls whether cleanup proceeds even when the worktree has uncommitted changes.
Related
- Parallel Agents — running multiple threads across different worktrees
- Threads and Worktrees — the relationship between threads, branches, and worktrees
- Settings — configuring
textGenerationModelSelectionfor commit message generation