Foreword

In the development and debugging of DeepSeek Harness (DSH), enabling the large model to accurately perceive the current time and calculate idle duration across conversational turns is a key detail for improving the experience. Relying solely on the model to infer or perform complex date calculations not only consumes tokens but is also prone to errors.

The dsh-message-datetime plugin was created specifically to solve this pain point. By injecting concise timestamp and idle duration information at the beginning of each turn, it ensures the model always knows “what time it is now,” “when the previous turn ended,” and “how long it has been idle,” eliminating the need for the model to calculate historical elapsed time itself.

Plugin Overview

Name: dsh-message-datetime
Maintainer: john-walks-slow
Category: Model inference
License: MIT

This is a lightweight plugin whose main function is to append a time notification to the model context at the beginning of each conversational turn. It covers user turns, automatic continuation rounds, and subagent turns, while fully preserving DSH’s native branching functionality (without breaking the turn-tail constraints in the Web UI).

Core Features

  1. Per-turn clock injection: At the first step (step === 1) of each turn, the current time is injected automatically. Subsequent steps do not repeat injection.
  2. Cross-turn idle awareness: In later turns, the end time of the previous turn and idle duration (e.g., idle for 25m) are automatically displayed.
  3. Zero permissions and interruption safety: The plugin does not involve external services, network requests, or file system writes. Any injection failure degrades only to a warning and never interrupts the current turn.
  4. Full scenario coverage: Supports user conversations, automatic continuation, and subagent invocations, ensuring that the model has clock information in all scenarios.

Installation

Install via DSH CLI:

dsh plugin --profile web add dsh-message-datetime

After installation, the plugin automatically mounts and takes effect through the bundled cordis.patch.yml.

Configuration and Output

Basic Configuration

In the DSH configuration file, you can specify an optional fallback timezone:

- id: message-datetime
  name: dsh-message-datetime
  config:
    timeZone: Asia/Shanghai   # 浏览器时区不可用时采用此配置

Output Example

The plugin appends a notification after the first step of each turn. The format seen by the model is as follows:

First turn (no previous turn record):

Current time: Tue 2026-09-15 01:04:34 +08:00 (Asia/Shanghai)

Subsequent turns (including previous turn end time):

Current time: Tue 2026-09-15 01:04:34 +08:00 (Asia/Shanghai) | Last turn ended: Tue 2026-09-15 00:39:34 +08:00 (idle for 25m)

In the Web UI, this notification is rendered as a collapsible context chip. Clicking it expands to show the full text.

Notes

  1. Dependency versions: The plugin depends on @deepseek-ai/cordis 4.0.2 and @deepseek-ai/dsh-llm 0.1.2-rc.1.
  2. Conflict with official plugin: It is not recommended to enable the official @deepseek-ai/dsh-time-context plugin at the same time, because both mechanisms share the same origin, and enabling both will cause duplicate time injection.
  3. Timezone fallback: Timezone resolution priority is: browser timezone → configured timeZone → process timezone. Invalid values silently fall back without affecting the workflow.
  4. Safety mechanism: The plugin only appends user/message type notifications, located within the step window, satisfying token-meter replay constraints.

Summary

dsh-message-datetime is a tool focused on providing clock context. Through lightweight single-line injection, it solves the problem of the model perceiving the passage of time and calculating elapsed time in multi-turn conversations. It is well suited for agent scenarios requiring precise time control.