ChatGPTClaudeGrok / X / CursorGemini

DeepSeek Harness Terminal vs Bash vs Jobs: How to Choose

Configuration & UsagePublished 2026-11-18Author: DeepSeek Plugin Market
DeepSeek HarnessDSH pluginterminalPTYbackground jobs
The DeepSeek Harness terminal, Bash, and jobs are three execution models: persistent PTY, one-shot process, and reclaimable task. Choose by state and lifecycle.

Terminal, Bash, and jobs are not three similar tools; they are three execution models: persistent PTY, one-shot process, and reclaimable task. Choosing wrong rarely errors; it produces “the command ran but state vanished,” “the task runs but output is missing,” or “I cancelled but the process lives.” Separate the models before writing the command.

DeepSeek Harness: Three execution models

The difference is how long state lives and who owns the lifecycle. Compare (source):

ModelStateLifecycleEntry
TerminalPersistent shell, environment, cwdHeld by the terminal sessionterminal_open/send/read
BashNew process per call, no cross-command stateHeld by the callbash
JobsProcess or task running in backgroundHeld by ctx.jobsrun_in_background + job_*

The terminal is about continuity: the previous cd, environment, and shell functions remain. Bash is about isolation: every call starts clean. Jobs are about reclaimability: the call returns and job_* reads or stops the work.

They combine: a terminal can start a background job, or bash can use run_in_background. When combining, decide who owns state, or two lifecycles fight.

DeepSeek Harness: Choose by requirement

Choose by requirement, not habit. The table (source):

RequirementRecommendationReason
Several commands, keep cd/envTerminalPersistent PTY keeps state
One command, run and leaveBashClean isolation, low overhead
Command outlives the callJobsHandle and later read
Interactive input or TUITerminalPTY supports interaction
User needs progressJobsOutput and status readable
Strict isolationBashNew process each time

Rows one and four mix easily. A terminal supports interaction but is poor for a one-off that must be absolutely clean; bash is clean but cannot keep state.

Rows three and five mix too. Jobs are not “faster bash”; they are “longer-lived tasks.” A command that ends in seconds gains only read and cleanup overhead.

DeepSeek Harness: Four examples

Four examples cover most choices; use the closest. Each explains why not the alternative (source):

  1. Install dependencies and run tests — Bash. One command chain, run and leave; no shell state needed.
  2. Debug one REPL continuously — Terminal. Variables, imports, and current directory must persist; bash resets each call.
  3. Start a development server — Jobs. It runs long, the call returns, and logs or stop are needed later.
  4. Keep a shell on a remote machine — Terminal. Persistent session and interaction; one-shot commands cannot keep connection state.

The shared rule is “lifecycle first, command second.” The same npm test can be Bash once, Jobs for a watcher, or Terminal for repeated interaction.

If a task needs both persistent state and background execution, start the background process from the terminal and read with the terminal's output cursor; do not run two background managers.

DeepSeek Harness: State and persistence

Who owns state decides switching, cancellation, and reconnection. The differences (source):

  • Terminal — state lives in the PTY session; closing loses it, and reconnecting may not restore the same shell.
  • Bash — state lives only in the one process; no “previous directory.”
  • Jobs — state lives in the task runtime; after completion or reclamation only output remains, and cancellation uses the job's own signal.

These explain apparent bugs: cd in bash followed by a new call returns to the original directory; closing a terminal panel loses environment variables; a cancelled job still has output.

Persistence also affects security. Terminal PTY bytes stay in the process; job output may enter logs or spill. For secrets, prefer the terminal and do not background sensitive output.

DeepSeek Harness: Migration notes

Moving from Bash to terminal or jobs requires four checks. Do not just rename the tool (source):

  1. State — the terminal keeps state, bash does not; commands may rely on a previous directory or variable.
  2. Cancellation — terminal closes or interrupts a session; jobs use the task signal; bash uses the process signal.
  3. Output — terminal reads new output by cursor; jobs use job_output; bash returns directly.
  4. Permissions — all three obey sandbox and approval, but trigger points can differ.

The most common migration bug is “it works in the terminal, fails in bash,” usually a missing environment variable or directory. The reverse, “bash works, terminal hangs,” is usually an interactive command waiting for input.

Migrate one command at a time and verify state, cancellation, output, and permissions before widening.

DeepSeek Harness: Four execution checks

Verify with four steps, not only command success. Four checks (source):

  1. State — two commands in a row; the second sees the first directory or variable (terminal) or does not (bash).
  2. Cancellation — start a long command, cancel, and confirm the process or session stops with no leftover.
  3. Output — read output and confirm the cursor or job_output returns only new content.
  4. Permissions — write outside the workspace and confirm approval or rejection matches the preset.

All four mean the model and implementation align. Passing only the first often hides incomplete cancellation; passing the first two often hides duplicated or missing output.

The existing develop-terminal-subsystem covers the terminal API, configure-background-jobs covers job config, and develop-jobs-output-ring covers the output ring; this article covers the choice. Decide who owns state, then pick the tool.

ChatGPTClaudeGrok / X / CursorGemini

FAQ

What is the main difference between the DeepSeek Harness terminal and Bash?

The DeepSeek Harness terminal is a persistent PTY that keeps shell state across commands; bash starts a one-shot process per call and keeps no shell state. Use terminal for continuity, bash for one-offs.

When should a DeepSeek Harness command use jobs instead of the foreground?

Use DeepSeek Harness jobs when a command must outlive the current call, be inspected while running, or be collected later. Commands that finish in seconds stay in the foreground.

Are the DeepSeek Harness terminal tools enabled by default?

DeepSeek Harness does not work that way. The six DeepSeek Harness terminal tools are opt-in and supplement one-shot bash and filesystem tools; when not enabled, the model does not see them.

What changes when moving from Bash to the DeepSeek Harness terminal?

State changes most: the DeepSeek Harness terminal keeps shell state, environment, and current directory, while bash starts fresh each time. Cancellation and output reading differ too.

Related Terms

PTY
A PTY is a pseudo-terminal; the DeepSeek Harness terminal uses one for a persistent shell session with state, environment, and interactive output.— DeepSeek Harness reference - PTY sessions
one-shot command
A one-shot command starts a new process per call and keeps no previous shell state; the DeepSeek Harness bash tool works this way.— DeepSeek Harness reference - Bash execution
background job
A background job is a DeepSeek Harness execution unit managed by ctx.jobs that can outlive the call and be read or stopped later.— DeepSeek Harness reference - Background jobs
output cursor
An output cursor is a position marker for reading new output from a persistent DeepSeek Harness terminal or job without repeating earlier content.— DeepSeek Harness reference - PTY sessions

Sources