Introduction¶
When using Codex locally, session content is scattered across multiple sub-agents, auto-review logs, and system prompts, requiring manual organization before you can continue. The DeepSeek Harness plugin system provides an “everything is a plugin” extensibility model. This plugin is designed for developers who need to view, reference, and hand off Codex sessions within DSH.
Plugin Positioning¶
Plugin name: dsh-plugin-codex-mirror
Maintainer: ddyfight
Category: Client plugin
This is a real-time, read-only mirror plugin for viewing local Codex sessions within the DSH client. It provides the ability to reference sessions into the current draft, create new sessions with references, and compile DSH progress into handoff files to pass back to Codex. The plugin does not write to the Codex data directory, nor does it send messages on your behalf.
Real-Time Read-Only Mirror¶
The plugin reads ~/.codex/sessions and ~/.codex/archived_sessions every second, parsing only newly appended bytes after the initial scan. Open the “Codex Real-Time Mirror” panel in the left sidebar to view it. If your Codex history is large, the first scan takes a few seconds; subsequent scans only process new content.
Session List & Filtering¶
Codex writes sub-agent and auto-review records into the same session tree. This plugin identifies these internal sessions and hides them by default, so the list only shows your conversations. When you switch to “All,” internal sessions are marked with a badge.
Filtering & search:
- The left sidebar supports filtering by “Conversations / All / Archived”
- The search box filters session titles, working directories, and the last message simultaneously
- In-conversation search also highlights matches
Navigation shortcuts:
- j / k switch sessions
- / focus search
- r refresh
- q quote current session
- Shift+Q quote to a new session
Message View & System Context¶
The right side of the panel displays the selected session with date separators. Overly long messages are collapsed by default, and the working directory and session ID can be copied with one click.
System prompts, permission blocks, attachment preambles, and Guardian review notices are marked as “System Context” and collapsed; attachment lists are stripped, but content after attachments is preserved. The plugin only displays user and assistant messages that have been persisted to disk — in-flight tasks are not shown.
Quote into DSH¶
Right-click a session or message to open the quote menu. You can also click the button that appears on hover.
Quote modes:
- Append to current draft: adds the quoted content to the current DSH session’s draft area
- New session: creates a new DSH session with the quoted content pre-filled
The plugin does not send on your behalf. You complete the task instructions and click send yourself.
Hand Progress Back to Codex¶
Select a Codex session and click “Write DSH Progress.” This reads the most recent persisted user and assistant messages from the current DSH session and opens a review dialog. After confirming or editing, it generates a hash-chained, history-immutable handoff file and provides a continuation instruction that can be pasted directly into the original Codex session.
Handoff files are located at ~/.dsh/codex-mirror/handoffs/<codexSessionId>/<dshSessionId>/, containing latest.md, manifest.json, and immutable history/<sha256>.md files.
Configuration¶
The Codex data directory defaults to ~/.codex. If Codex stores sessions elsewhere, you can override it in the plugin config line:
- id: codex-mirror
name: dsh-plugin-codex-mirror
config:
root: D:\other\codex-home
~ is expanded. If the directory does not exist, it is treated as an empty database with a notification rather than throwing an error.
Privacy & Boundaries¶
The plugin runs with the current DSH process’s permissions but performs read-only operations:
- Does not write to ~/.codex
- Does not touch Codex’s authentication data, SQLite database, or window
- Does not send DSH tasks on your behalf
The HTTP interface only accepts localhost loopback requests, validates Host and Origin headers, and reuses DSH’s own authentication; POST only accepts JSON request bodies with a size limit.
The plugin only mirrors persisted user and assistant messages. System prompts, reasoning traces, tool calls, images, and transient fragments are excluded by design; the panel will not claim an in-flight task has completed.
Codex has no confirmed API for “appending messages to a running session,” so reverse synchronization is file-based handoff and does not forge Codex-native messages.
Installation¶
Install from GitHub:
dsh plugin --profile <profile> add github:ddyfight/dsh-plugin-codex-mirror
Use the pre-built tarball from a Release:
dsh plugin --profile <profile> add https://github.com/ddyfight/dsh-plugin-codex-mirror/releases/download/v1.1.2/dsh-plugin-codex-mirror-1.1.2.tgz
DSH Desktop lets you paste the same GitHub URL or a local folder path directly in “Plugins → Add Plugin.”
The package contains no install scripts or build scripts: it’s plain ESM plus a pre-built browser module.
Use Cases¶
Ideal for developers who use both Codex and DSH simultaneously and want to avoid manually copy-pasting session content. If you use Codex locally for multi-turn conversations and want DSH as a complementary workspace, this plugin reduces repetitive work.
The plugin runs with the current DSH process’s permissions. Review the source code and license (MIT) before installing.
Conclusion¶
This plugin integrates Codex sessions into the DSH workflow through three key capabilities: real-time mirroring, quoting, and handoff. If you use Codex locally and need to view or reference sessions within DSH, you can find it at:
- Directory page: https://www.skillhub.cn/plugins/ddyfight/dsh-plugin-codex-mirror
- GitHub: https://github.com/ddyfight/dsh-plugin-codex-mirror