Skip to main content

State and Files

EstaCoda stores state in two scopes: global (under ~/.estacoda/) and profile-local (under ~/.estacoda/profiles/<profile-id>/). The active profile is tracked globally; everything else is owned by the selected profile.

Global state

Default root: ~/.estacoda/

PathPurposeCreated by
active-profile.jsonActive profile pointerestacoda init, estacoda profile switch
trust.jsonWorkspace trust grantsestacoda workspace trust
workspace-approvals.jsonWorkspace approval grantsApproval commands
sessions.sqliteGlobal session database with profile_id scopingRuntime initialization
update-cache.jsonUpdate check cache (global, 6-hour TTL)Startup prefetch, update command
packs/registry.jsonlGlobal pack cachePack operations
memory/shared/Global shared memory snippetsMemory operations
python-env/Managed Python virtual environment for local faster-whisper STTestacoda voice setup --stt-provider local
cache/huggingface/Default faster-whisper / Hugging Face model cacheRuntime faster-whisper STT
cache/pip/pip cache constrained under EstaCoda state for managed local STT setupManaged Python setup
logs/update.logUpdate operation log (gateway mode and managed-source updates)Update command
.backups/<label>/User-state backups before managed-source mutationestacoda update

Global state is not deleted when a profile is removed. If you want a clean slate, delete the global root. Backup your sessions database first if you care about history.

The managed local STT venv and model cache are intentionally separate:

~/.estacoda/python-env
~/.estacoda/cache/huggingface

The model cache does not live inside the venv. Removing one does not repair the other; rerun estacoda voice setup --stt-provider local to recreate the managed Python environment.

Managed Python environments

Managed Python capability environments live under the EstaCoda state root.

<stateRoot>/python-envs/<capability-id>/
<stateRoot>/python-envs/<capability-id>/env.json
<stateRoot>/cache/pip/<capability-id>/

The virtualenv path stores the Python environment for one registered capability. The manifest records the installed spec hash, package list, optional groups, paths, timestamps, and verification status. The pip cache is scoped per capability.

These paths are not profile-local. Profile-local skill state, temporary caches, and user-facing artifacts are separate concerns.

Local faster-whisper STT keeps its existing managed environment path for compatibility. It is not silently moved to the generic capability path.

Install-local state

Source install directories may contain an .install-method.json stamp that proves install ownership. EstaCoda uses this stamp to decide whether a checkout is managed-source (installer-owned, may be mutated by update) or manual-source (contributor-owned, never self-mutated).

PathPurposeCreated by
.install-method.jsonInstall method stamp: method, source URL, branch, installDirInstaller (scripts/install.sh, scripts/setup-estacoda.sh)

Profile-local state

Profile root: ~/.estacoda/profiles/<id>/

PathPurposeCreated by
config.jsonSelected profile runtime configurationestacoda init, estacoda setup, manual edit
.envSelected profile secretsSetup flows, secret store
auth.jsonSelected profile OAuth auth stateCodex OAuth setup
USER.mdProfile user preferences and communication styleMemory promotion, memory.curate
SOUL.mdProfile identity and safety memorymemory.curate
MEMORY.mdProfile learned facts and conventionsMemory promotion, memory.curate
promotions.jsonPromotion metadataMemory promotion
gateway/Gateway state: sessions, approvals, voice mode, handoff codesGateway runtime
cron/jobs.jsonCron job definitionsestacoda cron create
skills/Profile-installed skillsSkill operations, learning
skills/.usage.jsonSkill usage telemetryRuntime
skills/.evolution/Skill evolution proposals and manifestsSkill evolution
logs/Profile logsGateway, runtime
channel-media/Channel attachment downloadsGateway adapters
audio-cache/Audio cacheVoice tools
image-cache/Generated and edited image cacheimage.generate, image.edit
temp/Temporary filesVarious operations
temp/delegation/Bounded delegation timeout/stale-heartbeat diagnostics when enabledDelegation runtime
temp/audio/CLI recordings, auto-TTS temps, Telegram conversion, Discord receive audioVoice operations
external-memory/File-backed external memory recordsExternal memory (if enabled)

Delegation also writes session rows/events to sessions.sqlite. Child sessions are linked with parentSessionId. Delegation outcome memory, when enabled, is stored through the configured memory provider as bounded task/status metadata only. Stale-file warnings are session/result metadata and do not store file contents or diffs.

Ownership rule

  • Global files are shared across all profiles.
  • Profile-local files belong to exactly one profile.
  • Commands that create state report which profile owns the change.
  • Commands that inspect state require the selected profile or an explicit --profile flag.

Recovery and inspection

# See which profile is active
cat ~/.estacoda/active-profile.json

# Inspect profile config
estacoda config show

# List all profiles
estacoda profiles list

# Check a specific profile's state tree
ls -la ~/.estacoda/profiles/work/

# View logs for the selected profile
tail -f ~/.estacoda/profiles/work/logs/gateway.log

What not to do

  • Do not edit sessions.sqlite directly unless you know the schema.
  • Do not copy .env files between profiles without updating the paths and secrets.
  • Do not delete gateway/ while the gateway is running; stop the gateway first.
  • Do not delete .install-method.json unless you intend to convert a managed-source install to manual-source.
  • Do not hand-edit update-cache.json; it is a machine-generated cache.