DSHREM on a phone: SSH, tmux, and safe task handoff
Practice reaching a project shell from a phone, keeping a remote terminal session alive, and choosing the right tool for each task. This lesson uses ordinary SSH and tmux commands, then contrasts a shell command, a Codex session, and a DSHREM job.
🎯 For Operators using a phone terminal or VS Code to reach a remote project
- Reconnect to a named tmux session without losing track of its project directory
- Separate shell inspection, Codex assistance, and DSHREM worker jobs
- Recover deliberately after SSH, app, or pane interruption
Practice
Lesson 1 — reach the right shell
Goal: connect from Termius to the intended host and confirm the directory before issuing a command. The menu labels and keyboard layout can differ by Termius version and phone; use the saved host profile and its configured authentication rather than copying credentials into shell history.
Exact commands after SSH connects:
whoami
hostname
pwd
cd /root/ai-os-workspaces/ai-os
pwd
git status --short
Expected result: whoami and hostname identify the remote account and host; pwd prints the project directory; git status --short shows the existing work. Treat every pre-existing modified or untracked path as protected. This is the operator’s known AIOS folder on this host. Inspect it read-only, then create a separate worktree before changing code.
Common mistake: pasting a multi-line block into a narrow mobile terminal and not seeing where one command ends. Paste a short command at a time, wait for the prompt, and check output before continuing. If a paste includes secrets, stop and rotate them according to the owner's process; do not echo them back for diagnosis.
Lesson 2 — keep the shell after the phone disconnects
Goal: create a named tmux session, list it, open a window, detach, and reattach. The observed host has tmux 3.4, global prefix Ctrl-b, destroy-unattached off, and status enabled. Those are host observations, not defaults guaranteed on another server.
Exact commands in the SSH shell:
tmux new-session -s course-phone
tmux list-sessions
Remove the leading space before tmux if your shell treats it unexpectedly. Inside tmux, press Ctrl-b, release both keys, then press c to create a window. Ctrl-b n and Ctrl-b p move between windows. Detach with Ctrl-b d, or from another shell run tmux attach-session -t course-phone to return. Use tmux list-windows -t course-phone to inspect window names and indexes.
Expected result: list-sessions shows course-phone; after reconnect, attach-session returns to the same server-side session and project shell. Open a second window and run pwd there to see that each window has its own shell state.
Common mistake: tmux attach says “no sessions” or “no server running.” First check tmux list-sessions; if the session is absent, the tmux server ended or the session name differs. Start a new named session and recover the task from its files and logs. Do not assume the app closing killed a remote process, and do not assume a disconnected SSH session guarantees that an unwrapped foreground process survives.
Lesson 3 — choose the execution surface
Goal: decide whether the next action is a direct shell command, a subscription Codex task, or a DSHREM worker task. They have different authority and cost paths.
Exact commands for a local inspection:
git status --short
rg -n "setting_name" path/to/source
For a subscription Codex CLI help check, which does not call a model:
codex --help
A real Codex task consumes subscription quota. The subscription watchdog has a separate paid API route only after verified exhaustion and explicit opt-in; authentication or network failure does not authorize fallback. DSHREM worker calls may use paid API routes and require their own explicit budget and route. Do not turn a sample command into a live call without current authorization.
Expected result: shell inspection returns text without an LLM; Codex help prints command usage; a separately authorized DSHREM task creates its own receipt. The current subscription auto path is Haiku, not a new subscription route. Do not infer the served model from the requested alias.
Common mistake: treating a command typed inside tmux as automatically persistent or automatically billed as a subscription. tmux preserves a terminal session; it does not choose the execution route, authorize spend, or checkpoint a worker request.
Check yourself
Without running a model, write down (1) the host and project directory, (2) the tmux session name, (3) one command safe to run directly, and (4) whether your next AI task is subscription or API billed. If quota status is unknown, do not label it exhausted. If a command's receipt is missing, mark the outcome unknown and reconcile before retrying. Navigation continues with owner worktree practice and then economy swarm practice.
When this does not work
If SSH fails, verify the saved host, network, and authentication configuration in Termius; do not paste a private key into chat. If the terminal keyboard hides Ctrl, use the app's documented modifier-key control for your installed version. If paste changes quoting, inspect the command before pressing Enter. If tmux reports an existing session, list and attach rather than creating a duplicate name. If attach reports no session, inspect task artifacts and process status before restarting work. A shell prompt returning does not prove an external job succeeded. In a VS Code Remote SSH terminal, repeat whoami, pwd, and git status --short after opening the project; it is a separate SSH client from Termius, so do not assume it attached to the same tmux session. Use tmux attach-session -t course-phone in either client to deliberately share that session.
Evidence
Observed on 8 November 2026 UTC: tmux -V returned 3.4. tmux show-options -g reported prefix C-b, and global window options reported destroy-unattached off; window options also showed remain-on-exit off. codex --help printed CLI usage without submitting a prompt. These checks establish only the local tool/version output. Termius device behavior and remote-phone reconnection were not tested. The current subscription router source says subscription first, and API fallback requires verified exhaustion plus --api-fallback; no model task was run for this course.
Next
Complete owner worktree practice before allowing an agent to edit project files. Then use economy swarm practice to understand worker receipts and bounded retries. For background on task evidence and durable context, see AI judging and agent memory and context engineering.
Sources
-
Cost per accepted task helps compare accepted work with full-cycle costs.
-
scripts/dshrem_subscription.py— subscription-first routing, scoped cwd and explicit API fallback gate. scripts/subscription_watchdog.py— subscription quota probe and watchdog behavior.- Host observations collected 8 November 2026 UTC:
tmux -V,tmux show-options -g,tmux show-options -gw, andcodex --help. - Task source verification explains how to separate an observed receipt from an assumption.
🔗 Article connections
Open the full knowledge graph ↗Published article links. Select a node to open its article at the heading.
Show the connection graph
Article links · keyboard / text view
Same topic
- Tvijo agent system: PRIZMA, RUNLEDGER and acceptance
- Read agent communication receipts without mistaking delivery for a human read
- Audit an AI technology radar against primary sources before promoting a story
- Run an AI coding harness evaluation offline before any live pilot
- DSHREM owner practice: cwd, worktrees, WIP, and root boundaries
- DSHREM economy swarm: checkpoints, routes, and real cost evidence
Next steps
Related reading
Tvijo agent system: PRIZMA, RUNLEDGER and acceptance
Tvijo is developing a controlled workflow from a repository task to an accepted result, with permissions, resource limits and attributable evidence. PRIZMA describes the intended resource profile; RUNLEDGER connects the work to its checks a…
AI and process foundationRead agent communication receipts without mistaking delivery for a human read
Find the current stage of a swarm message without confusing durable storage, delivery, runtime receipt and viewing. This guide connects local checks, the private observation screen and distinct receipts, so a delivery acknowledgement does not become an unsupported claim that an action completed.
AI and process foundationAudit an AI technology radar against primary sources before promoting a story
Check a technology news item against its primary source, version and event date before deciding to adopt it. This guide follows a fixed ten-item sample, separates facts from interpretation and forecasts, and preserves limitations and the condition for checking the claim again.
💬 Comments