Docs

Local data

Every file LinkCode keeps on your machine, what each one is for, and how to reset them for a clean slate.

Your host (the LinkCode daemon) keeps everything it owns under your home directory, in plain files you can inspect or delete yourself. Nothing here is synced anywhere unless you use a LinkCode Cloud feature that says so.

~/.linkcode/config.json

Optional — created the first time you save something that needs it. Holds:

  • Listener overrides (host/port), if you've changed them from the defaults.
  • Per-agent provider settings: whether an agent is enabled, its default model, and its API key (Claude Code, Codex, OpenCode, Pi each have their own entry).

Written with owner-only permissions (mode 0600) because it can hold API keys. The environment variables LINKCODE_PORT and LINKCODE_HOST, if set, override whatever is in this file.

~/.linkcode/daemon.db

A SQLite database — the thread and workspace registry. It tracks which threads exist, which workspace each belongs to, when they were created and last used, and — for agents that support it — a pointer into that agent's own history so LinkCode can resume or import it.

It does not store your conversation content. The actual transcript lives wherever each agent's own SDK/CLI keeps its history (for example, Claude Code and Codex maintain their own local history independently of LinkCode). Migrations run automatically the first time a new host version starts.

~/.linkcode/runtime.json

Written once the host finishes binding its listener. This is how a local client (the desktop app) finds a running host without you telling it a port: it reads this file for the host's process ID and URL, confirms that process is still alive, and confirms it actually answers as a LinkCode host before trusting it.

Removed automatically when the host shuts down cleanly. If the host is killed forcefully, a stale file can be left behind — the next start (or a client checking it) detects a dead process ID and ignores it.

~/LinkCode

The folder backing Chats — the built-in workspace for threads that aren't tied to a project you added yourself. It's a normal folder: open it from the Chats section in the app, or browse it directly.

Desktop settings

The desktop app keeps its own settings — theme, language, and a manual host-URL override — as settings.json under its OS-standard per-app data directory:

  • macOS: ~/Library/Application Support/LinkCode
  • Windows: %APPDATA%\LinkCode
  • Linux: ~/.config/LinkCode

Like config.json, it's written with owner-only permissions.

Ports

The host listens on port 19523 by default. If that port is taken by something else, it hunts upward — 19524, 19525, and so on, up to 19532 — before giving up. If the port is held by another LinkCode host, the new process refuses to start instead: only one host runs per machine. Clients don't need to guess which port won the hunt — they read it from runtime.json above. See Troubleshooting if you hit a port conflict.

Resetting LinkCode

For a clean slate:

Stop the host (close the terminal running it, or however you started it).

Delete ~/.linkcode/daemon.db and ~/.linkcode/runtime.json. This clears your thread and workspace list. Nothing about your actual conversations is lost — each agent keeps its own transcripts independently of LinkCode, so anything resumable there survives and can be re-imported.

Delete ~/.linkcode/config.json too if you also want to clear saved agent settings and API keys.

Leave ~/LinkCode alone unless you actually want to delete your Chats files — it's a normal folder, not internal state.

On this page