Introduction¶
DeepSeek Harness (DSH) adopts a modular plugin architecture that allows developers to extend its capabilities. For developers migrating from the Codex platform, carrying over conversation history is a concrete need. session-import-codex is designed to address importing conversation records from the Codex App Server into DSH, ensuring historical conversations can continue seamlessly in the new environment.
Purpose¶
This is a DeepSeek Harness plugin maintained by xing01l. It uses the stable history API of the Codex App Server to convert completed conversation turns into validated DSH session events. The plugin provides two interaction modes: a CLI tool and a Harness chat command, and supports one-time migration and deterministic ID generation.
Core Features¶
- Conversation history import: Import non-archived interactive sessions from Codex into DeepSeek Harness.
- CLI tool: Provide a command-line tool for one-time migration.
- Chat command fallback: Provide the
/import-codexchat command as a development or targeted fallback option. - Reasoning summary handling: By default, only reasoning summaries are imported, not raw reasoning content.
- Deterministic IDs: Generate deterministic target IDs such as
codex-<thread-id>. - Idempotency: Support idempotent workspace attachment; repeated runs do not create duplicate sessions.
- Environment requirements: Requires Node.js
^22.19or>=24, pnpm 10, and thecodexcommand available in the PATH.
Installation and Activation¶
Install the plugin through Harness to update the dependencies and packaging layer for the target profile:
dsh plugin --profile web add dsh-session-import-codex
Typical Usage¶
Command-Line Migration¶
The plugin provides a CLI tool for migration. Dry Run mode is supported to validate the source history and target conflicts first:
pnpm --dir "$env:USERPROFILE\.dsh\profiles\web" exec dsh-import-codex --profile web --dry-run
Perform the actual migration:
pnpm --dir "$env:USERPROFILE\.dsh\profiles\web" exec dsh-import-codex --profile web
Chat Command¶
In the DSH chat interface, you can use the /import-codex command:
- /import-codex <thread-id>: Import the specified session ID.
- /import-codex --all: Import all eligible sessions.
Considerations¶
- Offline write workflow: The plugin does not support writing directly to Harness persistent files. The supported write workflow is offline: stop the
dsh --profile webprocess, perform the migration, and then restart the Web profile. - Privacy and security: The plugin does not read Codex rolling files, desktop state, SQLite databases, or private JSONL files. It also never writes directly to Harness persistent files.
- License: The plugin follows the MIT license.
Summary¶
This plugin enables developers to migrate conversation history from Codex to DeepSeek Harness. Through the CLI tool and chat command, developers can conveniently import historical sessions into DSH, while deterministic IDs and idempotent design help ensure the migration is safe and repeatable.