Skip to content

Files on the host

Where abx keeps state on the host, the layout of ABX_HOME, workspace markers and lock files, and which files hold untrusted guest output.

Updated

abx keeps all of its host state in one directory, $ABX_HOME (default ~/.abx), plus small marker and lock files in the folders and repositories that hold boxes. This page lists them, says which ones you may edit, and which hold output that the guest can influence.

The abx home

The tree below is $ABX_HOME, which defaults to ~/.abx.

  • $ABX_HOME/
    • layout.json layout 2 marker, checked before anything else in the home
    • config.toml saved authentication selections, secret references and the per-agent connectors setting
    • logs/
      • YYYY-MM-DD.jsonl private host diagnostics, seven UTC dates
    • locks/ every lock abx owns, created on demand, never deleted
      • config.lock config.toml writes
      • workspaces.lock creating workspace directories, writing any workspace.json
      • images/
        • build.lock image builds
        • TEMPLATE.auth.lock receipts and credential-bound starts of one template
        • TEMPLATE.RECEIPT.lock one verification receipt
      • profiles/
        • host/
          • AGENT/
            • PROFILE.lock one host login profile
        • guest/
          • AGENT/
            • NAME.lock one guest login profile
      • workspaces/
        • WORKSPACE-ID/
          • BOX.lock one box, held by every command that changes it
          • BOX-ID.renew.lock the renewal worker of one box
    • images/
      • current.json the active template
      • template-ID/
        • base.smolmachine published template, read-only
        • auth-HASH.verified verification receipts for that template
    • profiles/
      • host/
        • AGENT/
          • PROFILE/ native host login for masked access (codex, pi, opencode)
          • .login-XXXXXX/ a login in progress
      • guest/
        • AGENT/
          • NAME/
            • profile.json shared guest login profile (global access)
    • workspaces/
      • NAME-ID8/
        • workspace.json version, id, kind, name, path, lastUsed
        • boxes/
          • BOX-ID8/
            • box.json box identity, network, bindings, authentication selection, connectors; a box is live while this exists
            • staging.git/ host-owned Git staging repository
            • transcripts/ shared with the guest at /abx/transcripts
        • archive/
          • BOX-ID8/ box.json and transcripts/ of a box removed with rm

Placeholders in capitals stand for generated names:

Placeholder Meaning
NAME-ID8 A workspace directory: NAME is a slug of the folder name when the workspace was first used, and ID8 the first 8 hex digits of its id. The name is a label. abx finds a workspace by the id in its workspace.json.
BOX-ID8 A box directory: the box name, a dash and the first 8 hex digits of the box id.
WORKSPACE-ID, BOX, BOX-ID, TEMPLATE, RECEIPT In lock file names: the full workspace id, the box name, the full box id, the template id, and the file name of a verification receipt.
ID, HASH Generated identifiers of a template and of a verification receipt.
AGENT, PROFILE, NAME An agent name and a login profile name.

Rules for the home

  • config.toml is the only file meant for editing. It holds saved authentication selections, references to secrets and the per-agent connectors setting ([agent.<agent>]), never secret values. TOML is what you edit and JSON is what abx writes.
  • abx creates directories in the home with mode 0700 and files with mode 0600. It refuses a home that is a symlink, belongs to someone else, is open to other users, or has another layout. See troubleshooting.
  • layout.json holds {"layout": 2}. A home with any other layout is refused with layout-mismatch and is never migrated. State from older releases in ~/.agent-box and ~/.config/agent-box is not read.
  • On Linux, ABX_HOME and the smolvm state root must be on local ext4 and free of group or other writers. See Linux hosts.
  • Diagnostic logs are kept for the current UTC date and the previous six. Older files are pruned the next time abx writes. They hold host metadata and step labels, never raw arguments, environment values, subprocess output or free-form error messages.
  • Lock files are never renamed or deleted, and none lives in a directory that rm moves.
  • smolvm keeps its machine database and VM cache under ABX_SMOLVM_STATE_DIR, or the account home when unset.

abx creates the home on first use. abx status never creates it.

Workspace markers and locks

These files live outside the home, so they hold across different ABX_HOME values that use the same folder or repository.

Path Purpose
<git common dir>/abx/workspace.json The marker of a Git workspace: {"id": "..."}. All worktrees of one repository share it.
<git common dir>/abx/workspace.lock Guards writes of that marker.
<git common dir>/abx/land.lock Guards landing into this repository.
<folder>/.abx/workspace.json The marker of a scratch workspace. A scratch workspace is exactly the current directory.
<folder>/.abx/workspace.lock Guards writes of that marker.

The identity is a random id (a UUID) in the marker, so moving or renaming the folder keeps its boxes. The first launch in a folder writes the marker and registers the workspace; commands that only read, such as abx ls, never write one. With --no-git inside a Git checkout, the scratch marker is written to the working tree as an untracked file, and abx does not edit .gitignore. See workspaces.

Trusted and untrusted files

abx treats files by who can write them.

Host-owned. The host writes these, and they are not mounted into the guest: layout.json, config.toml, locks/, images/, profiles/host/, workspace.json records in the home, and each box’s box.json and staging.git/. The guest’s commits arrive as a bundle into the staging repository and are checked as a tree before they are shown. abx never runs Git commands against files the guest can write.

Untrusted input from the host side.

  • A workspace marker is untrusted, since a downloaded folder can ship one. It can only select an id, never a path, and a marker that is not exactly one valid id is an error and is never replaced silently.
  • Changes the guest commits are untrusted until you review them with abx diff. See review and land and executable paths.

Untrusted guest output. transcripts/ is the only host directory a box mounts, at /abx/transcripts. Claude Code and Codex keep their transcripts there, and Claude’s cleanupPeriodDays is raised in the guest so they are not deleted after 30 days. The guest can change, delete or fill this directory, and its symlinks appear as real host symlinks, so read it without following symlinks. rm moves it to archive/ with the rest of the box directory and never deletes it.

Guest-derived text in error messages and hints is escaped, so it cannot carry terminal control characters. See security model and sessions.

Type to search…

↑↓ navigate↵ selectEsc close