Skip to main content
Multilingual TursoDB, MVCC & AI Agent database guides Read Engine Guide →
AgentFS (beta) Guides

Agentic Coding

Run AI coding agents safely with AgentFS sandboxing

AgentFS lets you run AI coding agents like Claude Code, Codex, and OpenCode in a sandboxed environment where file changes are isolated from your original source tree.

Supported Agents

Agent Command
Claude Code agentfs run claude
Codex agentfs run codex
OpenCode agentfs run opencode
Any CLI tool agentfs run <command>

Workflow

Here’s a typical agentic coding workflow. This example uses Claude Code, but the workflow is the same with OpenCode, Codex, and others.

Step 1: Clone the Repository

Clone the git repository to a host directory. Keep this source tree clean from build artifacts. When there’s a merge to main, pull to this repository to keep it up-to-date.

git clone https://github.com/tursodatabase/agentfs.git
cd agentfs

Step 2: Start an AgentFS Session

Use agentfs run with the --session flag to start a session. Pick a name that can eventually become your git branch name.

agentfs run --session fix-bug-123 claude

The agent now runs in a copy-on-write environment. Your original source tree remains untouched while the agent works.

Step 3 (Optional): Manual Investigation

If the agent does something unusual, open another terminal and join the same session to investigate:

agentfs run --session fix-bug-123 bash

The filesystem is shared between the shell and the agent. You can browse files, run tests, or check what’s happening while the agent works.

Step 4: Push to Branch

Once the agent has completed the work, ask it to create a branch, commit the code, and push:

“Create a branch called fix-bug-123, commit these changes, and push to origin”

You can then create a PR manually from the pushed branch.

Why This Workflow?

  • Clean source tree - Your original clone stays pristine and easy to update from upstream
  • Isolated changes - Each task gets its own session, preventing cross-contamination
  • Easy investigation - Join any session to see what’s happening in real-time
  • Standard git flow - Push branches and create PRs as usual

Next Steps

Synced from official Turso documentation ( tursodatabase/turso-docs · MIT License) Official Docs ↗
Search
Press Esc to close · Powered by Pagefind