01 / History can be billed again

With a stateless chat API, the client usually sends relevant conversation history on every turn. A short new message can accompany a long billed input. The visible size of your new message is not the size of the entire request.

02 / Keep a concise task record

Summarize the goal, confirmed decisions, changed files, pending work, and essential evidence. Preserve user constraints and text that must remain exact. Keep original material retrievable because summaries lose detail.

Goal: …
Constraints: …
Completed work and evidence: …
Current blocker: …
Next action: …

03 / Read tool output on demand

Search for relevant files and symbols before reading large sections. Start with lines around a failure and expand only when needed. Avoid repeatedly including dependency folders, generated files, or entire lockfiles.

04 / Avoid excessive compression

Summarizing also costs tokens and may break a reusable prefix. Decide when to compact based on input growth, task changes, and answer quality rather than clearing history on a fixed schedule.

Sources and further reading

DS-V4-HUUB · DeepSeek Stateless Chat History Guide ↗api-docs.deepseek.com · Official documentation ↗

Adapted from the source guide, last updated 2026-06-27. Savings depend on your workload and must be measured.