---
title: Using it on your computer
nav: On your computer
summary: Keep it running, open the local Agent settings page, switch AI coding tools, rename, stop everything, check memory and activity — the commands you will actually use.
order: 3
---

# Using it on your computer

Once it is set up you mostly use your phone. The computer only needs to stay on, and now and then you change a setting. This page lists the commands for that.

Everything below runs in a terminal, and you can ask the AI on your computer to do any of it for you — only pairing a phone is yours, and that happens on the account page or a paired phone, not in a terminal. The remote pairing password is optional; see below.

When the Agent needs an admin password or an API key, a card pops up on your phone, so you don't have to walk back to the computer: see [Admin rights and API keys, from your phone](/docs/phone-admin/). When Agent J itself has a problem, the Agent asks our support desk first: see [Getting help from the support desk](/docs/support/).

## Check how things are

`agentj`

```bash
agentj
```

`agentj doctor`

```bash
agentj doctor
```

`agentj status`

```bash
agentj status
```

- `agentj` on its own: which setup steps are done and what comes next.
- `agentj doctor`: a health check, one line per item — ✓ fine, ! worth a look, ✗ needs fixing, each with how to fix it.
- `agentj status`: whether the background program is running and connected.

Every command: `agentj --help`.

## Keep it running

During setup the AI installed it as a service, so it starts by itself when the computer starts and you log in.

`agentj service status`

```bash
agentj service status
```

`agentj service install`

```bash
agentj service install
```

`agentj service uninstall`

```bash
agentj service uninstall
```

- `status`: is the service running?
- `install`: install and start the service (a systemd user service on Linux, a LaunchAgent on a Mac).
- `uninstall`: stop and remove it.

`install` (and every update) also sets up a small rescue helper. When Agent J stops answering, it keeps the phone's Settings → Emergency repair working; `uninstall` removes it too. Check it with `agentj rescue status`; see [Phone grey or disconnected?](/docs/reconnect/).

On a Mac, System Settings → General → Login Items & Extensions → "App Background Activity" shows Agent J's rows: this service, one for its rescue helper, and one more if you set up the Agent J browser. The service row reads "Agent J" with the robot icon and the signing developer's name: the service is started by a small Apple-notarized program, Agent J.app, kept in your personal Applications folder (~/Applications) — please leave it there. If the signed copy cannot be downloaded, Agent J falls back to the old way and the row reads `agentj` with "Item from unidentified developer"; everything still works. The rescue helper's row still reads that way for now. The one-shot jobs used for upgrades and Agent switches are no longer registered there and are deleted when they finish; the ones older versions left behind are cleaned up after you upgrade. Leave these switches on, or the service will not start by itself after a restart.

On a cloud server, where nobody stays logged in, run `loginctl enable-linger $USER` once before `agentj service install`.

If you'd rather not use a service, run `agentj serve` in a terminal window instead; it stops when the window closes.

> **Note:** while the computer is off, asleep or offline, your phone cannot reach it. When the computer is back, it reconnects by itself.

## The local Agent settings page

```bash
agentj admin
```

This prints a link in the terminal. Open it in a browser on the same computer and you get this computer's own Agent settings page, where you can:

- pair a new phone (tap "Add a phone remote");
- see the paired phones under "Phone remotes" ("Full" at 10) and unlink one;
- rename the Agent under "The Agent's name";
- switch "Unlinking from the account dashboard" on or off (the box "Allow unlinking this computer's phone remotes from the account dashboard");
- check under "Connection" whether "The agentj program" is running, the "Relay server" is connected and the computer is in an Agent J account.

The page's "Good to know" box says it plainly: one person per Agent works best, and the 10 phone remotes are meant for the same person's phone, tablet and computer.

The page only opens on this computer — not on another computer or a phone. The link works once, for 10 minutes. Press Enter in the terminal for a fresh link (the old one stops working at once); press Ctrl-C to close the page.

Rather not copy a link? Run `agentj admin --open`: it opens the page in this computer's default browser and returns at once, without printing the link. The page closes by itself after 30 minutes unused; run it again to reopen. Asking your Agent to "open the admin page" runs exactly this.

On a cloud server over SSH, `agentj admin` also prints an `ssh -N -L …` line. Run that line on your own computer, then open the link in your own computer's browser.

## Phones and other devices

`agentj pair`

```bash
agentj pair
```

`agentj devices`

```bash
agentj devices
```

`agentj revoke <device-id>`

```bash
agentj revoke <device-id>
```

- `agentj pair`: pair a new phone. The background program has to be running; if it isn't, `agentj pair` tells you to run `agentj service install` first. The taps are in [On your phone](/docs/phone/).
- `agentj devices`: list the paired phones and browsers.
- `agentj revoke <device-id>`: cut a device off and remove it straight away (the id is in `agentj devices`).

Each Agent takes up to 10 phones. When all 10 are used, `agentj pair` lists them and asks you to unlink one first.

## Switch the AI coding tool or the work folder

`agentj agent`

```bash
agentj agent
```

`agentj agent detect`

```bash
agentj agent detect
```

`agentj agent codex --dir ~/agentj-work`

```bash
agentj agent codex --dir ~/agentj-work
```

- `agentj agent`: which AI coding tool is connected and which folder it works in.
- `agentj agent detect`: which AI coding tools on this computer are usable.
- `agentj agent claude --dir <folder>`, `agentj agent codex --dir <folder>`, `agentj agent opencode --dir <folder>`: switch to Claude Code, Codex or OpenCode and set the folder. OpenCode also needs `--model` as provider/model, for example `--model zhipuai/glm-5.3`.
- `agentj agent reset`: forget the conversation so far; the next message from the phone starts a new one.

Using a model from Volcano Ark, Kimi, Alibaba Bailian or DeepSeek: see [Choose by your model](/docs/models/).

Session mode: new installs use an **independent** session — Agent J starts its own, fenced, and changes nothing in your terminal tools. To attach the phone to the session you already have open on this computer instead (advanced), add `--shared` to any of these; `--independent` goes back. Each switch says what it means and prints the line that undoes it (`agentj config set agent.session_mode independent|shared`); the phone's Settings → Session mode does the same. An install upgraded from a version where shared was the default keeps shared (written into your settings file, never switched silently). In shared mode, with several Claude Code sessions open in the folder, it lists them (name, last activity, first message) and you pick one; to change it later: `agentj config set agent.shared_session_id <session ID>`.

The change takes effect after a restart of the background program:

```bash
agentj service uninstall
agentj service install
```

With Codex in shared mode (the phone and the computer use the same session), the first message from the phone is no longer refused. If no session was picked, it continues the most recent Codex session in that folder; if there is none, it starts a new one and tells you on the phone — `codex resume <id>` on the computer continues the same one. While the computer is still in the middle of a turn, phone messages wait in line and go out when it finishes (for up to 30 minutes; `/stop` cancels). If the original session can't be continued, or its permission settings can't be read, your own Codex defaults apply and the phone tells you once. The reasons are recorded in `agentj activity`, and `agentj doctor` gets an extra line saying which session will be continued.

## Rename the Agent

`agentj name`

```bash
agentj name
```

`agentj name Wren`

```bash
agentj name Wren
```

Without a name it shows the current one; with a name it changes it. Keep it short: up to 8 Chinese/Japanese/Korean characters, or 13 letters, digits, hyphens and spaces; mixed, each CJK character counts 1.6 and anything else 1, 13 in all. A longer name given before this rule keeps working until the next rename. No two Agents in one account may share a name. When the computer is in an Agent J account, the name is changed in the account dashboard first, and only then on this computer. You can also rename it in the account dashboard or on the local Agent settings page.

## Stop everything

`agentj stop`

```bash
agentj stop
```

`agentj resume`

```bash
agentj resume
```

- `agentj stop`: stop everything now. The current work is interrupted, every request waiting for your approval is denied, batch approvals are withdrawn and scheduled tasks are paused. It stays stopped across a restart.
- `agentj resume`: start again. Asks for your remote pairing password if one is set (otherwise you confirm at the keyboard yourself), so the Agent can't lift "Stop everything" itself; tapping "Resume" on a paired phone is enough too.

"Stop everything" in the phone's ≡ menu is the same switch, and tapping "Resume" on the phone works too.

## What it remembers

Every time it starts work, the Agent reads a few memory files — Claude Code's `CLAUDE.md`, for example. You can look at them entry by entry and delete entries:

`agentj memory list`

```bash
agentj memory list
```

`agentj memory show 1`

```bash
agentj memory show 1
```

`agentj memory rm 1 3`

```bash
agentj memory rm 1 3
```

`agentj memory restore`

```bash
agentj memory restore
```

- `list`: where its memory lives and how many entries each place has.
- `show <number>`: every entry in one place.
- `rm <number> <entry>`: delete one entry. The original goes to a trash folder on this computer for 7 days.
- `restore`: show the trash; `agentj memory restore <id>` brings one entry back.

The phone's "Memory" page does the same.

## What it has done

`agentj activity --since 2h`

```bash
agentj activity --since 2h
```

`agentj approvals --verify`

```bash
agentj approvals --verify
```

- `agentj activity`: the activity record — when each conversation turn started and ended, every permission request, who approved or denied it, stops and resumes. `--since` takes `2h`, `3d` or a date. The record stays on this computer for 30 days.
- `agentj approvals --verify`: every approval and denial, each checked to really come from one of your paired phones.

Turn the record off with `agentj config activity off`; delete it all now with `agentj activity --clear`.

The phone's "Activity" page shows this same record.

## Scheduled tasks

If you built workflows that run on a schedule with the workflow design wizard, manage them here:

`agentj tasks list`

```bash
agentj tasks list
```

`agentj tasks show <task>`

```bash
agentj tasks show <task>
```

`agentj tasks enable <task>`

```bash
agentj tasks enable <task>
```

`agentj tasks disable <task>`

```bash
agentj tasks disable <task>
```

`agentj tasks run <task> --dry-run`

```bash
agentj tasks run <task> --dry-run
```

New tasks are always installed switched off. Switch one on with `enable` (your Agent can do it when you ask), or on the phone's "Schedules" page. `run --dry-run` shows how a task would run without running it.

To build a workflow, say "帮我设计工作流" (help me design my workflows) to the Agent on your phone. It asks you one question at a time.

## The remote pairing password

Optional, recommended. It lives only on this computer (at least 8 characters) and has two uses: pairing at this computer's terminal (`agentj pair` requires it and asks you to set one first), and adding a remote from a browser on another computer signed in to the account page with an email code, where it can stand in for a passkey. Without it you can still add remotes with a passkey on the account page or from a paired phone; but if every remote is ever lost and no passkey is at hand, you'll have to come back to this computer's terminal to set it. The installation asks once whether to set it now; press Enter to skip.

`agentj passphrase status`

```bash
agentj passphrase status
```

`agentj passphrase change`

```bash
agentj passphrase change
```

`agentj passphrase reset`

```bash
agentj passphrase reset
```

- `status`: whether one is set, and whether it is locked after too many wrong tries.
- `change`: change it.
- `reset`: for when you forgot it. Type RESET to confirm. It deletes the old one **and unlinks every phone**; then set a new one with `agentj passphrase set` and pair again.

The password needs at least 8 characters; there is no other rule.

## Updates

`agentj update check`

```bash
agentj update check
```

`agentj update apply`

```bash
agentj update apply
```

`agentj update check` tells you whether there is a newer version; anyone can run it, the AI included. The first word says how things stand: `newer` — there is a new version; `current` — you're up to date; `ahead` — this computer runs something newer than the public release, nothing to do; `unknown` — it couldn't check this time (usually no network), try again later.

To upgrade, ask your Agent: it runs `agentj update apply` itself, installs, restarts, self-checks and tells you the result.

The background program checks once a day and tells your phone when a newer version exists; that daily check never installs anything by itself. To stop it: `agentj update auto off`.

If this computer has joined an Agent J account, a new release also arrives as an official notice signed by us. The Agent follows your upgrade setting: by default it upgrades and then tells you what changed, or it can ask you first. Urgent security fixes always upgrade right away. Change it under "Upgrade method" in the phone's "Settings", or run `agentj config set updates.mode ask` on the computer (`auto` switches back).

We may also send an upgrade email at 9:00 in the morning Japan time, with an upgrade authorization code. Forward it to Agent J and it upgrades itself (`agentj update apply --from-email -`) without asking you to confirm again. Details: [Official notices](/docs/notices/).

## Other switches

- `agentj report-hostname off`: stop sending this computer's name to the account dashboard.
- `agentj remote-unbind off`: don't let the account dashboard unlink this computer's phones; unlinking then happens only on this computer.
- `agentj unlink`: take this computer out of the Agent J account. If it joined with a setup code, the account dashboard drops it too. If it joined with `agentj login`, only the record on this computer is removed, and you still tap "Remove this Agent (frees a seat)" on its card in the account dashboard.

To uninstall completely, see the last section of [Installing](/docs/install/). Uninstalling doesn't stop the billing; cancel the subscription under "Manage billing" in the account dashboard.


## Personalize your Agent

`agentj config path` prints the single JSON5 user file (`~/.config/agentj/config.json5`). It supports comments and trailing commas. Put only overrides there; upgrades preserve your choices while new defaults apply to untouched keys. `agentj config keys` is the current option list, with defaults, aliases and safety tiers.

Use `agentj config get`, `set`, `unset`, `validate`, `diff`, `history`, `rollback` and `apply`. A change validates, persists and activates as one host transaction; failed activation keeps the previous working configuration and reports an error. `applied:false` means restart/start the host before claiming the phone changed. Listen to a real audio sample after voice changes.

**Reload instead of restarting (`agentj reload`)**: settings come in three tiers. Most take effect when saved; isolation, Docker, high-risk warnings, approval strength, your added instructions and the Telegram channel take effect on a reload: tap Reload configuration in the phone's ≡ All commands, send `/reload`, press Alt+Shift+L, or run `agentj reload` on the computer. The background service keeps running; the main Agent restarts before its next message, same conversation, and a key newly saved in the service key file (a Telegram bot key, say) is read in too. When the Agent changes such a setting with `agentj config set` it reloads by itself; when you change one on the phone's Settings page, a card offers Reload. Only the working root and the session mode (independent / shared) still need `agentj service restart`.

`agentj skill install` installs the bundled `agentj-config` guide for Claude Code, Codex and OpenCode; ask your AI and it does it. `agentj skill uninstall` removes only its own links. Existing same-name skills are not overwritten. Your local AI can use this guide and `agentj doctor --offline --json` for personalization; an Agent in an independent session can't see Agent J's settings file, so change settings from the shared session or the phone's Settings.

Wake phrase defaults to 嘿 + your Agent name; rename propagates when connected. Android background listening is opt-in. Unfamiliar names may need explicit pronunciation. The Android APK is a review build; measured arbitrary-name accuracy and battery acceptance are still pending. the iOS web app cannot wake in the background.

ASR defaults to your host. Cloud ASR uses your own OpenRouter key and sends audio directly to that provider. TTS defaults to installed local phone voices; host TTS and own-key OpenAI or ElevenLabs TTS are alternatives. Cloud TTS sends reply text directly to the selected provider; returned audio crosses our relay as ciphertext. Generic Android notification speech is local and does not expose conversation on the lockscreen. Background phone/cloud autoplay depends on OS/browser policy.

With OpenAI, cloud speech now defaults to `gpt-realtime-2.1-mini`. OpenAI retires the old `gpt-4o-mini-tts` on 2027-01-06: if your settings still carry that old default, Agent J switches it to the new model when it starts; any other model you picked yourself stays as it is, and `agentj doctor` reminds you to check it. With ElevenLabs, `eleven_v4` is used unless you name a model.

You can also use a speech program of your own: set `voice.tts.mode` to `host` and `voice.tts.provider` to `command`, and put the command in `voice.tts.command` as a list of arguments, with `{output}` where the file should be written. The program reads the reply text on standard input and writes a WAV file; it is stopped after `voice.tts.command_timeout` (60 seconds by default). Keep keys out of the command.

Telegram is optional and off by default, and uses a bot of your own. To connect it, save the bot key, then run `agentj channel add telegram` (or tap 「Re-pair Telegram」 in the phone's Settings): the phone shows a one-time 6-digit code; send `/start <code>` to your bot in a private chat and that chat becomes the owner. No other bot is needed to look up your ID; anyone else who writes to the bot only gets their own numeric ID back, and a code sent in a group does not count. Text, photos, voice messages, videos and files all work, up to 20 MB each; speech in voice messages and videos is transcribed on your computer, even if the phone is set to cloud recognition. Long-press a message in Telegram, tap Reply and write: the message you replied to goes to the Agent with yours, marked as a quote of a Telegram message (who wrote it and when; up to 300 characters — select part of it first to quote only that part; photos and voice notes appear as "[photo]", "[voice]" and are not downloaded again). Commands inside a quote never run; only what you type yourself counts as a command.

To let this bot receive guests too, turn on 「Let my Agent J Telegram bot receive guests」 in a customer-service bot: your private chat stays the main conversation, and everyone else is served by that bot on its own. See [Customer service bots](/docs/bots/).

On macOS, put Telegram and provider keys in `~/Library/LaunchAgents/net.agentj.host.env`, using the variable name specified by `key_env`. The file must be owned by your user, mode 0600, and not a symlink. After saving it, run `agentj service restart`. Keep keys out of the plist, chat and command arguments.

For group chats, list each group's ID and the numeric IDs of the members allowed to talk in `telegram.groups`; a message is handled only when both match. In a proxy group (the default) the bot answers only when mentioned or replied to; in a family group, ordinary messages from listed members are handled too. Before anything goes back to a group, web addresses, paths and similar details are taken out.

```json5
telegram: {
  groups: [
    { id: "-1001234567890", members: [123456789], profile: "family", label: "Home" }
  ]
}
```

Group members can be given names in `names` (only numeric IDs on the list), so the Agent knows who is speaking. List your own domains in `telegram.private_domains`: replies to any group hide them and their subdomains; e-mail addresses are always hidden. A family-group message the gate stops gets a polite refusal in the group, and your phone gets one line without the words. Each batch is handled in the order your private chat, family groups, proxy groups; an album is one turn; a group upgraded to a supergroup is followed to its new ID; your private-chat command menu and the family group's `/notification` are synced to Telegram.

Replies in your private chat and groups render common Markdown as Telegram formatting; if Telegram rejects a formatted part, the same words are sent as plain text.

`telegram.owner_commands` lets a command in your private chat be answered directly by a program on your computer, without the Agent: its output goes back to your private chat only — never into the conversation, history or logs —, it is rate-limited per hour, and the program must be your own executable that nobody else can modify. The share button under each reply on the phone sends it to your own private chat in one tap once Telegram is set up (`telegram.forward`, on by default); without Telegram it uses the phone's own share sheet.

Telegram never approves anything. End-to-end encryption and signed paired-device approvals cannot be disabled by configuration.

Preinstalled-image preparation: preseed the JSON5 file, validate it, then run `agentj init` and the first-run guide. Never clone identity keys, device approval state or cloud keys into an image. The remote pairing password and device pairing remain human steps. No image is shipped here.
## Restricted regions: configure a proxy

Prefer Claude Code. If the model provider is unreachable where you are (Hong Kong, for example), the simplest way is to tell the Agent on your computer: "Set my proxy to http://127.0.0.1:7890" (the port of your local proxy app). It runs `agentj config set proxy.https http://127.0.0.1:7890`. Never paste proxy passwords, subscription links or model keys into phone chat.

The setting reaches only the Claude Code, Codex or OpenCode process Agent J starts for you, as `HTTPS_PROXY`, `HTTP_PROXY` and `NO_PROXY`; local addresses bypass it. Voice, updates and the phone connection are not affected. The Agent's process restarts before your next message and the conversation continues. A shared session uses your own desktop process: set its proxy before starting it, and restart it yourself after a change.

A proxy that needs a username and password is not written into the settings. Ask the Agent to keep it in an environment variable and set only the variable's name, for example `proxy.https_env: "AJ_HTTPS_PROXY"` (also `proxy.http_env` and `proxy.no_proxy_env`). If both are set, the address wins.

OpenCode needs a provider connection and a matching `provider/model`. An existing v1 `auth.json` or v2 `opencode.db` does not prove a working key. The v1 runtime diagnostic uses `GET /provider` and its `connected` list; this records configured connections, not a live balance or key test. After you replace a key with `opencode auth login`, Agent J restarts the OpenCode it started before your next message and keeps the conversation; you can also ask the Agent to run `agentj agent restart`. If Agent J is attached to your own desktop OpenCode server, restart that server yourself. Phone failure lines and `agentj doctor` name the kind of failure: sign-in or key (401), region (403/451), access (403), balance or quota, rate limit, model name, network.

Both OpenCode v1 and v2 work: the official install script now installs v2 (2.0.x), and Agent J detects the version when it starts OpenCode, in the independent (default) and the shared mode alike. v2 can store several keys for one provider (for example "DeepSeek 2"), but only the selected one is used; after adding a new key, run `opencode auth switch <provider>` to select it. If OpenCode has no key at all for the selected provider (for example, the key is only exported in your terminal, which the background service cannot see), the phone says so and names the provider; store the key, then just send again. An OpenCode server you started yourself (`agent.shared_opencode_port` and `agent.shared_session_id` set) can be attached on v1 and v2: the phone sends text and answers approvals, and what you type at the computer (and the replies) shows up on the phone; model changes and slash commands stay on the computer. On a v2 server of your own, high-risk warnings are unavailable — to use them, remove the port setting so Agent J starts OpenCode itself. If your server has a password, Agent J never reads another program's environment: the phone shows an `agentj secret request --name OPENCODE_SERVER_PASSWORD --purpose "Your OpenCode server password" --dest "env:<Agent J service env file>#OPENCODE_SERVER_PASSWORD"` line — run it on the computer, paste the password on the phone's secret card, then `agentj service restart`. HTTP 403 can mean region or account/model access restrictions, not necessarily an invalid key.

If a third-party provider gave you a base_url and a key (OpenAI-compatible or Anthropic-compatible), ask the Agent to run `agentj provider add <name> --base-url <url> --model <model>`. It declares the provider in OpenCode's config, which references the key by variable name only; you paste the key itself on the phone's secret card, so the Agent never sees it. Then switch the model to `<name>/<model>` and restart the service once.

## Add a remote for another computer

Once the target computer is installed, account-bound and online, find its seat card on your account page and choose Add a remote. Confirm it's you, then scan with the phone; the target computer's terminal isn't needed. Confirm either way: with your passkey (none on this computer? choose Use a phone or tablet in the prompt and confirm on your phone), or with that computer's remote pairing password. After a passkey confirmation, the same session doesn't ask again for ten minutes; the QR expires after five minutes and adds one device. Pending devices can also be reviewed and approved on the seat card. Under More on the seat card, See what the computer is waiting on you for is only for two cases: resuming after Stop everything, or enabling a scheduled task the Agent created. It has nothing to do with seats or billing; an unpaid bill never stops the tasks on your computer.

Account-page pairing is on by default. The target computer’s owner can disable it with `agentj remote-pair off`. Offline hosts are never queued; turn them on and try again. Older hosts must run `agentj update apply` or update from a paired phone. Devices record “Added from account page” and other remotes receive a notice.

This route trusts the signing control plane. Pairing material is encrypted to an ephemeral browser key and its plaintext is never stored by the backend; compromise of the signing service could still add a device. The remote pairing password is stored only on that computer, as a hash. When you type it on the account page, the browser first encrypts it to a one-time public key that computer just handed out; only that computer can open and check it. Our servers pass on ciphertext they can't read and keep nothing. Five wrong tries in a row lock it on that computer for a while.


### Claude phone delivery and service login

Shared Claude takes phone messages without confirming each one on the computer. When you select it, when Agent J
starts and in `agentj doctor`, Agent J checks the value Claude Code really uses in your work folder (organization
policy, then the folder's private `.claude/settings.local.json`, then its `.claude/settings.json`, then your
`~/.claude/settings.json`). A hold in your user or private local settings is switched to accept where it is; a hold
in the shared project file is overridden from your private local layer, never by editing the team file. Organization
policy, `refuse` and your own `agentj config claude-inbound off` are only reported. Settings are backed up first.
A Claude Code session started before the change keeps the old setting until you run /clear in it or start a new one.
If the phone reports an unacknowledged message, it names the reason: organization policy, project settings, you
turned it off, the session needs /clear, or the computer is busy. Check the computer before sending again because
the original may still arrive. `agentj config claude-inbound on|off|status` changes or shows the effective setting.
On macOS/Linux, Claude makes the auth frame optional; Agent J always sends the local peer token authentication frame. Other processes of the same user can also send.

Shared mode uses your live desktop session login. Before switching to independent mode, Agent J checks that the
service has a login; otherwise it keeps shared mode. Run `claude` and /login in a computer terminal (Keychain on
Mac), or `claude setup-token` and write the token yourself in the service's private 0600 env file: Linux
`~/.config/systemd/user/agentj.env`, Mac `~/Library/LaunchAgents/net.agentj.host.env`. Never paste it into chat.
An older Mac service needs `agentj service install` once to add the env-file path; then restart with
`agentj service restart` after changing the env file. Token values are never embedded in the LaunchAgent plist.

No need to go back to the computer when a login expires: phone Settings → Emergency repair → ③ AI account signed out → AI login rescue signs it in again (Codex device
code; Claude authorize link, the code only into the secret card). A long-lived Claude token stored from the phone has its
date written down; one year on is its expiry, you are reminded on day 7, 3 and 1 before it, and Renew now replaces it after
one approval on the phone — only once the new token passes a live check, otherwise the old one stays. Logins without a fixed
expiry (subscription /login, Codex's ChatGPT sign-in, provider keys) get one very short tool-free test message a day; a
failure is reported at once.

## Shared Claude model and quota bars

Selecting shared Claude also turns these bars on: the phone shows the same model, effort, weekly/5-hour quota and context readings, and tells you once. If you run `agentj config claude-statusline off`, that choice is remembered and it is never switched back on by itself. The original status-line command receives the same input and keeps its output. Settings are backed up and written atomically; `off` restores the original value exactly (a private local file created only for the tap is removed) and refuses to overwrite later edits. Only matching-session measurements are used; the phone reports their age even after reconnect. An organization policy that sets the status line is never changed; `agentj doctor` reports it.

The tap goes into the settings layer Claude Code really uses for your work folder; an existing local or project status line is chained from your private local layer and keeps running. If a higher layer hides it, `status` says `shadowed`, `agentj doctor` names that layer and the phone shows `—`; `agentj config claude-statusline on` (and the next start, unless you turned it off) chains it again at the layer in effect. The model/effort label and `/model <name> [effort]` switch the shared session through Claude Code's own `/model` picker, for this session only, when the desktop is idle; success needs the session's own status line to show the new model, and `/cost` shows Claude Code's own cost for the session. To give the main Agent your own standing rules, point `agent.private_instructions_file` at one local text file: it is appended after the core identity as text only and grants no permission; check it with `agentj config private-instructions status`.


Upgrade recovery runs in a separate service-manager job, so it continues after the calling session exits: a systemd user task on Linux and a one-shot launchd task on macOS. A failed recovery appears in doctor and on the phone at the next start. Run `agentj service start`, then `agentj doctor`. `agentj service stop` stops the background service while retaining its installation; `start` installs it if needed.


For Codex failures, follow the phone guidance: tap the top model name to replace an account-unsupported model (temporarily disabled until an account refresh); check your proxy/VPN for ChatGPT connection failures; run `codex login` on the computer when login expires. Redacted native errors remain under Details.


[Set up AI command-line tools](/docs/setup-agents/) · [agentj command reference](/docs/cli/)

[Keep your computer awake](/docs/keep-awake/): commands, system settings and a request to send your Agent.

[Agent J's own browser and staying signed in](/docs/browser-automation/): sign-ins, the daily check, the phone QR card and "good morning".

## Kimi Code {#kimi}

- `agentj agent kimi --dir <folder>`: connect Kimi Code CLI (`kimi` 2.2.0+). Add `--region global` when the Kimi membership is on kimi.ai; the default is kimi.com (`--region mainland-cn`). Independent session only.
- `agentj agent switch kimi`: the guarded switch from another tool (checked first, switched back on failure) — see [Switch AI coding tool](/docs/switch-harness/).
- `agentj agent detect` lists Kimi Code with its version and whether a login exists; `agentj doctor` also names allow rules in `~/.kimi-code/config.toml` that would run without a phone card.
- Sign in with `kimi login --region mainland-cn` (or `global`) in your own terminal, or from the phone's AI login rescue (device code).

## Qwen Code {#qwen}

- `agentj agent qwen --dir <folder>`: connect Qwen Code (`qwen` 0.25+); add `--model qwen3.8-flash` to save Credits. Independent session only.
- `agentj agent switch qwen`: the guarded switch from another tool — see [Switch AI coding tool](/docs/switch-harness/#qwen).
- `agentj agent detect` lists Qwen Code with its version and whether a key or your own settings exist; `agentj doctor` also counts `permissions.allow` rules in `~/.qwen/settings.json` that would run without a phone card.
- The key: `agentj provider bailian` prints the phone key card (`BAILIAN_TOKEN_PLAN_API_KEY`); see [Bailian Token Plan](/docs/setup-agents/#bailian).

## DeepSeek dsh {#dsh}

- `agentj agent dsh --dir <folder> --base-url https://<server>/v1 --model <model id>`: connect DeepSeek's coding agent dsh (`DeepSeek Harness` 0.2.0-rc.2+, a developer preview) to an Olares Router or any OpenAI-compatible server. Without `--base-url` it uses your own dsh setup or a DeepSeek API key. Independent session only.
- `agentj agent switch dsh`: the guarded switch from another tool — see [Switch AI coding tool](/docs/switch-harness/#dsh).
- `agentj agent detect` lists dsh with its version and whether a route or login exists; if a file in `~/.dsh` would change dsh's approvals or plugins, Agent J does not start it and `agentj doctor` names the file — move it aside.
- The key: if the server needs one, the Agent sends a phone key card (`DSH_ROUTER_API_KEY`; DeepSeek's own API: `DEEPSEEK_API_KEY`); see [DeepSeek dsh](/docs/setup-agents/#dsh).
