DeepSeek Harness: Four Running Modes
Last updated: 2026-08-31
DSH's four running modes are like a car's different driving modes — economy, sport, off-road, track — same car, different personality. Choose the right mode and the Agent behaves exactly as you expect; choose the wrong one and it's either too conservative or runs out of control.
📋 Prerequisites: Completed 04-model-config.md, model configured and available
1. What You'll Learn
- Design philosophy and behavioral differences of the four running modes
- Standard mode's autonomous decision-making mechanism
- PTC mode's Plan-then-Code flow
- Minimal mode's minimal tool call strategy
- Creative mode's exploratory output characteristics
- Applicable scenarios and switching methods for each mode
2. Mode Overview
(1) ▶ Example 1
graph TB
INPUT[User Input] --> MODE{Select Mode}
MODE --> STD[Standard Mode<br/>Agent Autonomous Decision]
MODE --> PTC[PTC Mode<br/>Plan First, Then Execute]
MODE --> MIN[Minimal Mode<br/>Fewest Tool Calls]
MODE --> CRE[Creative Mode<br/>Exploratory Output]
STD --> ACTION1[Autonomous Tool Selection<br/>Autonomous Step Decisions]
PTC --> ACTION2[Output Plan First<br/>Execute After User Confirms]
MIN --> ACTION3[Prefer Own Knowledge<br/>Call Tools Only When Necessary]
CRE --> ACTION4[Free Association<br/>Encourage Creativity and Exploration]
(2) One Comparison Table to Understand All Four Modes
| Dimension | Standard | PTC | Minimal | Creative |
|---|---|---|---|---|
| Tool Calls | Agent decides autonomously | Declared in plan | Minimized | Free to use |
| User Control | Moderate (approval) | High (confirm plan) | High (few operations) | Low (free expression) |
| Output Certainty | Moderate | High | High | Low |
| Speed | Moderate | Slower (two-step) | Fastest | Uncertain |
| Use Cases | General programming | Complex tasks | Simple Q&A | Creative writing |
| Temperature | 0.7 | 0.3 | 0.2 | 1.0+ |
| Token Consumption | Moderate | Higher | Lowest | Higher |
3. Standard Mode
(1) How It Works
Standard mode is DSH's default mode. After receiving a user instruction, the Agent autonomously analyzes which tools are needed and what operations to execute, following its best judgment:

🤖 Agent:
🔍 Using tool: search
→ Searching for src/utils/format.ts
🔍 Using tool: file_edit (read)
→ Reading src/utils/format.ts
📝 Using tool: file_edit (create)
→ Creating src/utils/date-format.ts
📝 Using tool: file_edit (edit)
→ Updating src/utils/format.ts (removing date functions)
📝 Using tool: file_edit (edit)
→ Updating imports in src/index.ts
✅ Done! Date formatting function extracted to src/utils/date-format.ts
(2) Autonomous Decision Logic
In Standard mode, the Agent's decision chain:
graph TD
INPUT[User Instruction] --> ANALYZE[Analyze Intent]
ANALYZE --> PLAN[Internal Step Planning]
PLAN --> DECIDE{Need Tools?}
DECIDE -->|Yes| EXEC[Call Tools]
DECIDE -->|No| RESPOND[Reply Directly]
EXEC --> CHECK{Done?}
CHECK -->|No| PLAN
CHECK -->|Yes| RESPOND
(3) When to Use Standard Mode
- Daily programming tasks (writing code, fixing bugs, refactoring)
- Tasks where you're unsure how many steps are needed
- When you want the Agent to handle details autonomously
- Most routine work
4. PTC Mode (Plan-then-Code)
(1) How It Works
PTC mode divides Agent behavior into two steps:

- Plan Phase: The Agent analyzes the task and outputs a detailed plan without executing any operations
- Code Phase: After the user confirms the plan, the Agent executes it step by step
👤 Bob: Add a user authentication system to the project, supporting JWT
🤖 Agent (Plan Phase):
📋 Execution Plan:
1. Install dependencies: jsonwebtoken, bcryptjs
2. Create src/auth/jwt.ts — JWT signing and verification
3. Create src/auth/middleware.ts — Authentication middleware
4. Create src/routes/auth.ts — Login/register routes
5. Modify src/app.ts — Register routes and middleware
6. Add environment variable JWT_SECRET
Estimated: 5 files modified, 3 files created.
Execute this plan?
👤 Bob: Execute, but skip step 1 — dependencies are already installed
🤖 Agent (Code Phase):
📝 Step 2: Creating src/auth/jwt.ts...
📝 Step 3: Creating src/auth/middleware.ts...
📝 Step 4: Creating src/routes/auth.ts...
📝 Step 5: Editing src/app.ts...
📝 Step 6: Adding JWT_SECRET to .env.example...
✅ Authentication system added!
(2) PTC Plan Format
PTC mode outputs plans containing:
interface PTCPlan {
steps: PlanStep[];
estimatedFiles: { created: number; modified: number; deleted: number };
riskLevel: 'low' | 'medium' | 'high';
reversible: boolean;
}
interface PlanStep {
id: number;
description: string;
tool: string; // Tool to use
files: string[]; // Files involved
dependsOn: number[]; // Prerequisite steps
}
(3) ▶ Example 3
graph TD
INPUT[User Instruction] --> PLAN[Agent Outputs Plan]
PLAN --> REVIEW[User Reviews Plan]
REVIEW -->|Confirm| EXEC[Agent Executes]
REVIEW -->|Modify| MODIFY[User Modifies Plan]
MODIFY --> EXEC
REVIEW -->|Reject| CANCEL[Cancel Execution]
EXEC --> STEP[Step-by-step Execution]
STEP --> DONE{All Complete?}
DONE -->|No| STEP
DONE -->|Yes| RESULT[Output Results]
(4) When to Use PTC Mode
- Complex tasks (5+ steps)
- Modifying critical code (database, authentication, payments)
- Unsure if the Agent understands correctly; want to see the plan first
- Code refactoring, architecture changes
- Need auditable operation records
5. Minimal Mode
(1) How It Works
In Minimal mode, the Agent minimizes tool calls, preferring to answer questions using its own knowledge:

🤖 Agent:
Promise is an object representation of async operations; async/await is syntactic sugar for Promises:
1. Promise uses .then() chaining:
fetchData().then(data => process(data)).catch(err => handle(err));
2. async/await uses synchronous-looking syntax:
const data = await fetchData();
process(data);
Key differences:
- Promise is an object; async/await is syntax
- await can only be used inside async functions
- async functions always return Promises
- Error handling: .catch() vs try/catch
Note: The Agent didn't call any tools — it answered directly from knowledge.
(2) ▶ Example 2
graph TD
INPUT[User Instruction] --> EVAL{Can answer from knowledge?}
EVAL -->|Yes| RESPOND[Reply Directly]
EVAL -->|No| TOOL[Call Minimal Necessary Tools]
TOOL --> RESPOND
(3) Minimal Mode vs. Standard Mode Comparison
| Scenario | Standard Mode | Minimal Mode |
|---|---|---|
| "What is a closure?" | Might search for closure examples in the project | Directly explains the concept |
| "Write a sort function" | First searches project code style, then writes | Directly writes a general implementation |
| "How to fix this bug?" | Reads files, searches related code | Gives a general solution first; reads files only if user asks |
(4) When to Use Minimal Mode
- Knowledge Q&A (no file operations needed)
- Quick advice or solutions
- Don't want the Agent to "go overboard"
- Saving token consumption
6. Creative Mode
(1) How It Works
Creative mode gives the Agent the highest freedom, encouraging exploratory and creative output:
👤 Alice: Design a unique 404 page for me
🤖 Agent:
🎨 I'll design an interactive 404 page — using Canvas to draw an asteroid field where users can move the mouse to dodge meteors!
📝 Using tool: file_edit (create)
→ Creating src/pages/404.html
🎨 Features:
- Canvas-rendered dynamic starfield background
- Mouse-controlled spaceship movement
- Random meteor generation and collision detection
- Increasing difficulty over time
- After collision, shows "You found 404!" and redirects to home
🔧 Additional ideas:
- Add sound effects using Web Audio API
- Mobile touch support
- Score leaderboard (localStorage)
(2) Creative Mode Characteristics
| Characteristic | Description |
|---|---|
| High Temperature | More random, more diverse output |
| Free Association | Proactively offers additional suggestions and ideas |
| Beyond Instructions | Thinks beyond the scope of the user's request |
| Encourages Exploration | Tries unconventional approaches |
| Longer Output | Usually produces more content than other modes |
(3) Applicable Scenarios for Creative Mode
graph LR
A[Creative Writing] --> CRE[Creative Mode]
B[UI/UX Design] --> CRE
C[Brainstorming] --> CRE
D[Prototype Exploration] --> CRE
E[Learning New Frameworks] --> CRE
(4) Creative Mode Caveats
- Output is uncontrollable — may deviate from the original requirement
- Not suitable for precise code modification tasks
- Not suitable for scenarios requiring deterministic results
- Token consumption is typically higher
7. Mode Switching and Combination
(1) Switching Methods
Web UI Switching:
Top control bar → Mode dropdown → Select target mode
CLI Switching:
# Specify at startup
npx @deepseek-ai/dsh cli --mode ptc
# Switch during session
/mode creative
Default Mode in Configuration:
# dsh.config.yaml
default_mode: ptc
(2) Mode Combination Strategy
In practice, different phases can use different modes:
Project Planning Phase → PTC Mode (plan first)
↓
Implementation Phase → Standard Mode (autonomous execution)
↓
Troubleshooting → Minimal Mode (quick Q&A)
↓
UI Design → Creative Mode (explore ideas)
(3) Best Mode-Model Combinations
| Task | Recommended Mode | Recommended Model | Reason |
|---|---|---|---|
| Code writing | Standard | deepseek-coder | Code model + autonomous decision |
| Complex refactoring | PTC | deepseek-reasoner | Reasoning model + plan confirmation |
| Technical Q&A | Minimal | deepseek-chat | General model + quick answers |
| Creative design | Creative | gpt-4o | High creativity + diverse output |
| Bug debugging | Standard | deepseek-coder | Code understanding + tool usage |
8. Mode Implementation Principles
(1) Mode Configuration Structure
interface ModeConfig {
name: string;
allowTools: boolean;
requirePlan: boolean;
temperature: number;
maxToolCalls: number | null;
systemPromptExtra: string;
}
const MODES: Record<string, ModeConfig> = {
standard: {
name: 'standard',
allowTools: true,
requirePlan: false,
temperature: 0.7,
maxToolCalls: null,
systemPromptExtra: 'You have full autonomy to use tools as needed.'
},
ptc: {
name: 'ptc',
allowTools: true,
requirePlan: true,
temperature: 0.3,
maxToolCalls: null,
systemPromptExtra: 'Always create a plan first. Do not execute until the user confirms.'
},
minimal: {
name: 'minimal',
allowTools: true,
requirePlan: false,
temperature: 0.2,
maxToolCalls: 1,
systemPromptExtra: 'Minimize tool usage. Prefer answering from knowledge.'
},
creative: {
name: 'creative',
allowTools: true,
requirePlan: false,
temperature: 1.0,
maxToolCalls: null,
systemPromptExtra: 'Be creative, explore unusual approaches, think beyond the obvious.'
}
};
(2) How Modes Affect System Prompt
Each mode appends additional instructions at the end of the System Prompt to guide Agent behavior:
Standard mode appends:
"Use tools freely when they help accomplish the task."
PTC mode appends:
"Before any action, output a numbered plan. Wait for user confirmation before executing."
Minimal mode appends:
"Answer from your knowledge first. Only use tools when absolutely necessary."
Creative mode appends:
"Think creatively and explore novel approaches. Offer additional ideas beyond the request."
❓ FAQ
📖 Summary
- Four modes: Standard (autonomous decision), PTC (plan then execute), Minimal (fewest tools), Creative (exploratory output)
- Standard mode is the default choice, suitable for 80% of scenarios
- PTC mode provides precise control through the Plan → Confirm → Execute flow
- Minimal mode prefers knowledge-based answers, saving tokens
- Creative mode offers high freedom, suitable for creativity and exploration
- Real projects can combine different modes at different phases
- Modes influence Agent behavior through Temperature, System Prompt, and tool strategy
📝 Exercises
1. ⭐ Basic: Ask the Agent the same question in all four modes: "Write a quicksort function," and compare the output differences (tool call count, output length, code style).
2. ⭐⭐ Intermediate: Use PTC mode to complete a 5+ step task (e.g., "Add a logging system to the project"). Record the Agent's plan content, manually modify the plan (delete or adjust steps), and observe the execution results.
3. ⭐⭐⭐ Challenge: Design a "mode combination plan" — select the most appropriate mode for each phase of a complete Web development project (from design to deployment), and use a Mermaid flowchart to show mode switching timing and reasons.