Releases: sluisr/deepseek-cli
Release list
v1.3.0 — Reactive Autonomous Agents, Background Task Management & Routing Controls
DeepSeek CLI v1.3.0 — Comprehensive Release Notes
DeepSeek CLI v1.3.0 is a feature release introducing 24 optimizations, autonomous reactive execution, advanced background task management, non-interactive sudo elevation, network resilience, and enhanced UI controls.
1. Background Task Management & Reactive Agent Awakening
- 10-Second Auto-Backgrounding: Long commands exceeding 10s are automatically transitioned to background tasks (
is_background: true), releasing the terminal immediately without freezing the UI. - Reactive Agent Awakening (Zero Polling): Upon background process exit, output is captured and injected into DeepSeek when
Idle. DeepSeek synthesizes and displays the final report proactively. - Native Agent Tools (
kill_background_process&write_background_input): Provides safe PID-based process termination and interactive stdin streaming for background commands. - Mandatory Backgrounding Policy: System Prompt enforces
is_background: truefor scans (nmap), full-test runs, and heavy compilation tasks with immediate PID feedback. - Strict
sleepBan: Prohibits active polling loops (sleep 30) to prevent LLM token waste and zombie subshells. - Proactive Background Result Delivery: Instructs the model to check output files on state inquiries and report completed results immediately.
- Continuous Initial Execution: Sequences discovery (
nmap -sn) directly into deep vulnerability scans without redundant conversational pauses.
2. Autonomous Permission System: $auto & $sudo
- One-Turn Autonomous Mode (
$auto <prompt>): Promotes execution toApprovalMode.YOLOfor that turn, executing tools without confirmation prompts. - Multi-Tool Cycle Persistence: Maintains YOLO approval across all tool steps within the user's turn until returning to
Idle. - Continuation Context Inheritance: Follow-up prompts ("continue", "proceed", "go ahead") automatically inherit
$autoauthorization. - Inline Sudo Password Elevation (
$sudo:PASSWORD): Memory-only session RAM password storage paired withaskpass.cjsfor 0ms silent root command execution (nmap -sS,systemctl). Password is never sent to the LLM API. - Safe Command Auto-Approval (
read-only.toml): Diagnostic commands (ping,curl,date,whoami,git status,cat) auto-approved by default.
3. Model Routing, Shortcuts & UI Controls
- Strict Model Selection Priority: Reordered
OverrideStrategyinmodelRouterServiceto guarantee explicit user selections (flashorpro) are never mutated by the complexity classifier. - Direct Switch Commands (
/model pro&/model flash): Instant model toggling with alias support. - Dynamic Footer Reasoning Effort Badge: Real-time indicator for DeepSeek-V4-Pro (
r:low,r:medium,r:high,r:max). - Footer Task Indicator: Real-time badge in cyan displaying active background tasks (
tasks (X running)).
4. Network Resilience, Search & Shell Flexibility
- Exponential Backoff Retry (
fetchWithRetry): Automatic retry with exponential backoff and jitter upon HTTP429(Rate Limit) and503(Service Unavailable). - Idle Stream Timeout (60s): Cancels stalled SSE connections if no bytes arrive within 60 seconds.
- Optimized Native Web Search: Native server-side search via
deepseek-chatwith dynamic timeouts tailored to reasoning levels. - Unrestricted Shell Command Substitution: Enabled bash
$()and backticks for compound terminal operations.
5. Packaging, Stabilization & Metadata
- Hanging Sockets & AbortSignal Fix: Complete
AbortSignalpropagation infetchand SSE streams to eliminate zombie TCP sockets. - Clean Manual Update UX: Replaced brittle global background updates with an informative update banner.
- Guaranteed Bundle Assets: Enforced automatic copying of
README.mdandLICENSEintobundle/for NPM packages. - SEO Keywords & Author Attribution: Enriched NPM metadata and official author info (
sluisr <contact@sluisr.com> (https://sluisr.com/)).
DeepSeek CLI v1.2.0 — Agentic AI Terminal & Performance Edition
DeepSeek CLI v1.2.0 — Release Notes
DeepSeek CLI v1.2.0 is an extensive architecture upgrade and feature release, introducing native slash commands, atomic unified diff patching, server-side web search with configurable reasoning, dynamic temperature tuning for Flash models, zero-latency system authentication, and comprehensive multi-turn stability fixes for DeepSeek V4.
1. DeepSeek V4 Architecture & Reasoning Engine
Multi-Turn Chain-of-Thought (CoT) Preservation
- The Problem in Previous Versions: During multi-turn conversations involving tool calls, intermediate reasoning content (
reasoning_content) generated by DeepSeek models was dropped by upstream conversion layers. On subsequent turns, the DeepSeek API rejected the message sequence with HTTP Error 400 (Invalid tool response sequence). - The Solution in v1.2.0: Implemented
_deepseekReasoningsmuggling throughout tool execution turns and persistent disk caching in~/.deepseek/reasoning_cache.json. Reasoning context is seamlessly preserved across complex tool execution cycles.
Strict Tool Sequence Sanitization (sanitizeToolCallSequences)
- Eliminates orphaned tool response messages that lack a preceding assistant message with a matching
tool_call_id. - Automatically synthesizes cancellation responses (
Tool call was cancelled by the user.) when tool executions are aborted, ensuring DeepSeek API compliance at all times.
Dynamic Reasoning Effort Injection
- Integrated dynamic payload injection for
reasoning_effort(low,medium,high,max) andthinking: { type: 'enabled' }. - DeepSeek-V4-Pro dynamically adjusts its internal chain-of-thought token budget per request.
Streaming KV Cache Telemetry (Prompt Cache Hits)
- Added
stream_options: { include_usage: true }to streaming completions. - Handled standalone usage chunks emitted at the end of SSE streams to capture
prompt_cache_hit_tokensandprompt_cache_miss_tokens. - Accurately tracks DeepSeek's 90% prompt cache discount in
/statsand session summaries.
2. New Slash Commands
/fim <file> [<line> | <FIM_HOLE>] — Fill-in-the-Middle Code Completion
- Directly leverages the official DeepSeek Beta completions endpoint (
https://api.deepseek.com/beta/completions). - Supports marker-based completion (
<FIM_HOLE>) as well as line-number-based insertion. - Slices target files into prefix and suffix buffers, sends them to the model, and atomically updates the file with the generated code.
/prefix <text> — Chat Prefix Completion
- Routes chat requests to
https://api.deepseek.com/beta/chat/completionswith{ role: 'assistant', content: prefix, prefix: true }. - Forces DeepSeek to continue directly from a specified prefix string (e.g. ````json\n{
orexport async function`), eliminating conversational fluff and ensuring deterministic JSON or TypeScript output. - Subcommands and aliases:
/prefix clear,/prefill,/continue-from.
/balance — Live Account Balance & Credit Lookup
- Directly calls
GET https://api.deepseek.com/user/balance. - Displays real-time account status (
Active/Exhausted), available funds, topped-up balance, and promotional credits in USD or CNY without redundant metrics. - Aliases:
/wallet,/credits.
/info — Author & Community Links
- Displays author attribution for sluisr, version information, and official community links:
- Website:
https://sluisr.com/ - GitHub:
https://github.com/sluisr - YouTube:
https://www.youtube.com/@sluisr_
- Website:
- Aliases:
/author,/credits,/links.
3. Native Agent Tools & Performance
apply_patch — Atomic Unified Diff Patching
- Introduces an atomic diff-based patching tool (
packages/core/src/tools/apply-patch.ts). - Instead of rewriting entire source code files (which consumes thousands of output tokens and causes latency), DeepSeek outputs compact unified diff blocks (
*** begin patch,--- a/file,+++ b/file). - Reduces token consumption by up to 80% per modification and eliminates file corruption risks.
web_search — Server-Side Search with Deep Reasoning Control
- Migrated from client-side scraping to the native DeepSeek Responses API (
tools: [{ type: 'web_search' }]). - Configurable Search Reasoning Effort: DeepSeek's server-side search engine can be configured with
search_reasoning: low | medium | high | max, instructing the model to perform multi-step reasoning and cross-verification across crawled sources before synthesizing responses. - Generates structured grounding citations and source attribution links.
- Seamless fallback keychain key resolution via
loadDeepSeekApiKey().
Silent Zero-Latency AskPass for sudo, ssh, and git
- Created
packages/core/src/utils/askpass.ts, reading raw input directly from/dev/ttywithout echo or delay. - Injects
SUDO_ASKPASS,SSH_ASKPASS, andGIT_ASKPASSinto all spawned shell sub-processes. - Embedded custom
sudo()wrapper insideBASH_SHOPT_GUARDto guarantee non-blocking root operations.
4. User Interface & Configuration
Interactive /model Dialog & Temperature Tuning
- Flash Model Temperature & Creativity Control: Dynamic real-time temperature tuning for
deepseek-v4-flash(e.g.0.0for deterministic syntax and strict coding, or higher values for creative drafting), hot-reloaded in memory without restarting the session. - Pro Model Reasoning Configuration: Interactive selector for
Reasoning Effort(LOW,MEDIUM,HIGH,MAX). - Persistent Storage: Choose whether to save settings permanently to
~/.deepseek/pro_settings.jsonand~/.deepseek/flash_settings.json, or apply them only for the active session.
Session Summary & Resume
- Corrected session resume instructions on exit (
/quit):To resume this session: deepseek --resume <session_id>
Automatic Update Notifications
- Integrated background version checker against npm package
@sluisr/deepseek-cli. - Detects the active package manager (
npm,pnpm,yarn,bun) and outputs exact update instructions.
5. Summary of Differences (v1.1.1 vs v1.2.0)
| Area | Feature | v1.1.1 | v1.2.0 |
|---|---|---|---|
| Commands | /fim (Fill-in-the-Middle code completion) |
No | Yes |
| Commands | /prefix (Chat prefix completion) |
No | Yes |
| Commands | /balance (Live account balance) |
No | Yes |
| Commands | /info (Author credits and community links) |
No | Yes |
| Tools | apply_patch (Unified diff code patching) |
No | Yes |
| Tools | web_search (Native server-side Responses API) |
No | Yes |
| Tools | web_search reasoning depth control (low - max) |
No | Yes |
| System | Silent 0ms AskPass (sudo, ssh, git) |
No | Yes |
| Core | Multi-Turn CoT transport (_deepseekReasoning) |
No | Yes |
| Core | Tool call sequence sanitization (Error 400 fix) | No | Yes |
| Core | KV Cache streaming usage metadata capture | No | Yes |
| UI | Flash model dynamic temperature tuning | No | Yes |
| UI | Interactive /model Pro & Flash configuration |
No | Yes |
| Config | Hot-reloading & persistence under ~/.deepseek/ |
No | Yes |
| Branding | Corrected deepseek --resume <id> summary |
No | Yes |
6. Installation & Upgrade
Install Globally
npm install -g @sluisr/deepseek-cliUpgrade to Latest
npm install -g @sluisr/deepseek-cli@latest7. Author & Community
- Developer: sluisr
- GitHub: https://github.com/sluisr
- Repository: https://github.com/sluisr/deepseek-cli
- YouTube: https://www.youtube.com/@sluisr_
- License: Apache-2.0
DeepSeek CLI v1.1.1 — Robust Thinking Mode & Stability Refinements
Release Notes - DeepSeek CLI v1.1.1
Bug Fixes
- Thinking Mode Stabilization (
reasoning_content):- Issue: In "Thinking" (reasoning) mode, the DeepSeek V4 API requires that all assistant turns include the
reasoning_contentfield, even when the model chooses not to emit reasoning tokens for a specific turn. Previously, if the reasoning was empty, the CLI omitted it, causing the API to reject the request with an HTTP 400 error (Bad Request - The reasoning_content in the thinking mode must be passed back to the API). - Solution: Session state tracking logic has been implemented. Once a conversation activates reasoning mode, the CLI ensures that the
reasoning_contentfield is always present in outgoing payloads. If a particular turn lacks reasoning from the model, an empty string ("") is safely injected asreasoning_content. This ensures strict compliance with the DeepSeek v4 API contract and prevents the chat history from being corrupted and abruptly cutting off the work of multi-tool agents.
- Issue: In "Thinking" (reasoning) mode, the DeepSeek V4 API requires that all assistant turns include the
Under the Hood
- Robust Intermediate Chunk Handling: Improvements to
processStreamResponseto prevent premature discarding of hidden (smuggled) reasoning blocks when interleaved with tool calls and mixed content. - Synchronized Versioning: Full update to v1.1.1 across
coreandclipackages, as well as the main manifest.
Developed to maintain the stability of autonomous agents during long programming tasks.
feat: DeepSeek API v4 stabilization — release v1.1.0
DeepSeek CLI v1.1.0 — DeepSeek API v4 Stabilization
Released: 2026-04-29
This release stabilizes the native DeepSeek API v4 integration (thinking mode +
reasoning_content), adds cost/latency optimizations to the model router, fixes
the exit_plan_mode workflow, and completes the user-facing rebrand from
gemini to deepseek.
Highlights
- DeepSeek v4 thinking mode is now stable. The HTTP 400 errors caused by
missingreasoning_contentbetween turns are fixed at the root. - Lower cost per session. Classifier no longer uses thinking mode and routes
more tasks to the cheaperflashmodel. Tools are sent in stable order to
improve DeepSeek's prompt cache hit rate. exit_plan_modeworks without a pre-existing plan file. Models can pass
the plan inline viaplan_contentand the tool will materialize it before
validating.- Consistent branding. All user-facing CLI commands now read
deepseek
instead ofgemini(deepseek --resume,deepseek mcp,deepseek extensions update, etc.).
What's Changed
Fixed
-
DeepSeek v4 HTTP 400 — missing
reasoning_content. The server requires
every assistant turn that used thinking mode to be replayed with its
reasoning_contenton the following request. Two bugs caused this to fail:getMessageKeyproduced different keys fortool_calls: undefinedand
tool_calls: [], so cachedreasoning_contentwas looked up under the
wrong key on the next turn and dropped.- The Gemini-style history filter stripped any non-text fields on assistant
turns, removing the cached reasoning even when the lookup succeeded.
Fix: cache key normalization + smuggling
reasoning_contentinside a hidden
Parton the assistant message so it survives history filtering and is
reattached when the message is mapped back to the DeepSeek request.Files:
packages/core/src/core/deepseekContentGenerator.ts,
packages/core/src/core/deepseekContentGenerator.test.ts(new). -
exit_plan_mode"Invalid plan" error. When the model proposed a plan
without first writing it to disk, approval failed because the validator could
not find the plan file. The tool now accepts an optionalplan_content
argument; when provided it writes the plan inside the validated plans
directory before approval.Files:
packages/core/src/tools/exit-plan-mode.ts,
packages/core/src/tools/definitions/dynamic-declaration-helpers.ts. -
Branding inconsistencies. All user-visible references to
geminiin CLI
output, error messages, resume hints and tests are nowdeepseek.Files:
packages/cli/src/ui/components/SessionSummaryDisplay.tsx(+ test &
snapshot),packages/cli/src/commands/extensions/{update,new}.ts,
packages/cli/src/commands/extensions/update.test.ts,
packages/cli/src/commands/mcp/enableDisable.ts,
packages/cli/src/config/extension-manager.ts,
packages/cli/src/config/mcp/mcpServerEnablement.ts,
packages/cli/src/acp/commands/extensions.ts.
Added
plan_contentparameter on theexit_plan_modetool declaration. When
set, the tool writes the plan to the plans directory before validation,
letting the model exit plan mode in a single step.stream_options.include_usage: trueon streaming requests, so the final
SSE chunk carries the real token usage (no more zero-token rows in
/stats).prompt_cache_hit_tokensmapping. DeepSeek's cache-hit counter is now
surfaced ascachedContentTokenCountin the Gemini-shaped usage metadata,
with a debug log line on every hit.DEEPSEEK_DEBUGenvironment variable. When set to a truthy value, the
generator logs request/response shapes, cache hits/misses, and reasoning
recovery decisions to stderr.- State directory
~/.deepseek/. The reasoning cache and debug logs now
live under the user's home directory, independent of the working directory
and anyGEMINI_CLI_HOMEoverrides. - Regression test for
getMessageKeycache key normalization
(packages/core/src/core/deepseekContentGenerator.test.ts).
Changed
- Classifier complexity threshold raised from 50 to 70. More tasks now
route todeepseek-v4-flashinstead ofdeepseek-v4-pro, reducing cost
without observable quality regression on the eval set. - Classifier no longer uses thinking mode. Classification is a structured
JSON output task and does not benefit from chain-of-thought; disabling
reasoning saves both tokens and a full extra round-trip of latency.
File:packages/core/src/routing/strategies/deepseekClassifierStrategy.ts. - Tools sent to the API in alphabetical order. Stable ordering improves
DeepSeek's prompt-prefix cache hit rate across turns.
Upgrade notes
- No configuration migration is required. Existing
~/.gemini/settings are
still read; only the runtime cache and debug logs move to~/.deepseek/. - If you set
GEMINI_CLI_HOMEto work around earlier path issues, you can
unset it — the duplication bug it caused has been removed upstream. - If you scripted around the old
gemini --resumeresume hint, switch to
deepseek --resume.
Verification
# Smoke test
DEEPSEEK_API_KEY=sk-... deepseek --prompt "ping"
# With debug logging
DEEPSEEK_API_KEY=sk-... DEEPSEEK_DEBUG=1 deepseek --prompt "design a small REST API"Tests: npx vitest run packages/cli/src/ui/components/SessionSummaryDisplay.test.tsx packages/cli/src/commands/extensions/update.test.ts
(16/16 passing) and npx tsc --noEmit -p packages/cli/tsconfig.json (clean).