Skip to main content
This page is about runtime sync inside a running agent. That surface is Python-only today. It is not a CLI command and not a TypeScript SDK feature.

Filesystem Sync

Use the Python ADK module to sync the attached filesystem into /workspace:
from terminaluse.lib import adk

await adk.filesystem.sync_down(filesystem_id=ctx.task.filesystem_id)

# read and write files in /workspace

await adk.filesystem.sync_up(filesystem_id=ctx.task.filesystem_id)

Task System Folders

TerminalUse also maintains task-scoped system folders for supported runtimes:
  • dot_claude mounted at /root/.claude
  • dot_codex mounted at /root/.codex
await adk.task.sync_down_system_folder(
    task_id=ctx.task.id,
    folder_type="dot_claude",
)

await adk.task.sync_up_system_folder(
    task_id=ctx.task.id,
    folder_type="dot_claude",
)
If you omit folder_type, the task module syncs all supported system folders.

What Sync Does

  • sync_down compares remote and local checksums, then fetches and extracts only when needed
  • sync_up creates a new archive and pushes changes back when needed
  • filesystem sync and system-folder sync are both used by the runtime around on_create and on_event
  • on_cancel is not wrapped in the automatic sync path, so do not rely on cancel-time workspace writes being persisted

Important Boundary

Do not use get_upload_url or get_download_url as if they were per-file APIs inside your agent code. Those endpoints are for whole-filesystem archive transfers. Use:
  • adk.filesystem.sync_down / sync_up for runtime workspace sync
  • uploadFile or downloadFile for one-file app-side operations