Agent hooks & memory

How Nethür uses agent hooks and project memory so Claude Code, Codex and other agents keep context across sessions.

Nethür plays nicely with the agent hook and memory conventions Claude Code and Codex already use — it reads them, respects them, and gives you a UI for the ones that make sense in an IDE context.

Per-repo hooks

Nethür reads each repo's .claude/ and .codex/ configuration. Hooks you already have will run when Nethür launches the agent in a worktree of that repo.

Worktree setup hooks

Configure commands to run automatically after a worktree is created — e.g. pnpm install, direnv allow, or a script that restores .env files. Set them under Settings → Repository → Hooks.

Memory files

Claude's CLAUDE.md and Codex's AGENTS.md (at repo root or nested) are left alone — they belong to the agent. Nethür surfaces them in the file explorer like any other file so you can edit them inline.

Agent status hooks

Settings → Agents → Agent status hooks controls the Nethür-managed hooks that report working / waiting / done into the UI. Turning the setting off removes those managed hooks and stops reinstalling them; turning it back on restores them without restarting Nethür (on Windows, the WSL hook relay follows the same live gate). CLI equivalents: nethur agent hooks status|on|off --json.

Surviving a restart

Hook endpoints are written to disk ({userData}/agent-hooks/endpoint.env on POSIX, endpoint.cmd on Windows) and re-sourced on every hook invocation, so long-lived agent sessions keep reaching the live Nethür server even after an app restart — no more dead-port POSTs from a PTY that outlived the previous session.