harnsy

Keys, logins and connections

Three different things sound alike: the login of each AI program, the Connections that let you keep several logins apart, and the Keys that let agents call outside services. Here is where each lives and what harnsy does with it.

Your AI program’s login. It lives in the program itself.

  • Claude Code: harnsy starts Claude Code’s own sign-in on this computer. You sign in on Anthropic’s page; the code you paste here goes straight to Claude Code on this computer. Claude Code keeps the login where it always does. harnsy does not read the login to use it and does not send it anywhere; it only asks Claude Code whether you are signed in.
  • Codex: Codex keeps the login in its own file on this computer. harnsy does not send it anywhere; it only checks that you are signed in.

What harnsy writes in those programs’ files. It is asked at install and backed up.

  • ~/.claude.json: it marks a project folder as trusted, only for folders you chose or created in harnsy, and sets “onboarding completed” after Claude says it is signed in. Before it changes this file, harnsy keeps a backup copy of it on this computer. The file is Claude Code’s own and may hold your Claude login, so the copy may too. The copies are in ~/.local/share/harnsy/backups/ (Windows: %LOCALAPPDATA%\harnsy\backups\; on Linux the folder follows XDG_DATA_HOME when it is set), named claude.json.<date-time>; the folder and each copy are readable by you only. harnsy keeps the last 2 copies of this file; a third replaces the oldest. Uninstalling does not delete the folder: delete it by hand if you want it gone.
  • ~/.claude/settings.json: the hooks, the status line and the “allow harnsy” entries.
  • Codex gets folder trust as command-line flags; no file is written.

What harnsy reads. Usage numbers: for Claude from its status line (harnsy saves each session’s limits and cost), for Codex from the session’s own log, for OpenCode from the session messages. harnsy also reads the account id in ~/.claude.json to tell logins apart. The e-mail is hidden by default (“Claude account 1”); only you, on this computer, can reveal it; by design, agents and the phone access do not get it.

Connections (harnsy Max). Several logins per AI program, so you can keep them apart (for example personal and work) and choose which one a project uses; each project has a default per program. Use each login under its provider’s own terms.

  • Claude: a token from claude setup-token (lasts about a year) or an Anthropic API key. Codex: ChatGPT sign-in by a device code (shown in the dashboard, typed on OpenAI’s page, valid 15 minutes) or an OpenAI API key. OpenCode: a provider key or your own server. Dictation works in both editions. A GitHub token for services.
  • Secrets are stored encrypted, with a key kept in a file of its own on this computer; the dashboard shows only the last 4 characters. A started agent gets the secret only in its own process environment. An agent that prints its environment puts the token into its transcript; harnsy does not scrub it.
  • Claude Code’s Remote Control needs the system login, not a token or an API key.

Usage (harnsy Max). The 5-hour and 7-day limits with a forecast, and spend per login, agent and team. Claude’s limits need harnsy’s status-line step from the installer.

Keys for agents (harnsy Max): Settings › Services for agents › Keys. A key has a name, the service’s host names (1 to 8), who may use it (projects and roles) and optional limits: read only, methods, path prefixes, requests per minute. An agent calls the service through harnsy at <agent port>/proxy/<key>/<path>. harnsy drops the agent’s own Authorization and cookies, adds the key and sends the request only to the key’s host. Every call is logged (method, host, path, status; no query, headers or body). The dashboard never shows the value again, only its last 4 characters. These limits are part of how harnsy is built; they are not a guarantee against bugs.

Since harnsy 0.1; Connections and Keys are harnsy Max.

See also the feature page: Connections

Anthropic, Claude Code, OpenAI, ChatGPT, Codex, OpenCode, Telegram, Discord, GitHub, Apple, macOS, iOS, iPhone, Safari, Google, Android, Chrome, Microsoft, Windows, Windows Security, Defender and QR Code are names of their owners’ products. harnsy is not affiliated with or endorsed by them. iOS is a trademark of Cisco used under licence by Apple; QR Code is a registered trademark of DENSO WAVE INCORPORATED. No logos.