Coder Studio uses a runtime directory for storing runtime configuration and local state.
- Unix/macOS:
~/.coder-studio/ - Windows:
%USERPROFILE%\.coder-studio\ - Custom: Set
CODER_STUDIO_RUNTIME_DIRenvironment variable
~/.coder-studio/
├── runtime.json # Runtime configuration (port, token)
├── data/ # Persistent state JSON files and local app state
└── logs/ # Server logs (Phase 2+)
The runtime.json file contains runtime configuration written by the server on startup:
{
"version": "1.0",
"port": 4173,
"token": "random-secure-token",
"pid": 12345,
"startedAt": "2026-04-14T12:00:00Z"
}version: Configuration schema versionport: Server port numbertoken: Authentication token for internal endpointspid: Server process IDstartedAt: Server start timestamp
- The runtime directory should be user-readable only (700 permissions)
- The
tokeninruntime.jsonis used to authenticate internal endpoints
- Server Startup: Write
runtime.jsonwith port/token - Runtime: Commands and clients read
runtime.jsonto discover the active server - Server Shutdown: Remove
runtime.json