Do dsh web and terminal share sessions? Resume and seq gap

Configuration & UsagePublished 2026-09-24Author: DeepSeek Plugin Market
DeepSeek HarnessDSH plugindsh websession managementresume
dsh web and the terminal share one $DSH_HOME, so a browser session is still in the terminal. Covers session logs, --resume handoff and the seq gap risk.

dsh web and the terminal work on the same session data — a session you opened in the browser can be found in the terminal; but one session cannot be open in both places at once. The only criterion is that they all point at the same $DSH_HOME. This article covers where sessions live, how to hand off between ends, and why double-opening corrupts a session.

Overview: dsh web and the terminal share one data set

The web UI and the terminal are not two data sets but two front ends over one $DSH_HOME. Session logs land as JSONL files in the profile's sessions directory, which is why "switch entry points and keep going" works at all (source). What really needs care is concurrent writing: two instances opening the same session write a sequence gap and corrupt the session outright.

DeepSeek Harness web UI and terminal share one set of sessions: $DSH_HOME is the single source of truth

Sessions, configuration and plugins all live in $DSH_HOME (default ~/.dsh), independent of how you launch, so the web UI started with npx, a globally installed web UI and terminal apps all see the same batch of data. Switching entry points does not lose sessions, which is also why your history is still there after you launch with a different command in the same environment (source).

Two key ownership rules:

  1. Sessions belong to a profile: each profile has its own directory and dependencies, and session data follows the profile;
  2. Sessions are grouped by working directory: the project directory name is transcribed from the working directory at session creation time, in the form --<project-path>--; sessions with no working directory land under _no-cwd/.

First, locate your session files

The only entry point for locating sessions is the profile's sessions directory — find it first, and every later operation has somewhere to land. Session logs are stored as JSONL append files under the session storage path in the profile data directory, defined by session-persistence-jsonl (source).

  1. List that profile's session directory:
bash
ls -la ~/.dsh/profiles/<profile>/sessions

Expect: directories grouped by project (of the form --<project-path>--) and the session files inside them; 2. Confirm the file format. Expect: the default is session.jsonl.zstd (zstd-compressed, with checksums); when compression is configured as none it is session.jsonl; 3. Decompress before reading if you need to check the contents. Expect: you can read the session events appended one by one; do not edit this file directly with an editor.

Continue a dsh web session from the terminal

Terminal apps ship their own --resume flag, so pointing it at a session id continues that session; note that --resume belongs to the app being started, not to the dsh launcher. The official CLI README draws that boundary between launcher flags and app flags explicitly (source).

  1. Find the target session in the Web UI and note its session id;
  2. Hand off with the terminal app of the matching profile:
bash
dsh --profile tui --resume <session id>      # requires the tui profile

Expect: the terminal loads that session's history and you can keep the conversation going; 3. If it reports that the profile does not exist, that terminal profile has not been created yet. Expect: export or screenshot the session content you need from the Web UI first, then decide whether to create the profile; 4. Take the flag syntax from your own machine's dsh --profile <name> --help output. Expect: you can see the resume-style flags the app itself declares.

Do not double-open one DeepSeek Harness session: this is where seq gap comes from

When two instances open the same session at once, concurrent appends write overlapping sequence numbers, and loading reports seq gap in committed region. The root cause is that each process appends with its own in-memory cursor, and the JSONL backend coordinates nothing across processes (source).

  1. Two trigger conditions stack to make it nearly certain: the same $DSH_HOME opened by two instances at once, plus an interrupted tool call in between;
  2. The error symptom. Expect: the session will not open and the log reports a sequence gap;
  3. How to avoid it. Expect: keep only one entry point operating on a session at a time; when switching ends, stop the current one first (confirm no process is listening on 3080), then open it on the other end;
  4. If it is already corrupted, back up the session file first and then work from the tail of the log; the steps are in DeepSeek Harness session log reports seq gap and will not open.

dsh archive is not delete: what the UI can do and what the filesystem can do

Archiving in the UI only hides a session; really deleting one can only be done through the filesystem. An archived session disappears from the workspace groups, Ungrouped, content search and the flat list, but neither the log file nor the workspace accounting slot is changed, and the current UI has no way to view or unarchive it (source).

  1. If you only want it out of the list → use archive. Expect: the list looks clean and the data is still there;
  2. If you want a real delete → stop dsh first:
bash
lsof -i :3080

Expect: confirm no process is listening, then move to the next step; 3. Back up, then delete the target session directory. Expect: rm -rf "$DSH_HOME/sessions/--<project>--" deletes one project; this is unrecoverable and there is no recycle bin, so back up first with cp -r "$DSH_HOME/sessions" "$DSH_HOME/sessions.bak"; 4. Restart dsh. Expect: those sessions no longer appear in the list.

dsh sessions pile up and slow the host down

Session logs only grow and never shrink, which slows session search and startup, so clean them up per project on a regular basis (source). How to tell and the order to clean:

  1. Check the volume: du -sh ~/.dsh/profiles/<profile>/sessions. Expect: the disk usage figure;
  2. Find the large project directories. Expect: you have located the session directories of projects you have finished;
  3. Back up, then clean. Expect: search and startup get light again, and you can still recover from the backup when needed.

Sources: DeepSeek Harness docs - Quickstart, dsh CLI README, session-persistence-jsonl

FAQ

Can I continue, from the terminal, a session I chatted in on the dsh web page?

Yes — the DeepSeek Harness web UI and the terminal read the same data: both point at the same $DSH_HOME (default ~/.dsh), and session logs land as JSONL in the profile's sessions directory. Terminal apps ship their own --resume flag (for example dsh --profile tui --resume <session id>), so switching between web and terminal does not lose the session content.

Which directory do DeepSeek Harness session files actually live in, and how do I locate them?

DeepSeek Harness session logs are stored as JSONL append files under the session storage path in the profile data directory, defined by session-persistence-jsonl. Locate them with ls -la ~/.dsh/profiles/<profile>/sessions: the default log file is session.jsonl.zstd (zstd-compressed, with checksums), it is session.jsonl when compression is configured as none, and sessions with no working directory land under _no-cwd/.

Can dsh web and the terminal open the same session at the same time? What happens if they do?

It is not recommended — a DeepSeek Harness session opened by two instances at once gets corrupted: when two processes open the same DSH_HOME and write the session log concurrently, each appends with its own in-memory cursor and the JSONL backend has no cross-process coordination, so the seqs written overlap and loading reports seq gap in committed region — the session is corrupted. The trigger is "the same DSH_HOME opened by two instances at once" plus "an interrupted tool call in between", and the two together make it almost certain.

There is no delete button in the dsh UI — how do I delete just one session?

All the dsh UI can do is archive: an archived session disappears from the groups and from search results, but neither the session log file nor the workspace accounting slot is touched, and the current UI has no way to view or unarchive it. A real delete has to go through the filesystem: stop the running dsh first, then delete the session file under the matching project directory, and restart for it to take effect.

Will an ever-growing pile of sessions slow down dsh startup and session search?

Yes — DeepSeek Harness session logs only grow and never shrink, and oversized sessions slow down session search and startup. Clean the session directories of finished projects on a regular basis, back up the whole directory before cleaning, and do not casually delete the entire $DSH_HOME — your configuration and plugins live there too.

Related Terms

session log (JSONL)
A session log is an append-only file in which DeepSeek Harness records conversations and tool calls, stored in JSONL format under the sessions path of the profile data directory and defined by the session-persistence-jsonl package; it is written to disk as session.jsonl.zstd by default.— DeepSeek Harness official repository
--resume
--resume is the flag terminal apps use to continue a past session, and it belongs to the app being started rather than to the dsh launcher; the syntax is dsh --profile tui --resume <session id>, and the matching profile must already be installed.— dsh CLI README
$DSH_HOME
$DSH_HOME is the DeepSeek Harness user data directory (default ~/.dsh) holding profiles, configuration and session data; the web UI and terminal apps share this one directory, which is why both ends see the same sessions.— dsh CLI README
seq gap
seq gap is an integrity error raised when a session log is loaded, meaning the log's sequence numbers have a hole and the committed region cannot be stitched together; a common cause is two processes writing the same session log at once, overlapping their cursors.— DeepSeek Harness official repository

Sources