Preface¶
A common requirement when conducting agent conversations in DeepSeek Harness (DSH) is the need to resend a user message that was sent incorrectly, switch models or permissions and run it again, or branch from a specific turn in the middle. The product’s built-in forking capability usually requires operation from a fixed entry point; if you simply want to resend a specific “user bubble” as is or resend it after modifying the text, the steps are often not straightforward enough.
The dsh-edit-retry introduced below is a Client Plugin (Category: Client) released by the maintainer huangmiuXyz. It provides a right-click context menu for any user message within the conversation transcript, allowing retries via DSH’s existing session forking path, with an option to delete the original session upon success. The current version of the plugin is 0.3.3 (MIT). It has not yet been published to npm and must be installed from the GitHub source.
What is this¶
dsh-edit-retry injects into the DSH Web chat UI: right-clicking any user message in the conversation log brings up a menu with “Retry”, “Edit and Retry”, and a “Delete original session after retry” toggle. Retry does not rewrite the log in place (DSH persistence is append-only; editing in place would cause inconsistencies between the model and the interface). Instead, it forks a new session from a suitable event point prior to that message, sending the original or edited text as the first prompt of the new session. The entire process reuses the same path as DSH’s native “Branch” feature; the plugin additionally explicitly carries over the model and permission presets currently selected in the source session’s composer to the child session before forking.
Core Features¶
Right-Click Menu¶
| Menu Item | Behavior |
|---|---|
| Retry | Resends this message as is. |
| Edit and Retry | Turns the bubble into an editor (prefilled with original text); sends after editing. |
| Delete original session after retry | Toggle; if checked, deletes the source session after the above action successfully sends the retry. The new session inherits the original session name. |
Editor shortcuts: Enter for new line, ⌘/Ctrl + Enter to save, Esc to cancel. The menu closes after selecting a menu item; progress and errors are displayed below the bubble (e.g., “Retrying…”, “Retry failed: reason”). The deletion toggle state is saved in localStorage and remains checked once selected.
Fork Point and “First Message”¶
The plugin attempts to switch the fork to the turn/end of the last closed turn to prevent the child session from having an empty “Time: Ns” line appearing before the retry content. If the message is the first one in that turn, if the inbox still has unclaimed prompts when the previous turn ended, if the message is an interjection mid-turn (steering), or if the event window has not finished loading, it maintains the default seq - 1 strategy. The first user message of a session triggers a “New Session” rather than a fork, consistent with the turn boundary explanation in the README.
Model and Permissions¶
- Model: Retry uses the routing selected by the current composer model control in the source session (
modelSelectionprojection) and calls the hostsession/selectModelbefore the first prompt of the new session. If already consistent with the target, it does not call it additionally. If unavailable or routing fails, the retry is still sent, with only a console warning. - Permissions: Retry uses the current permission preset of the source session (
currentValueof thepermissionsprojection) and switches via/permission <preset>before the first prompt of the new session. If it is already the same preset, iscustom, if the preset name contains whitespace, or if the switch fails, it does not force the switch, and the retry is still sent.
Attachments and Boundaries¶
- Text and Images can be retried: Images are read back via the source session’s
readAttachmentand resent as inline base64; this must be completed before deleting the original session. - File Attachments do not support retry: The host does not accept client-side exchange of stored file bytes for new receipts. Messages with files retain the native right-click menu.
- Interactive elements such as links and buttons within messages do not hijack their right-click menu.
- “Retry” is greyed out for empty messages; messages with images but no text can still be retried. “Edit and Retry” is always available.
- Child sessions generated by retry fall into the same Workspace group as the source session.
- UI text switches between English and Chinese according to the DSH
localesetting.
Deleting Original Session (Optional)¶
Deletion is disabled by default and is irreversible. The implementation uses the host-side HTTP route POST /dsh-edit-retry/session/delete (with custom request headers to restrict cross-site calls). The sequence includes canceling the agent, flushing disk data, removing from memory, and deleting the corresponding logs under ~/.dsh/sessions/. The README notes: This depends on DSH internal structures and may partially fail after upgrades; old entries in the sidebar sometimes require a page refresh to disappear after deletion.
Installation and Activation¶
The plugin is installed as a standard dependency for a specific profile and automatically registered by dsh plugin to that profile’s dsh.profile.bundles (the package declares dsh.bundle).
- Run in the terminal (replace
<your_profile>with the actual profile name):
dsh plugin --profile <your_profile> add github:huangmiuXyz/dsh-edit-retry
- Restart DSH or refresh the Web interface.
Notes:
- You must use
github:huangmiuXyz/dsh-edit-retry: The package is not on npm, so the bare namedsh-edit-retrywill result in a 404. - DSH Desktop:
--profile desktopis exclusive to the Electron app, anddsh pluginwill refuse it; you need to install the same GitHub source via the in-app plugin management entry. - If the profile’s
dsh.profile.bundlescontains dangling entries likelink:that cannot be resolved, installation may error during the registration phase but the dependency is already installed; clean up the dangling entries and rerun, or manually edit thebundlesarray inpackage.jsonas per the README.
For development, you can use a local link:
dsh plugin --profile <your_profile> add link:/absolute/path/to/dsh-edit-retry
Typical Usage¶
- Open an existing session in the DSH Web client and find the user message to retry (including messages inserted via mid-way steering; the menu is the same).
- Right-click the bubble. Choose “Retry” or “Edit and Retry” as needed; if you want the new session to replace the old one, check “Delete original session after retry” first.
- If editing is selected: modify the text in the editor and submit with
⌘/Ctrl + Enter; if you need to change the model or permissions, select them in the composer before forking, and the retry will run according to the current options. - Wait for the status below the bubble to complete; if deletion was checked, confirm that the new session has opened and the title has been inherited (if the source session had a title).
Entry Limitations: Right-click only; there is no standalone retry button or double-click. The README explains this is related to the rendering position of the built-in action bar.
Use Cases and Precautions¶
Suitable for: DSH users who frequently re-experiment with prompts, models, or permission presets from a specific user turn in long conversations; scenarios requiring “change a sentence and run again” while preserving DSH fork semantics rather than manually editing logs.
Precautions:
- The plugin runs with current DSH process privileges; the optional deletion permanently removes session logs. Before installation, please read the source code and MIT license of the GitHub repository and assess whether it meets your environment requirements.
- Deletion and session storage use host extension implementations, not DSH public plugin APIs; pay attention to compatibility notes in the README after upgrading DSH.
- The community plugin directory SkillHub Entry and GitHub are independent ecosystem information sources and have no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
dsh-edit-retry condenses “retrying or editing and retrying from a specific user message” into a single right-click step, aligning the current model, permissions, and grouping on the forked child session, with optional cleanup of the original session. If you are already using the DSH Web profile, you can install version 0.3.3 using the command above to try it out.
- Directory Page: https://www.skillhub.cn/plugins/huangmiuXyz/dsh-edit-retry
- Source Code and Full Documentation: https://github.com/huangmiuXyz/dsh-edit-retry