Haldwani Times
Haldwani Times
Technology

nexor-runner 0.8.1

nexor-runner 0.8.1
Photo / Illustration: Haldwani Times Editorial Desk

Skip to main content Switch to mobile version nexor-runner 0.8.1 Hosts and runs AI coding agents in tmux sessions

pip install nexor-runner==0.8.1 Copy PIP instructions

Hosts and runs AI coding agents (Claude Code, OpenCode) in tmux sessions on one Linux machine. It owns a dedicated tmux server, keeps a state file so sessions can be restored after a restart, starts every agent with a minimal environment, and exposes a small local HTTP API.

Python 3.11+, no runtime dependencies.

From PyPI, no repository access needed:

pipx install nexor-runner # or: pip install --user nexor-runner nexor-runner --version Install it, do not pipx run it: the systemd units point at the interpreter that runs install-service, and pipx run uses a temporary environment that is garbage-collected, which would leave the units pointing at a path that no longer exists.

Known limits: units are written under $XDG_CONFIG_HOME (or ~/.config), where systemd looks only if that is its user config directory; --no-agora does not remove an agora unit installed earlier (uninstall-service does).

Requirements: tmux (3.x; 3.2+ for the browser terminal), the agent CLIs you want to run (claude, codex, opencode), and systemd --user for the units (loginctl enable-linger $USER keeps them alive after logout). nexor-runner and runner are the same command; python -m nexor_runner works too.

Quick start on Linux (one command)

The owner first creates the runner in the hub (Settings -> Runners: a name and a one-time nxr_ token). The token is not the Agora connector's delegation token (nxad_): the hub refuses that one on every runner endpoint. Save it in a file with mode 0600, then:

nexor-runner install-service --hub https://hub.example.com --token-file ~/runner-token # or: printf '%s' "$TOKEN" | nexor-runner install-service --hub https://hub.example.com --token-stdin # or: NEXOR_RUNNER_HUB_TOKEN=... NEXOR_RUNNER_HUB=https://hub.example.com nexor-runner install-service nexor-runner doctor install-service writes the three systemd --user units (nexor-runner-tmux, nexor-runner-api, nexor-runner-agora) pointing at the interpreter the package is installed in, creates the config directory (0700) and the API token (0600), links the runner to the hub (validating the token), and enables and starts everything. The hub token is copied to ~/.config/nexor-runner/hub-token (0600) when it comes from stdin or the environment; it is never printed, logged, put on a command line or in a unit. Without --hub the agora unit is skipped (add it later by re-running with --hub); other flags: --no-agora, --no-api (both remembered in service.json, so an update keeps those units out; --agora / --api or an explicit --hub bring them back), --port, --extra-path, --cards-dir, --host, --host-id, --no-auto-update, --no-cards-sync, --dry-run (print the units, change nothing). The directories of the claude, codex and opencode binaries your login shell finds (nvm included) are added to the units. It also writes and enables nexor-runner-update.timer (see Automatic updates below).

One machine, several people. Each user has their own runner and their own API on 127.0.0.1, so the API port cannot be the same for everybody. A new install without --port takes a port derived from the user id in 7800-7999 (uid 1000 gets 7800, uid 1003 7803, ...) and, when that one is taken, the first free port after it; it prints which one it picked and keeps it in service.json. An existing install never changes its port on its own (an update re-runs install-service with no flags); to move it, nexor-runner install-service --port . doctor checks that the process answering GET /health on the port is this user's runner (it asks GET /whoami with the user's own API token, and sends the token only to a process it knows is this user's: another owner fails, an owner it cannot determine is a warning) and, if it is not, fails with the install-service --port to run. The runner name (nexor-runner link, the Runners page of the hub) follows the team convention -, for example srv-gc and srv-ec on the host srv: the first part is the runner's host id (see Handles). install-service --host-id saves it explicitly.

Automatic updates. A runner installed with install-service updates itself: a systemd --user timer (nexor-runner-update.timer) runs nexor-runner self-update about ten minutes after boot and then daily, with a random delay of up to 30 minutes so two runners do not update at the same moment (Persistent=true: a run missed while the machine was off happens at the next start). Nothing to do, nothing to remember.

nexor-runner self-update --check # is there a newer release? (changes nothing) nexor-runner self-update --dry-run # what an update would do nexor-runner self-update # update now (what the timer runs); --json for scripts nexor-runner install-service --no-auto-update # opt out: removes the timer, remembered nexor-runner install-service --auto-update # opt back in Cards clone. If your agent cards live in a git repository cloned on this machine and used as the cards directory (cards-dir in config.json, else ~/.config/nexor-runner/cards), self-update keeps that clone fresh too: after the package step, also when the package is already up to date and also when that step failed, it runs git pull --ff-only there, with GIT_TERMINAL_PROMPT=0 (and ssh in batch mode, unless you set GIT_SSH_COMMAND) and a 60 second limit, so a credential question can never hang a run. It does nothing, silently, when there is no such directory, it is not inside a git work tree or its branch has no upstream. It never merges, rebases or forces: a clone with uncommitted changes to tracked files is skipped (one log line), a diverged clone fails the fast-forward and stays as it is (untracked files, such as a card you are drafting, do not stop it; git itself refuses to overwrite one). A cards failure, with or without network, never fails the update and never triggers the rollback. Each run adds one line, cards-synced, cards-current, cards-skipped or cards-failed, to update.log. Turn it off with nexor-runner self-update --no-cards-sync, with nexor-runner install-service --no-cards-sync (remembered in service.json, so the timer honours it; --cards-sync turns it back on) or with NEXOR_RUNNER_CARDS_SYNC=0. --check never touches the cards and --dry-run only looks (would: git -C

pull --ff-only).

The cards that changed go to the hub. When the pull brought new commits and the runner is linked to a hub, the runner sends each *.md card of the cards directory that changed in those commits. It uses its own token (PUT /api/v1/runner-hosts/{name}/charters/{handle}). The hub only updates an agent that already exists and belongs to the runner's owner, and only from the owner's charter_source (Settings, owner/repo:path/). A new agent is still created once, by hand, with nexor-agora charters push.

Some cards never leave the machine:

a personal card (scope p: by the handle letter, the frontmatter scope: or the charter's scope.kind);

a card of a hosted person of the registry. If there is no registry, or it cannot be read, the runner sends nothing;

a dormant card (status: dormiente), a README.md, a card the runner cannot read (not UTF-8, no JSON block), anything that is not a regular file in the commit (a symlink is never followed).

What is sent is the card as it is in the pulled commit, never the file on disk.

The run adds one line to update.log: cards-push-pushed, cards-push-failed (a refusal or the hub unreachable, with the reason), or cards-push-off (the hub has no charter source for you). All the hub calls of a run share a 120 second budget. The push stops at the first unreachable call. It never fails the update. Turn it off and keep the pull with NEXOR_RUNNER_CARDS_PUSH=0.

Changes made in Agora are written into the cards. When the owner changes an agent's projects on the hub's map, the hub keeps the change until the runner writes it. The linked runner asks every minute (GET /api/v1/runner-hosts/{name}/card-edits) and, for each change, in its cards clone:

checks that the clone is the repo the card was pushed from and the file is the same path, that the card is a tracked file with no local changes, and that it may leave the machine (the same rule as the push above);

runs git pull --ff-only, then rewrites project: in the frontmatter (one name alone, several as [First, Second], the line removed when the list is empty). The rest of the file, line endings included, is left as it is;

commits only that file (card: projects -> ... (from Agora)) and pushes. If the remote moved meanwhile, it merges (git pull --no-rebase) and pushes once more; a merge that conflicts is aborted. It never rebases and never forces. A commit an earlier try could not push is pushed first;

pushes the card to the hub, which closes the change, and reports applied with the commit.

If a step fails, the runner reports failed with the reason, and the owner sees it on the map. The clone is left as it was: the file is restored if the commit fails. A commit that could not be pushed stays in the clone, and the report says so. NEXOR_RUNNER_CARDS_PUSH=0 also turns this off. A hub without the endpoint is asked again only once an hour.

What an update does: takes a lock for the whole run (two runs never overlap), reads the newest release from PyPI (pre-releases and yanked ones are ignored; stdlib only, no new dependency); if it is newer than the installed one, pip install --upgrade nexor-runner== with the interpreter the runner runs in (a venv and pipx alike), runs install-service with no flags (the link, port and extra path are kept; it restarts the API and agora units) and then doctor, both from the new code. The version is read again once the lock is held (a run that waited never repeats or undoes another run's update), and a doctor taken before the update is the baseline: if it gives no usable answer the update is postponed. A check that passed before the update and fails after it (the API gets about 30 seconds to come back) puts the previous version back and exits 1. A pip failure, for instance PyPI listing a release whose files are not served yet, changes nothing and exits 1; the timer tries again the next day. Because a pip that is killed halfway (its 10 minute limit) may have written part of the package, the installed version is checked after every pip failure and the previous one is put back whenever it is not what was installed before (if even that fails, the JSON says what is installed, or unknown). A lock that cannot be taken (for example a filesystem without flock) is a failure, not a skipped run. It never restarts or stops nexor-runner-tmux and never touches the tmux server: the sessions go on. An install that is not from PyPI (a clone with pip install -e, a local path, a URL) or a development version is left alone. One line per run goes to ~/.local/state/nexor-runner/update.log (kept to the last 100 lines past 64 KiB), and doctor warns when the timer is absent or the last run failed (the cards line does not count as that). The hub sees the new version at its next heartbeat: nothing about the hub protocol changes. To set the timer's schedule by hand, edit ~/.config/systemd/user/nexor-runner-update.timer; the next install-service run puts the default back. NEXOR_RUNNER_PYPI_URL points the version lookup at another JSON index (https, or http on loopback); it never changes where pip downloads from.

Upgrading by hand (also when auto-update is off): pipx upgrade nexor-runner && nexor-runner install-service (no flags: the link, the port and the extra path you installed with are kept in ~/.config/nexor-runner/service.json; an explicit --port / --extra-path overrides and becomes the new value; an install that never wrote service.json keeps the --port of its API unit). Or just nexor-runner self-update, which does this with the checks and the rollback. It is idempotent and restarts the API and agora units, which are stateless. It never restarts or stops nexor-runner-tmux: that unit hosts your running sessions. If its unit file changed, the new one applies the next time you restart it yourself, between sessions.

nexor-runner doctor [--json] checks tmux, the agent CLIs, linger, the three units, the update timer, the last update run, GET /health (and that it is this user's runner that answers), the host id (a warning with nexor-runner config set host-id when it is unset or not one of the registry's hosts) and the hub link (exit 1 when something fails, a missing individual agent CLI or update timer is only a warning). nexor-runner uninstall-service removes the API and agora units (and the update timer) and leaves tmux running; --include-tmux removes that one too (ending every session). By default config, tokens and the hub link are kept. --unlink also forgets the hub link (agora.json; the token file you provided is never touched). --purge-config also deletes config.json, the API token, the copied hub-token and agora.json (it implies --unlink), then the config directory if it is empty; the cards directory and the session state are never touched, and tmux.conf goes only together with --include-tmux.

Plain-http hub (trusted network only). The hub URL must be https:// (http only for loopback). If your hub is plain http on a trusted network such as the VPN, opt in explicitly: --allow-insecure-hub on link and install-service, or NEXOR_RUNNER_ALLOW_INSECURE_HUB=1. Each use prints WARNING: plain http: token and traffic are not encrypted; use only on a trusted network such as the VPN (on stderr; the token is never printed). The choice is stored as "insecure": true in agora.json, so the agora unit and doctor keep working and later install-service runs need no flag. runner link is safe to re-run: it validates the token and rewrites agora.json with the same content, touching nothing else.

macOS and Windows: there is no service installer (systemd is Linux only) and install-service exits 3 after printing this. Run the pieces in the foreground, each in its own terminal: nexor-runner serve --init-token, nexor-runner link --hub https:// --token-file , nexor-runner agora. tmux is required, so on Windows the runner does not work.

Install from a clone (development)

git clone https://github.com/nexorhq/nexor-runner.git ~/dev/nexor-runner cd ~/dev/nexor-runner python3 -m venv .venv .venv/bin/pip install -e ".[dev]" Manual setup of the units

The three sections below are what install-service does, one unit at a time (useful to tune a unit by hand).

1. The tmux server unit

runner systemd install --dry-run # print the unit and tmux.conf runner systemd install # write them systemctl --user daemon-reload systemctl --user enable --now nexor-runner-tmux.service The unit runs tmux -L nexor-runner -f -D with an explicit minimal environment. Sessions live in this server (socket nexor-runner), separate from your default tmux server.

2. The API unit (optional)

runner serve --init-token # creates ~/.config/nexor-runner/token (0600); stop it with Ctrl-C runner systemd install --api --extra-path "$HOME/.nvm/versions/node//bin" --dry-run runner systemd install --api --extra-path "$HOME/.nvm/versions/node//bin" systemctl --user daemon-reload systemctl --user enable --now nexor-runner-api.service curl http://127.0.0.1:7800/health --init-token creates the token file if it does not exist (random, mode 0600). The API unit requires the tmux unit. Options: --port (default 7800; on a machine several people share use install-service, which picks a port per user), --token-file, --runner-bin, --tmux-bin.

3. The agora link (optional)

Connect the runner to an agora hub: the hub records intents (launch, kill, restore, remote-control, stop-scope), the runner connects outbound (no inbound port), reports its sessions and cards, executes the intents and reports the result. The hub never executes anything.

runner link --hub https://hub.example.com --token-file ~/.config/nexor-runner/hub-token runner systemd install --agora --dry-run runner systemd install --agora systemctl --user daemon-reload systemctl --user enable --now nexor-runner-agora.service The owner creates the runner (name plus a one-time nxr_ token) in the hub's Settings -> Runners and saves the token in a file with mode 0600. runner link validates it with GET /self and writes ~/.config/nexor-runner/agora.json (0600: hub URL, token-file path, runner name); the token is never on the command line and never logged. The hub URL must be https (http only for loopback). runner unlink removes the link. The unit requires the tmux unit; runner agora runs the same loop in the foreground.

The loop: heartbeat every ~30 s; the full snapshot (sessions and cards) on start and whenever it changes, at most every 10 s; long-poll for intents, claim (a 409 is skipped), execute through the same code as the local API, report done or failed with a short message (the dead-pane tail on a failed start). Hub errors back off from 1 s to 60 s and never stop the loop.

Chat and terminal channel

Next to the intent loop, runner agora keeps ONE more outbound connection to the hub: a WebSocket (wss:///api/v1/runner-hosts//channel, same nxr_ bearer token, sent in the upgrade request). The hub cannot reach this machine (it may run in a container, or the runner on a laptop), so the browser's streams are multiplexed over this connection. The runner still opens no port. It reconnects with a 1 s to 60 s backoff and never stops the intent loop; an older hub without the endpoint answers 404 and the runner retries every two minutes. NEXOR_RUNNER_CHANNEL=0 turns the channel off.

Two kinds of stream, each opened by the hub for one browser pane:

chat (OpenCode sessions only): the message history (paged), live events (text and reasoning deltas, tool calls, status, approval prompts), send a prompt, interrupt, answer a permission. The adapter (oc_chat.py) is a whitelist, not a proxy: it can only call GET /api/session/{id}/message, GET /api/event, GET /api/session/active, GET|POST /api/session/{id}/permission[/{request}/reply], POST /api/session/{id}/prompt, POST /api/session/{id}/interrupt and two read-only lookups, GET /api/session (find the engine session titled with a handle) and GET /api/session/{id}/message/{message} (the finished copy of one message), on engine session ids it validated (ses_...). Engine calls go straight to loopback: no proxy from the environment and no redirects, so the Basic credentials cannot be sent elsewhere. The engine's filesystem and shell endpoints are unreachable from a browser. The engine session of a runner session is the session_id the runner stored (see "Stable Agora handles for OpenCode sessions"), else the newest engine session titled with the handle; with neither, the session is terminal-only. The engine is only ever contacted on loopback, with the password from its own service.json, never logged.

terminal (ANY runner tmux session, so Claude and Codex sessions too). Off by default: turn it on for this runner with NEXOR_RUNNER_TERMINAL=1 or runner config set terminal on (independent of chat; while it is off the terminal capability is not advertised and an open is refused with terminal_disabled). A browser terminal is a SHELL-LEVEL capability on this machine (whatever the agent's program can do, the owner's browser can type), so it is the owner's explicit choice, and the hub audits every one that is opened. The viewer is tmux -L nexor-runner attach-session -r -t = in a PTY: a read-only tmux client, so it can only show the screen. Keystrokes from the browser are NOT typed into that client; they are delivered with tmux send-keys -t =: -H (validated, at most 64 KiB per frame, 4096 bytes per command), which writes the bytes to the program in the pane and never touches tmux's key table. Consequently prefix+c (new window, i.e. a shell), prefix+: (command prompt), kill-server, switch-client and mouse bindings are out of reach from the browser: they arrive in the pane as plain text. Requires tmux 3.2 or newer. Before send-keys, the runner drops what the browser's xterm.js answers to tmux's attach-time questions (device attributes, XTVERSION, colour and mode reports, DECXCPR) and the mouse and focus reports; everything else is typing and is delivered untouched, Shift/Alt/Ctrl+F3 (ESC [ 1 ; R) included. Keyboard modes follow tmux, not the pane: measured on tmux 3.4, an attach client switches the outer terminal to application cursor keys, application keypad and bracketed paste whatever the pane asked for, so arrows arrive as ESC O A and a paste is wrapped in ESC [ 200~ ... ESC [ 201~ (Claude Code reads both arrow forms and consumes the paste markers). Swallowing those modes in the browser would unwrap pastes for agents that asked for bracketed paste, so it is not done.

Capabilities per session, announced to the hub in a sessions frame (every 10 s when changed): {read, send, approve, interrupt, terminal_only, terminal}. OpenCode sessions with an engine session get chat (terminal_only: false) and a terminal; everything else is terminal_only.

The browser terminal does not resize the real session, unless a viewer asks for Fit pane (see below). Measured on tmux 3.4: ignore-size alone is not enough, because when the browser is the only client tmux still sizes the window to it and keeps that size afterwards. So while a browser watches a session the runner pins every window of it to its current size (resize-window -x W -y H, which makes tmux treat the size as manual, plus a @nxr_pin window marker that remembers the previous window-size). The PTY is opened at the window's size; a plain browser resize {cols, rows} only changes the PTY (the part of the window the client shows). When the last stream of the session closes, the previous setting is restored; a runner that died while pinned undoes the pins at its next start. While a browser is attached, a human who attaches with a real terminal sees the pinned size. A window created while a browser watches (the agent or a human runs new-window) is sized by tmux to the browser at first: the runner checks the windows of watched sessions every ~2 s and puts a new one back to the size the session's windows had. The pin is held until the attach client of a stream has started, even if the stream is closed in that moment. Closing a stream hangs up the PTY (the tmux client detaches); the session itself is never killed.

resize-window -t -x C -y R, with C x R clamped to 40..300 x 10..100. Only the session's ACTIVE window, only while a browser stream holds the pin. No server-wide option (window-size, aggressive-resize, ...) is ever changed, no other session is touched.

Before the first fit the window's size is saved (memory + window option @nxr_orig = WxH) and restored with resize-window -x W -y H (the saved dimensions, not resize-window -A: -A recomputes the size from the attached clients under the window-size policy, which with read-only clients is the unpredictable size the pin exists to prevent). It is restored when the last fitting viewer of the session closes, disconnects, or sends resize ... window: false (back to Scale), when the hub link drops, and at runner stop (close_all); a runner that died is cleaned by the start-up sweep (reads @nxr_orig). Several viewers: the last resize wins; when one leaves the window follows the most recent one still fitting.

If the session has a client that is not read-only (list-clients -F '#{client_readonly}', i.e. someone attached with a real terminal) the window is NOT resized (the viewer still fits its own PTY), so a human's view is never shrunk. A human attaching AFTER the fit sees the fitted size.

The agent inside the session gets SIGWINCH and redraws, which is expected. The idle gate (pane_free, read_input_line, ghost-suggestion) does not assume a width (edges are 3+ rule characters, the prompt is found by shape); a test covers 45, 200 and 300 columns. Not measured against a real tmux in CI: the restore after a SIGKILL of the runner, and resize-window behaviour on tmux versions other than the tested 3.4.

After a reconnect the hub may reuse a stream id while a slow open of the old connection is still running: a stream only ever removes the chat subscription it registered itself, and one that was closed registers none.

Limits: at most 32 open streams per runner, 1 MiB per WebSocket message, 64 KiB per terminal input frame, 32,000 characters per chat prompt, snapshot frames trimmed to about 600 KB. The protocol is specified in the hub's docs/chat.md.

Claude: every session the runner starts or restores runs claude --remote-control (a --resumed one too): Remote Control is on from the first seconds, named like the session, with no keystroke at all. Measured on Claude Code 2.1.305 in tmux: about two seconds after start the screen shows /remote-control is active · Continue here, on your phone, or at with the https://claude.ai/code/session_... URL under it, and the footer ends with /rc. The runner only looks for that URL on the screen (rc_status ok, URL in remote_url). The flag is always given the handle as its value: a bare --remote-control would take the next argument, the prompt, for a name. The row records how the run was started (rc_native). On by default; NEXOR_RUNNER_REMOTE_CONTROL=0 disables it, and remote_control: true|false in the POST /sessions / POST /restore body overrides it per call (runner new --no-remote-control for the CLI). runner new itself never waits: it marks the row pending, and the agora unit or runner serve picks the URL up. Exactly one live process owns that watch: both compete for a leadership flock on /locks/rc-owner.lock, the holder ticks every second while a session is pending (every ~5 s otherwise) and the other stands by. A pending row is given up when the session is gone, 30 minutes after arming with no sign of Remote Control (re-armed while the session is alive, then tried every 30 s), or 24 h after arming. The outcome is stored on the session row as rc_status and reported in every session of the agora snapshot and in GET /sessions, next to rc_attention:

What the watch reads. Only the visible screen (capture-pane, no scrollback), and it sends no key at all (no Escape either). The URL is read only from the line(s) right under the newest /remote-control is active banner and must be https://claude.ai/code/session_: the hyperlink target of the line (OSC 8) is preferred, else the text, joined with the next line when it reaches the right edge (a wrapped URL). A URL quoted in the transcript, an older banner, or the URL of the run before the last restore (kept aside in the row as rc_prev_url before the launch, remote_url cleared) is not taken from a leftover banner; but a resumed session re-uses its URL, so the same URL is accepted once the footer shows the live /rc (the proof that this run is connected). /rc counts as the footer only under the input box's bottom edge. A session that shows no URL two minutes after it was armed gets rc_attention (Remote Control may not be connecting: check the session and the account's policy); the note goes away with the URL. runner restore arms this watch like POST /restore does.

After a reboot. A session restored before the network is up starts Remote Control offline: the footer says /rc failed and no URL ever comes. runner restore therefore waits up to 5 minutes (--wait-network SECONDS, NEXOR_RUNNER_NET_WAIT, 0 = do not wait) until claude.ai:443 resolves and accepts a connection (a bare probe: no credentials, no payload), logs what it waited for, then restores (also when the time ran out). As a second line of defence the leader process runs a watchdog over the rows in pending/sent with no URL: 3 minutes after arming (NEXOR_RUNNER_RC_REARM_AFTER, seconds) a row whose footer ends with /rc failed is re-armed by typing /remote-control, only if the same snapshot shows an empty input box (a faint suggestion is not text), no dialog (folder trust, Remote Control modal, numbered options) and no esc to interrupt, and the screen stayed unchanged for 10 s (NEXOR_RUNNER_RC_REARM_IDLE); the typing is the read-back-then-Enter one below, under the session's typing lock. A draft in the box, a busy session or a dialog means nothing is typed and no attempt is used. Three attempts at +3, +10 and +30 minutes; if the footer still says /rc failed 3 minutes after the last one the row is gave_up and rc_attention says Remote Control failed to connect and re-arming did not help: open the session and run /remote-control, or restart it. It works for rows started with the flag; for the others (imported, not started by the runner) only with rc-typing on, like any typed /remote-control.

Restore at boot. install-service also writes and enables (never starts) nexor-runner-restore.service, a oneshot that runs runner restore when the user manager starts, so with linger (loginctl enable-linger $USER) every agent session comes back after a reboot with no human action. It is ordered after nexor-runner-tmux.service (and the API/agora units when installed), waits up to 30 s for the tmux socket, and gives the restore itself up to 15 minutes (the network wait above is part of that). It is not started by install-service, so neither an install nor the daily self-update relaunches sessions during the day. Existing hosts get it from the next self-update (which re-runs install-service), within a day. Opt out with install-service --no-restore-on-boot (remembered; --restore-on-boot turns it back on, and uninstall-service removes it); doctor reports it as restore-on-boot. Personal-scope sessions stay skipped, as with a manual restore: set NEXOR_RUNNER_RESTORE_PERSONAL=1 in the unit (a drop-in: systemctl --user edit nexor-runner-restore.service) to bring them back too.

Folder-trust dialog. A session started in a folder Claude has not been trusted in stops at Quick safety check: Is this a project you created or one you trust?. Measured on Claude Code 2.1.305: the options are ❯ No, exit and Yes, I trust this folder, No, exit is pre-selected (an Enter exits the session), Down/Up toggle the two and number keys do nothing. The runner never sends a key to it: it only recognises it, by its structure on the visible screen (no input box on the screen, the footer Enter to confirm · Esc to cancel as the last non-empty line, a contiguous block of Yes/No options right above it, the question under a column-0 rule above them), so a quoted dialog in the transcript or a draft saying "yes, i trust this folder" is not one. The row stays pending and rc_attention (in GET /sessions and the agora snapshot) says folder trust needed — open the session and accept; once a person answers, Remote Control (already asked for by the flag) comes up by itself and the note goes away. The typed fallback stops at the dialog too (nothing typed).

Typed fallback (off by default). For a session the runner did not start itself (one imported from a foreign tmux and still running, or a row armed by an older runner) there is no flag to give. NEXOR_RUNNER_RC_TYPING=1 or runner config set rc-typing on (an empty variable defers to the config file) lets the runner type /remote-control into such a session once its input box is idle, as before. Without it such a row is not armed and not watched: the next retry gives it up (gave_up) with rc_attention not started with Remote Control: restart it with Remote Control (runner restore) or enable rc-typing (runner restore relaunches it with the flag). It is the old, careful path: the input box may hold a prompt suggestion or text somebody typed, so the runner never presses Enter blindly: it clears the input line (C-u), types /remote-control, reads the input line back from the pane, and sends Enter only if the line is exactly /remote-control. Any other line is cleared again, nothing is submitted, the attempt is retried later (not before 5 s, kept on the row) and a line without the text itself goes to the log; after 20 wrong lines it gives up at the deadline. A session that is working (its footer says it can be interrupted) is not typed into, and a typing lock (flock on /locks/.lock) keeps two processes from interleaving keystrokes. The read-back uses capture-pane -e of the visible screen only (no scrollback): a trailing faint (SGR 2) prompt suggestion, a reverse-video trailing space (the cursor) and the NBSP Claude Code draws after ❯ are ignored; text on continuation lines of a multi-line draft counts as text (only plain spaces are blank, and a | or │ is text), and a pane showing a numbered-option dialog is never typed into. The box is located from what only the program draws, in column 0 (everything a user types, continuation and wrapped lines included, is indented by two spaces; measured on Claude Code 2.1.305): the bottom border is the last line starting with a run of ─ (a hint in it is fine), the box's top edge is the nearest such line above it with a ❯ line right below (a title with the session name is fine), and a bordered │ ❯ ... │ box needs both side borders. A draft that imitates a border or a ❯ /remote-control line is therefore read as a draft, never as the bare command, and neither a stale frame higher up nor the suggestion list drawn under the box confuses it.

OpenCode: sessions connect to the machine's always-on opencode service engine (the runner ensures it is up before launch and before issuing a ticket). There is no automatic step: GET /sessions/{ref}/remote-control (or a remote-control intent from the linked agora hub) issues a fresh pairing ticket with opencode pair --remote --yes — a one-time link, valid five minutes, through the OpenTunnel public address. Opening it shows the engine's web UI, where the session can be prompted and its permission requests answered, like the terminal does. The ticket is returned to the caller and stored as the session's remote_url (the last one issued); it is never logged. The engine is per-user and the ticket reaches every session on it, so keep the runner user's account the only one running agents on the machine.

Remote access security

OpenCode remote control goes through the engine's public tunnel (OpenTunnel), which stays on whenever the engine runs. What protects it:

The engine has one fixed password (service.json, key password). It also works over the public address (Basic opencode:), so treat it like a root credential.

A pairing ticket (opencode pair --remote --yes, what Remote Control issues) is one-time and valid 5 minutes. Opening it hands the device a token valid for 30 days. Tokens are signed and stateless: OpenCode has no per-device revocation. The only way to invalidate them is to change the engine password.

The runner therefore rotates the password. runner opencode rotate-password (or POST /opencode/rotate-password, {"rotated": true}) sets a new random 43-character secret with the official opencode service set password , then starts the engine again. If that CLI key is missing or does not persist the value, it falls back to rewriting password in service.json (atomic, mode 0600, other keys kept) while the engine is stopped. The secret is never printed or logged. Before anything is touched, service.json is copied to service.json.bak- (mode 0600, the newest three are kept); a numeric suffix (-001, -002, ...) keeps rotations of the same second apart.

Weekly rotation: runner systemd install --rotate [--extra-path DIRS], then systemctl --user daemon-reload && systemctl --user enable --now nexor-runner-rotate.timer (OnCalendar=weekly, Persistent=true). It is opt-in; turn it off with systemctl --user disable --now nexor-runner-rotate.timer. Every rotation invalidates all paired devices: open Remote again to pair them.

Lost or stolen phone: run runner opencode rotate-password now; do not wait for the timer.

Never send a ticket through chat apps or any shared channel: whoever opens it first gets a 30-day token.

The engine daemonizes inside the cgroup of whoever starts it, so a unit that starts it would kill it when that unit stops. The runner starts the engine (rotation and ensure_running, also from the API unit) through systemd-run --user --scope when it runs inside a unit, so restarting nexor-runner-api or the end of the rotate oneshot does not take the engine down; the rotate unit also sets KillMode=process as a second guard.

Effect on running sessions: the password change stops and restarts the engine process. Sessions started with --standalone run their own server and are not touched. Sessions the runner launched attach to the engine (opencode --session ); expect them to lose their connection while the engine is down, and run runner restore for any that do not come back (the state file keeps the session id, so the conversation resumes). Long-running work in the engine itself is interrupted by the restart, so rotate between tasks when possible.

Stable Agora handles for OpenCode sessions

The Agora connector gives every OpenCode session its own identity, taken from the session id on each tool call. So that a runner-launched session acts under its stable handle (gc-oc-agora, not a per-session one), the runner keeps a map {"ses_...": ""} in ~/.config/nexor-agora/opencode-sessions.json (override: NEXOR_AGORA_OC_HANDLES), which the connector re-reads whenever it changes.

Where the session id comes from. The runner chooses it: oc sessions are launched as opencode --session ses_ and the id is kept in the state file, so the entry is written right after the tmux session is created, before the first prompt is handled. restore and POST /restore rewrite it; kill removes it. When a launch replaces a stale row (its tmux session had disappeared), the entry is written again in the same state-lock hold that commits the new row: a reconcile during the startup settle still sees the old row and would otherwise leave the old id mapped until the next one.

Ids not known yet (rows from runner import, older state files): the agora loop reconciles every 30 s (and runner opencode map --sync on demand). It lists the engine's sessions (GET /api/session, password from service.json), picks the newest one titled with the handle (the runner titles its sessions that way) that no other row owns, stores the id in the state file and maps it. An unreachable engine only leaves those rows unmapped.

Rules. One handle maps to at most one session id (the newest wins and the old entry is dropped); entries for handles the runner does not know are kept; the file is written atomically (temp file plus os.replace, mode 0600, directory 0700) under a lock shared by the API unit, the agora unit and the CLI. A file that cannot be read is never overwritten; one that is not a JSON object is kept as .invalid and rebuilt. Map errors are logged and never fail a launch.

runner opencode map [--sync] [--json] # print the map (session ids and handles, no secrets) CLIs installed with nvm

The session environment is an allow-list, so nvm directories are not on PATH. The runner resolves each client binary to an absolute path at launch, in this order:

NEXOR_RUNNER_CLAUDE_BIN / NEXOR_RUNNER_OPENCODE_BIN (absolute path);

NEXOR_RUNNER_EXTRA_PATH (colon-separated directories, e.g. ~/.nvm/versions/node//bin; runner systemd install --api --extra-path writes it into the API unit);

the login shell (bash -lc 'command -v claude', once, cached).

The binary's directory is prepended to the session PATH so npm-installed CLIs find node. --dry-run on runner systemd install prints the detected paths.

One file, ~/.config/nexor-runner/config.json, holds the settings every entry point shares, so the CLI in a shell, runner serve and the agora unit cannot disagree (the unit needs no environment variable for them):

runner config set cards-dir /srv/agent-cards # where the agent cards live runner config set host my-box # the name cards' home.host is compared with runner config set host-id srv # the 3-letter id the handle grammar checks (or: install-service --host-id) runner config show [--json] # effective values and where each comes from runner config unset cards-dir runner systemd install --agora --cards-dir /srv/agent-cards # writes the same file Precedence, highest first: the flag (--cards-dir), the environment variable (NEXOR_RUNNER_CARDS_DIR, NEXOR_RUNNER_HOST, NEXOR_RUNNER_HOST_ID), config.json, then the default (cards in ~/.config/nexor-runner/cards; host from the agora link name, else the system hostname; the host id as described under Handles). When the cards directory does not exist, runner new / runner cards say so and print how to set it.

Other variables: NEXOR_RUNNER_RESTORE_PERSONAL (restore personal sessions too), NEXOR_RUNNER_REMOTE_CONTROL, NEXOR_RUNNER_HANDLE_PREFIX, NEXOR_RUNNER_CARDS_DIR (cards directory), NEXOR_RUNNER_HOST (see Cards), NEXOR_RUNNER_HOST_ID (see Handles), NEXOR_RUNNER_TOKEN / NEXOR_RUNNER_TOKEN_FILE, NEXOR_RUNNER_CLAUDE_SESSIONS (where runner import looks for Claude session files).

Handles and renaming

One name everywhere: handle = tmux session name (cc-) = claude --name = Remote Control name = Claude session title. The grammar (src/nexor_runner/handles.py):

----[--] gc-w-cld-srv-agora gc-p-cld-srv-home--artifact initials exactly 2 lowercase letters (the person); scope p (personal) or w (work); client cld (Claude Code), cdx (Codex) or opc (OpenCode); host exactly 3 lowercase letters (a hardware id); description and filone 1-20 chars of [a-z0-9] with single inner dashes; at most 64 chars in all. state_key is --. dev- free sessions are exempt, and the older -- handles keep working (card lookup, filoni count, restore) while you migrate.

The values come from the owner's registry, registry.yaml, in the cards directory or its parent (or the file NEXOR_RUNNER_REGISTRY names):

version: 1 people: - {initials: gc, agora_handle: owner} # the owner (an Agora account) - {initials: tc, name: Tess} # a hosted person (no Agora account) hosts: srv: "the build server" lap: "laptop" This is the file nexor-agora cards init writes and the hub validates: people is a non-empty list (at most 20) of {initials, agora_handle} or {initials, name} with distinct 2-letter initials; the runner reads the same shape, inline {...} entries and hosts: {srv: "..."} included, and accepts a handle whose initials are any listed person's. The older single person: block (initials, agora_handle) is still read (as a one-person list); having both person: and people: is an error.

NEXOR_RUNNER_HANDLE_GRAMMAR=off|warn|enforce (default warn) decides what a launch does (runner new, POST /sessions, the agora launch intent, restore):

warn: a handle that breaks the grammar or the registry is logged ([handles] warning: ...) and started anyway.

enforce: it is refused (400; restore leaves the row in the state file and skips it). The runner's own host id must be a 3-letter id listed in the registry hosts, and the handle's host segment must equal it: a card whose handle says lap is refused on the srv runner. The host id is, in order: NEXOR_RUNNER_HOST_ID; host-id in config.json (runner config set host-id srv, or install-service --host-id srv); the host part of the runner name when it is - (^[a-z]{3}-[a-z]{2}$, so srv-ec is on srv; ec-srv is not); the registry's host when it lists exactly one; and, for an install that predates the id, the host name below when that is itself a 3-letter id. Otherwise there is none (runner config show says where the value came from, doctor warns). It is separate from the host name that a card's home.host is compared with, so a machine called my-box can have the id srv. The initials must be the registry person's, and the card's scope: must agree with the handle's scope letter (in warn and enforce, GET /cards flags a disagreeing card with handle_problems). A registry that cannot be read (not UTF-8, a duplicate top-level key, a wrong shape) never stops a restore or a launch in warn and off: it is logged and the launch goes on; in enforce it refuses.

runner rename [--dry-run] [--force] (POST /sessions/{ref}/rename {new_handle, force?, dry_run?}) gives a running session a new handle, same conversation:

checks: is the session's handle or tmux name, exactly (a fragment matches nothing); the new handle is valid for the mode, the initials, the scope and the client do not change, a base session does not become a filone (--) or the other way round, the name is not used by a state row, a live tmux session or a foreign tmux server, the row has a session id, and the runner's tmux answers cleanly (an error is a 503, never "no sessions"); the session must be idle and free: the activity (the transcript) says idle, AND one styled snapshot of its pane shows nothing still running. The transcript alone is not enough, because background work writes no turn: a pane that shows esc to interrupt, a footer under the input box with a count and a kind (1 shell, 2 background tasks, 1 local agent, 1 monitor, in the background, ↓ to manage), a numbered approval menu (❯ 1. Yes) or text in the input box is refused with 409 and the reason; so is a pane that cannot be read or shows no input box (fail closed). --force renames anyway, with a warning, and cuts whatever runs short;

stops the tmux session with tmux kill-session only: the state row is not deleted;

updates the row under the state lock (and only if the old session has not been started again meanwhile, e.g. by a restore): handle, name cc-; session_id, cwd, model, scope kept; the Remote Control fields reset and the old URL set aside in rc_prev_url, as a restore does (a resumed session may re-show the previous run's banner: without the live /rc footer it is never taken for the new run); rename_from= until the session runs again. An error here, after step 2, says the old session was stopped and to run runner restore;

resumes it: claude --resume --name --remote-control with NEXOR_AGORA_HANDLE= (OpenCode: opencode --session , then the engine title and the handle map are updated), then waits for the Remote Control URL like restore does (the CLI only arms the watch). The transcript title follows because --name on --resume appends a new custom-title record (measured on Claude Code 2.1.252); the runner reads it back and warns if it is not there;

syncs the server-side title: a resumed session re-uses the same Remote Control session on claude.ai, so the title shown by the desktop app and claude.ai/code would stay the old handle. The API types /rename into the new session, ONLY through the safe typing gate: under the per-session typing lock, when one styled snapshot of the pane shows the session idle with nothing running and an empty input box (pane_free), with the command read back from the pane before Enter, a few bounded retries (the resumed TUI needs a moment). If the gate never opens the rename still succeeds and answers title_sync: "pending" with a warning; nothing is ever typed blindly. The CLI does not wait: it answers pending, run runner retitle later.

runner retitle [--dry-run] (POST /sessions/{ref}/retitle, ref a handle, tmux name or all; body {dry_run?}) does step 5 for sessions already running, for example ones renamed before it existed: it types /rename through the same gate and reports per session done | busy | skipped (ready in a dry run, which types nothing). It is idempotent (typing the same title again changes nothing). all tries every live Claude session once and reports the busy ones; a single handle retries a few times. dev-*, non-Claude, not-running and half-renamed sessions are skipped.

It is idempotent and safe to re-run after a crash: before step 3 the row still has the old name, after it the new one with rename_from set, and the same command does what is left (a re-run of a finished rename is a no-op, but only while the renamed session is alive: otherwise it is a 409 telling you to runner restore; runner new is refused while a half-done rename owns that name, so its row and session id are not replaced). --dry-run validates and prints the steps, writing nothing. A Codex session and a dev-* one are not renamed. It never touches the nexor-runner-tmux unit.

Every session row carries what the agent is doing right now, so a dashboard can tell a busy agent from a parked one without opening its terminal:

It is in GET /sessions, in the agora snapshot (sessions[]) and in runner ls (a column, and the three fields in --json). It is computed on every listing and every agora report tick (5 s), read-only, and bounded: an unchanged transcript costs one stat, an engine answer is reused for 3 s, a pane is captured only for a session that looks busy (or has no other source) and at most once per 2 s. A source that fails makes that row unknown; it never fails a listing.

OpenCode sessions are looked up by the row's session_id; when the engine does not know it the newest engine session titled with the handle is used (the same rule as the handle map).

Codex allocates its own thread ID. Until that ID is known to the runner, activity uses pane heuristics and automatic restore skips the session. Use Codex's own resume picker to recover it; the runner never guesses with resume --last.

waiting for Claude Code and Codex comes from the screen only: neither writes the pending approval to its transcript. The menu patterns are heuristics; an unrecognised prompt keeps the row working.

When the source gives no timestamp (pane fallback, OpenCode working/waiting), activity_since is the moment this runner first saw the new activity.

A transcript whose last conversation entry is a prompt or a tool result is working even if the client died mid-turn; the session disappears from the list when its tmux pane does.

Handle. A session's identity (the current grammar is under Handles and renaming; this is the older form, still accepted): --[--], where prefix is 2-4 lowercase letters (the owner's initials; set NEXOR_RUNNER_HANDLE_PREFIX to let cld- be shorthand for -cld-) and client is cld (Claude Code), oc (OpenCode) or cdx (Codex). Examples: jd-cld-api, jd-oc-api, jd-cld-api--auth. The tmux session is named cc- and the handle is exported to the agent as NEXOR_AGORA_HANDLE. At most 3 streams (--) per topic; a stream session defaults to a smaller model than the main one.

Codex launch requires a Codex CLI supporting --no-daemon. Sign in with codex login and configure the Agorà MCP server for Codex on the runner host. The launch uses the runner's environment allow-list and Codex's configured model unless a model is supplied. Use tmux or the runner's browser terminal if already enabled. Claude's Remote Control launch option does not apply to Codex.

Card. .md in the cards directory (--cards-dir, NEXOR_RUNNER_CARDS_DIR or runner config set cards-dir, see Runner config): YAML-like frontmatter plus one fenced JSON block. home.cwd is the working directory, shared by every client and stream of a topic (the card is always the cld one, -cld-.md). home.host must equal this machine's name or host id, ignoring case (My-Box is my-box), or, as a list ("host": ["my-box", "lap"]), any one of its entries must; otherwise runner new refuses unless you pass --force; a card without home.host runs anywhere. The name is NEXOR_RUNNER_HOST, else host in config.json, else the runner name from agora.json (see below), else the system hostname. The cards directory defaults to ~/.config/nexor-runner/cards.

Scope. A card may declare scope: personal or scope: p in its frontmatter (work / w is the default when the key is absent; case and surrounding blanks are ignored, anything else is work). It marks agents the owner wants kept apart from work ones. When the handle conforms to the grammar its scope letter (-p- / -w-) is authoritative: a card can never downgrade a -p- handle to work, and when the two disagree the more private one wins (a -w- handle whose card says personal is personal too). The disagreement is reported as handle_problems in GET /cards and refused at launch when the grammar is enforced. Older handles and dev-* use the card alone. The scope is stored on the session row at new / launch / import / restore and is re-read from the card whenever it matters (snapshot, restore, bulk stop), so editing a card takes effect without relaunching. Free (dev-*) sessions and sessions without a readable card are work.

runner restore skips personal rows (reported as skipped (personal) on stderr; the rows stay in the state file). Pass --include-personal, or set NEXOR_RUNNER_RESTORE_PERSONAL=1, to restore them too. The CLI is the only bulk restore path (no unit restores at boot by itself); restoring one session explicitly (hub Resume, POST /restore with targets) is never filtered.

runner kill --scope personal|work stops every live session of that scope (the same through POST /sessions/stop-scope {"scope": "personal"} and the agora intent stop-scope).

The agora snapshot carries scope on every session and every card.

Free sessions. Handle dev- needs no card but needs -C

; names are unique (cc-dev--) and never refused as duplicates.

Environment. Sessions start with env -i plus an allow-list (PATH, HOME, LANG, TERM, NEXOR_AGORA_*, XDG_CONFIG_HOME, ...). Variables matching *API_KEY* and ANTHROPIC_AUTH_TOKEN are refused even when requested: agents run on the subscription login.

State. ~/.local/state/nexor-runner/sessions.json. Claude sessions are started with --session-id (stored); restore runs claude --resume , the exact conversation. Rows without an id, and OpenCode, use --continue.

runner ls [--json] list sessions (with their activity) runner cards [--json] [--cards-dir D] list agent cards and whether they run runner new ["task"] [-f FILE] start a session [--model M] [-C DIR] [--cards-dir D] [--force] [--no-remote-control] [--dry-run] runner rename [--dry-run] [--force] [--cards-dir D] give a session a new handle (see Handles and renaming) runner retitle [--dry-run] [--cards-dir D] sync the claude.ai / desktop title to the handle runner attach attach to a session runner kill kill a session runner kill --scope work|personal kill every live session of a scope runner restore [--dry-run] [--include-personal] [--cards-dir D] [--wait-network SECONDS] re-create sessions the tmux server lost runner import [--from-tmux default|SOCKET] [--cards-dir D] [--dry-run] [--only GLOB]... [--exclude GLOB]... [--prefix PREFIX]... runner serve [--host H] [--port 7800] [--token-file F] [--init-token] [--cards-dir D] runner link --hub URL --token-file F link this runner to an agora hub runner unlink forget the link runner agora [--cards-dir D] outbound loop: report to the hub, run its intents runner opencode rotate-password new OpenCode engine password (revokes paired devices) runner opencode map [--sync] [--json] session id -> handle map read by the Agora connector runner systemd install [--api|--agora|--rotate] [--dry-run] [--tmux-bin P] [--runner-bin P] [--port N] [--token-file F] [--extra-path DIRS] [--cards-dir D] [--host NAME] runner config show [--json] print the effective settings and their source runner config set cards-dir|host|host-id|terminal|rc-typing VALUE save a setting in config.json runner config unset cards-dir|host|host-id|terminal|rc-typing remove it new: the first task is the optional positional prompt (or -f FILE). cld runs claude --model M --name [""]. oc runs opencode --standalone [--prompt ""]: the model comes from the OpenCode config (a requested model is ignored); point it at another config with XDG_CONFIG_HOME. --dry-run prints the launch command without starting anything.

attach / kill accept an index (order of runner ls), an exact name or a unique fragment.

restore skips rows whose name (or imported origin) is still alive in another tmux server, so two clients never share one conversation.

import is described under Migration.

Loopback only (127.0.0.1, ::1, localhost; any other --host is refused), JSON in and out, no access log. Every endpoint except GET /health needs Authorization: Bearer . ref is an index, exact name or unique fragment, as in the CLI (index follows GET /sessions); POST /sessions/{ref}/rename takes only the exact handle or tmux name. Errors are {"error": "..."} with 400/401/404/405/409/413/501.

state is always running; what the agent is doing is activity (see Session activity); session_id is the Claude conversation id or the OpenCode ses_ session id (empty only for rows the runner did not launch); remote_url is the Remote Control URL (Claude) or the last pair ticket issued (OpenCode, one-time, five minutes); rc_status is the Remote Control outcome (see Remote Control: pending, sent, ok, gave_up, or null) and rc_attention says why a person has to look at the session (a folder-trust dialog waiting for an answer, no Remote Control URL after two minutes, a session not started with Remote Control; null when nothing is needed); last_active is null; url and port are empty (no web terminal).

Own tmux server and a dedicated systemd --user unit with env -i, an explicit PATH/HOME/LANG and UnsetEnvironment for API keys. Restarting another service cannot touch the sessions; restarting the runner's own unit does, and runner restore brings them back.

Sessions start from the allow-list only. *API_KEY* and ANTHROPIC_AUTH_TOKEN are never passed.

The API listens on loopback only, with no unix socket and no TLS: put anything that must reach it from outside behind your own authenticated proxy.

The bearer token is read from NEXOR_RUNNER_TOKEN, else from a file (--token-file, NEXOR_RUNNER_TOKEN_FILE, default ~/.config/nexor-runner/token) that must be mode 0600 and at least 16 characters. It is never accepted on the command line.

import only reads the source tmux (list-panes) and Claude session files; it never starts, kills or renames a session.

Migrating from an existing tmux-based launcher

Sessions started by an older launcher live in the default tmux server. The runner's sessions live in its own server, so the two coexist.

Recommended: gradual

Old sessions stay where they are; new ones are born in the runner; agent sessions are moved one at a time.

Install the runner and both units (above). Start new sessions with runner new or POST /sessions from now on.

To move one agent session: runner import --dry-run and check the table (handle, cwd, model, session id).

runner import records the live sessions in the state file. Nothing is started or touched, and re-running adds nothing.

Close the old session (exit the client, or kill that tmux session in the default server).

runner restore --dry-run, then runner restore: the session comes back in the runner with claude --resume and the model it was using.

Remote access is re-enabled automatically (see Remote Control below).

Repeat for the next session whenever convenient. restore refuses a session that is still alive in the old server, so you cannot end up with two clients on one conversation.

Agents still running in the old server

While agents are not moved yet, the runner also watches the foreign tmux servers listed in NEXOR_RUNNER_FOREIGN_TMUX (comma-separated socket names; default = the default server, which is also the default value; empty = none). GET /cards, runner cards and the agora report show a card as running when cc- is alive in the runner's server or in a foreign one (where: "runner" | "foreign" | null). Launching such a handle (POST /sessions, runner new, an agora launch intent) is refused with 409 ("already running outside the runner; move it with import+restore") unless force: true / --force (agora intents cannot force). If a foreign server cannot be probed (anything but "no server running"), launch fails closed with 503 and the card reports where: null. Filoni counting only looks at the runner's server.

Alternative: one shot

runner import --dry-run, then runner import (all live sessions).

Stop whatever owns the default tmux server (this kills every session in it).

What runner import does

runner import [--from-tmux default|<-L socket>] reads the source tmux and ~/.claude/sessions/.json (pid, sessionId, cwd, name, tmux; matched on the pane PID or one of its descendants, else on the file whose tmux names the session with a live pid). Per live claude/opencode session: handle = the session name minus cc- when it is a - handle whose card exists, else dev- from the tmux name; cwd = pane cwd; the original tmux name is kept as origin. Claude sessions without an id are skipped with a warning; OpenCode needs a cc--oc- name. The model is read from the last assistant entry of ~/.claude/projects//.jsonl and passed to --model on resume (opus when the transcript has none).

Filtering. --only HANDLE_OR_GLOB and --exclude HANDLE_OR_GLOB (both repeatable) are matched with case-sensitive fnmatch against the resulting agent handle (e.g. --exclude 'tc-*'); --prefix P is shorthand for --only 'P-*'. --exclude wins over --only. Non-matching sessions are reported as excluded (also with --dry-run) and are neither recorded nor counted as imported. Empty patterns are rejected; when nothing matches, a message says so and the exit code stays 0. Sessions skipped with a warning have no handle yet and are not filtered. The HTTP API does not expose import, so there is no API counterpart.

pip install -e ".[dev]" && ruff check . && pytest Project links

Released: Nov 30, 2026

Author: nexor-runner contributors

Both files in this release have provenance metadata.

View provenance details

agents claude-code codex nexor-agora opencode systemd tmux

Development Status 4 - Beta

Intended Audience Developers

License OSI Approved :: MIT License

Operating System POSIX :: Linux

Programming Language Python :: 3.11

Topic Software Development

System :: Systems Administration

Release files for nexor-runner 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Built distribution (wheel)

Total release size: 547.3 kB

Release files / nexor_runner-0.8.1.tar.gz

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Release files / nexor_runner-0.8.1-py3-none-any.whl

Security for nexor-runner 0.8.1

Both files in this release have been uploaded with provenance metadata.

With provenance nexor_runner-0.8.1.tar.gz Nov 30, 2026

With provenance nexor_runner-0.8.1-py3-none-any.whl Nov 30, 2026

Attestation for nexor_runner-0.8.1.tar.gz

Attestation for nexor_runner-0.8.1-py3-none-any.whl

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Nov 30, 2026 2 release files Full provenance

Nov 28, 2026 2 release files Full provenance

Nov 27, 2026 2 release files Full provenance

Nov 24, 2026 2 release files Full provenance

Nov 21, 2026 2 release files Full provenance

Oct 29, 2026 2 release files Full provenance

Oct 27, 2026 2 release files Full provenance

Oct 26, 2026 2 release files Full provenance

Oct 25, 2026 2 release files Full provenance

Oct 24, 2026 2 release files Full provenance

Oct 23, 2026 2 release files Full provenance

Oct 22, 2026 2 release files Full provenance

"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.

© 2026 Python Software Foundation

Deployed from fc0d8e6

Source Attribution: This report incorporates information referenced or syndicated from Pypi.org. Read original coverage at Pypi.org.

More from Technology →
Haldwani Times
Haldwani Times Independent News & Editorial
Login
MARKETS & FINANCE
BRENT CRUDE: $78.40 -0.52% SENSEX: 81,450.20 +0.42% NIFTY 50: 24,820.15 +0.38% GOLD (24K): ₹74,500/10g -0.18% USD/INR: ₹95.54 +0.10%

ADMINISTRATIVE LEADERSHIP

Mr. Narendra Modi
Mr. Narendra Modi
Mr. Lt. Gen. Gurmit Singh
Mr. Lt. Gen. Gurmit Singh
Mr. Pushkar S. Dhami
Mr. Pushkar S. Dhami
Mr. Lalit M. Rayal
Mr. Lalit M. Rayal
Mr. Gajraj S. Bisht
Mr. Gajraj S. Bisht

Top Headlines & Breaking Stories

View All News →

Haldwani Times – Everything in Haldwani: News, Shops, Businesses & Services

Haldwani Times is the premier digital news and commercial discovery platform built specifically for the citizens, business owners, students, professionals, and visitors of Haldwani, Nainital district, and the wider Kumaon region of Devbhoomi Uttarakhand. As the economic gateway to the Kumaon Himalayas, Haldwani is a bustling metropolis connecting the plains of northern India with the scenic mountain districts of Nainital, Almora, Pithoragarh, Bageshwar, Champawat, and Udham Singh Nagar. Haldwani Times serves as the definitive digital heartbeat of the city, bringing breaking hyperlocal news, verified commercial directories, educational updates, healthcare guides, Mandi Bhav rates, and civic announcements onto a single unified, trusted platform.

The Definitive Source for Breaking Haldwani News & Civic Updates

Haldwani stands as one of the fastest-growing urban conglomerates and commercial engines in northern India. Positioned in the fertile Terai-Bhabhar belt at the foothills of the Shivalik range, the twin cities of Haldwani and Kathgodam form the administrative and logistical nerve center for the entire Kumaon division. With rapid urbanization, expanding commercial infrastructure, flourishing educational centers, and increasing inter-state transit, the demand for fast, fact-checked, and unbiased local journalism has never been greater. Haldwani Times delivers 24/7 comprehensive news coverage built on rigorous journalistic standards: - **Hyperlocal Civic News:** Real-time coverage of municipal corporation affairs, city drainage projects, traffic management blueprints, and road widening drives across Tikonia, Mukhani, Kusumkhera, Bareilly Road, and Rampur Road. - **Administrative Directives:** Official notifications from the District Magistrate (DM) Nainital, Senior Superintendent of Police (SSP), and state secretariat decisions affecting citizen welfare. - **Kumaon Weather & Disaster Alerts:** Timely mountain rainfall warnings, landslide advisories along NH-109 (Haldwani-Nainital Highway), and emergency bulletins during the monsoon and winter seasons. - **Education & Campus News:** Timely reports on Kumaon University examination schedules, Uttarakhand Board (UBSE) results, medical college admissions, and competitive coaching updates. - **Commercial & Market Trends:** Daily wholesale Mandi Bhav rates from Haldwani Subzi Mandi, real estate trends, retail market festivals, and local business openings. - **Cultural & Pahadi Heritage:** In-depth feature stories celebrating Kumaoni folk traditions, Aipan art, Nanda Devi festivals, and local community milestones.

Everything in Haldwani on One Unified Digital Ecosystem

Beyond traditional news reporting, Haldwani Times is engineered as an exhaustive local discovery engine. Historically, finding verified local business telephone numbers, emergency hospital contacts, specialized doctors, reliable plumbers, or trusted real estate consultants in Haldwani required asking neighbors or browsing outdated social media posts. Haldwani Times eliminates this friction by organizing every commercial, professional, and civic resource into searchable, verified categories. Whether you are a newly arrived resident in Kusumkhera looking for high-speed broadband providers, a parent searching for reputable CBSE schools near Kaladhungi Road, or a tourist seeking taxi rentals to Nainital, our portal delivers accurate, verified, and actionable information in seconds.

Local Shops, Retail Hubs & Traditional Bazaars in Haldwani

The retail commerce of Haldwani spans centuries-old traditional bazaars and modern commercial complexes: - **Bada Bazaar & Mangal Parao:** The historic retail heart of Haldwani, renowned for traditional Kumaoni wedding jewelry (Pauji, Guloband, Nath), brass utensils, ethnic handlooms, and wholesale clothing. - **Nainital Road & Tikonia Commercial Corridor:** Modern multi-brand retail showrooms, electronics stores, authorized smartphone service centers, branded footwear outlets, and international apparel stores. - **Bareilly Road & Rampur Road Trade Hubs:** Major agricultural machinery dealers, hardware and building material wholesalers, furniture manufacturing units, plywood distributors, and automobile showrooms. - **Subzi Mandi & Wholesale Grain Market:** One of the largest agricultural distribution centers in North India, supplying fresh vegetables, hill fruits (apples, peaches, plums), and organic Pahadi pulses (Gahat, Bhatt, Rajma) across northern states.

Healthcare Hub of Kumaon: Hospitals & Emergency Services

Haldwani serves as the premier medical lifeline for all six hill districts of Kumaon. Patients travel from Almora, Pithoragarh, Bageshwar, and Champawat to access specialized clinical treatments in Haldwani: - **Government Healthcare Institutions:** Dr. Susheela Tiwari Government Medical College & Hospital (STGH) and Base Hospital Haldwani provide tertiary trauma care, specialized super-specialties, pediatric ICUs, and 24/7 emergency response. - **Private Multi-Specialty Hospitals:** Advanced private medical centers specializing in cardiology, joint replacements, neurology, critical care, nephrology, and advanced laparoscopic surgeries. - **Diagnostic Centers & 24/7 Pharmacies:** Fully automated pathology laboratories, high-resolution MRI/CT scan centers, and round-the-clock emergency pharmacies clustered around Medical College Road, Kaladhungi Road, and Rampur Road.

Education, Colleges, Coaching Academies & Youth Development

Haldwani is the educational capital of the Kumaon region, home to thousands of ambitious students preparing for medical, engineering, defense, and civil services careers: - **Premier Degree Colleges:** Motiram Baburam Government Post Graduate College (MBPG College) and Women's Degree College providing extensive undergraduate and postgraduate humanities, commerce, and science programs. - **Competitive Coaching Ecosystem:** Highly reputed coaching academies for NEET UG, JEE Main & Advanced, UPSC Civil Services, UKPSC/UKSSSC, NDA, CDS, and Banking examinations along Kaladhungi Road and Tikonia. - **Affiliated Schooling Infrastructure:** Esteemed CBSE, ICSE, and Uttarakhand Board schools imparting value-based holistic education with modern sports and laboratory facilities.

Real Estate, Housing Colonies & Urban Expansion Trends

Driven by rapid infrastructure expansion and high quality of life, Haldwani's real estate market is expanding outward into organized residential colonies: - **Prime Residential Localities:** Highly sought-after residential sectors in Mukhani, Kusumkhera, Kaladhungi Road, Judge Farm, Daharia, and Bhotia Parao offering planned housing, green parks, and modern civic amenities. - **Commercial Property Investments:** Thriving commercial retail complexes, office spaces, and warehouse hubs developing rapidly along the proposed Haldwani Ring Road and transport corridors. - **Property Advisory & RERA Compliance:** In-depth real estate updates, circle rate revisions by the Nainital district administration, and buyer advisory guidelines for safe property acquisitions.

Strategic Transit Gateway, Tourism Routes & Kumaon Himalayan Connectivity

Haldwani-Kathgodam is the vital transit bridge connecting the plains of Delhi NCR and Uttar Pradesh with the hill stations of Uttarakhand: - **Kathgodam Railway Terminal:** Connecting Kumaon directly to New Delhi (Shatabdi Express, Ranikhet Express), Lucknow, Kolkata, Jammu, and Dehradun. - **ISBT Haldwani:** Operating round-the-clock interstate and mountain bus routes managed by Uttarakhand Transport Corporation (UTC) and private deluxe coaches. - **Pantnagar Airport (PGH):** Located just 26 km from Haldwani, offering scheduled domestic flights to New Delhi, Dehradun, Pithoragarh, and regional hubs. - **Himalayan Tourism Hub:** The primary staging point for journeys to Nainital (34 km), Bhimtal (30 km), Mukteshwar (72 km), Kainchi Dham (42 km), Almora (90 km), Ranikhet (80 km), and Jim Corbett National Park (55 km).

Gaula River Mining, Ecological Balance & The Bhabhar Economy

The Gaula River represents the undisputed economic and hydrological lifeline of Haldwani and the broader Nainital district. Originating from the Sattal-Bhimtal catchment in the lesser Himalayas, the river flows south past Kathgodam and Haldwani before merging into the Ramganga. For generations, the Gaula riverbed has provided the foundation for both regional agriculture and the construction economy across northern India: - **Regulated Minor Mineral Extraction:** During the open mining season (typically October to May), thousands of registered tractor-trolleys and heavy dumpers harvest riverbed gravel, sand, and boulders under strict surveillance by the Uttarakhand Forest Development Corporation and the Nainital district administration. - **Livelihood Support for Over 50,000 Families:** The Gaula mining economy directly and indirectly sustains vehicle owners, drivers, mechanics, diesel pump stations, roadside eateries, and local laborers, circulating over ₹500 crore into Haldwani's local markets annually. - **Environmental Safeguards & Flood Mitigation:** In strict adherence to High Court and National Green Tribunal (NGT) directives, scientific replenishment studies, satellite GPS tracking on transport vehicles, and seasonal mining bans during the monsoon protect the river's ecological balance and prevent bank erosion along low-lying residential sectors.

Culinary Landscape: From Traditional Kumaoni Rasoi to Modern Cafes

Haldwani's gastronomic scene reflects a delightful blend of rustic mountain traditions and cosmopolitan dining: - **Authentic Kumaoni Specialties:** Local restaurants and heritage dhabas serve traditional mountain delicacies cooked in iron vessels, including Bhatt ki Churkani (black soybean curry), Gahat ke Dubke (horsegram puree), Aloo ke Gutke tempered with wild Himalayan chives (Jamboo) and Jakhiya, and refreshing cucumber Raita flavored with freshly crushed mustard seeds. - **Traditional Confectioneries:** Historic sweet shops along Bada Bazaar and Nainital Road craft Almora's world-famous Bal Mithai (roasted caramelized khoya fudge coated in sugar balls) and Singaudi (sweetened khoya wrapped in wild Malu leaves). - **Vibrant Street Food & Cafe Culture:** As dusk falls, Tikonia and Nainital Road come alive with bustling street food stalls offering steaming Tibetan momos, spiced thukpa, Kathi rolls, and hot Masala Chai, alongside modern rooftop cafes serving specialty Italian coffees and continental snacks.

Cultural Festivals, Folk Heritage & The Aipan Art of Kumaon

Beyond commercial enterprise, Haldwani is the proud cultural showcase of Devbhoomi Uttarakhand: - **Aipan Folk Art Tradition:** The sacred geometrical floor and wall art handcrafted with red ochre (Geru) and white rice paste (Biswar) adorning thresholds, altars, and chowkis during auspicious ceremonies, now preserved through local women's self-help cooperatives. - **Classical Baithki & Khadi Holi:** Unique to Kumaon, musical celebrations starting as early as the month of Paush, featuring classical Hindustani ragas sung in community courtyards followed by energetic Chholiya dance performances during spring. - **Nanda Devi & Chholiya Heritage:** Grand annual fairs celebrating the patron deity Nanda Devi, accompanied by martial sword-and-shield Chholiya dancers whose rhythmic brass trumpets (Ransingha) and hurka drums resonate through the valley.

Public Amenities, Parks & Community Spaces in Haldwani

Urban lifestyle and recreational infrastructure in the city: - **Green Parks & Walking Tracks:** Walkway projects around Daharia, Judge Farm, and Awas Vikas providing lush recreational zones for families and seniors. - **Community Centers & Sports Grounds:** Multi-purpose auditoriums and grounds hosting cultural melas, badminton tournaments, and community celebrations. - **Gaula Barrage & Forest Trails:** Scenic river viewpoints and natural birdwatching areas attracting eco-tourists and local nature enthusiasts on weekends.

Frequently Asked Questions (FAQs)

How can I access live breaking news and weather alerts for Haldwani?

Haldwani Times operates a dedicated 24/7 hyperlocal newsroom providing real-time breaking bulletins, traffic alerts, and meteorological warnings. You can access live news directly from our homepage, subscribe to instant browser push notifications, or view categorical updates on Uttarakhand, Education, and Mandi Bhav. During monsoon and winter weather events, our correspondents provide live updates on NH-109 road blockages and emergency administrative orders issued by the Nainital District Magistrate.

Is Haldwani Times completely free to read for all visitors?

Yes, Haldwani Times offers completely unrestricted, open-access reading to all users without mandatory paywalls. Readers across Haldwani, Uttarakhand, and the global diaspora can freely browse all breaking news reports, investigative articles, business directory listings, and historical archives. Our public-interest mission ensures that essential civic information, emergency hospital directories, and educational circulars remain universally accessible to everyone at zero cost.

How can local business owners list their shop or service in the Haldwani directory?

Local merchants, medical practitioners, schools, and service professionals can register their business by navigating to our 'Business Directory' page and selecting 'Add Listing'. The registration process allows you to input your business name, address, contact numbers, operational hours, services offered, and high-resolution showroom photographs. Once submitted, our local verification team verifies the physical address within 24 hours to ensure high consumer trust and top ranking on Google.

Can I read Haldwani Times articles in Hindi as well as English?

Yes, Haldwani Times features a seamless, native bilingual reading experience tailored for our regional readership. With our one-click language toggle located prominently in the navigation bar, you can instantly switch between English and pure Hindi. Both versions feature carefully crafted editorial phrasing, accurate regional terminology, and culturally resonant storytelling to ensure maximum readability for students, families, and senior citizens alike.

How do I submit news tips, event notices, or press releases to the editorial team?

Our newsroom warmly welcomes verified news tips, community event notices, civic grievances, and official press releases from citizens and local organizations. You can submit your documents, photos, or video evidence directly to our central editorial desk at editorial@haldwanitimes.com or via our Help & Support page. Our senior editors review every submission for factual authenticity, multi-source verification, and public relevance prior to publication.

Where can visitors find authentic Kumaoni Bal Mithai and Singaudi in Haldwani?

Renowned traditional sweet houses clustered along Bada Bazaar, Mangal Parao, Kathgodam Station Road, and Nainital Road specialize in daily batches of authentic Bal Mithai and fragrant Singaudi prepared with pure mountain dairy khoya and natural ingredients.

What transportation options are available for traveling from Haldwani to Nainital and Bhimtal?

Continuous state transport buses (UTC), KMOU coaches, and registered taxi union sharing cabs operate 24/7 from the Haldwani Roadways Bus Station (near Tikonia) and Kathgodam Railway Station. Fares are regulated by the transport department, with mountain travel times ranging between 1 to 1.5 hours.