Introduction¶
When using goals for long tasks in DeepSeek Harness (DSH), creating a goal uses the standard tool create_goal. DSH intentionally requires that a message with source.kind === 'user' appears in this turn, otherwise create_goal will reject it. The design intent is to prevent agents, timers, or other non-human sources from creating goals themselves, running in loops, and continuously consuming quota.
The pain point in unattended scenarios is very specific: when a scheduled task or cross-session message wakes up the agent, it judges that “I should create a goal to continue,” but is blocked because the wake-up source is not human. The community has plugin paths that create goals directly at the scheduled time, and solutions that only modify the UI; if you want the agent to still decide on the spot whether to create a goal and still follow the standard semantics of create_goal, you need to do a controlled extension in the “who has the right to let the guard pass” aspect. dsh-goal-autostart (maintainer directory ID: mmojie, open source author: 嗷鲸鲸 / Moto) does exactly this: under strict configuration, it enqueues a user message with source.kind: 'user', allowing the next turn to pass the human-turn guard. It is disabled by default; you must understand that it bypasses a security guard before use.
What is it¶
dsh-goal-autostart is a DSH workflow third-party plugin (MIT License, current package version 0.1.0), compatible with DSH >=0.2.0-rc.2 <0.3.0, Node >=20.18, and supports desktop / web profiles. It registers the tool goal_autostart. When the whitelist and frequency guard are met, it enqueues a message mimicking a human source into the current agent’s next-turn inbox, prompting the agent to call create_goal; objective, max_goal_rounds, etc., are still filled by the agent following the normal process; the plugin does not change the semantics of goal creation.
Differences with dsh-timed-goal: the latter creates goals directly at the scheduled time via the plugin, bypassing create_goal; this plugin allows the agent to decide by itself after seeing the signal and follows the standard create_goal. It does not overlap with dsh-goal-mode-enhance — the latter focuses on goal visualization and does not solve creating goals in non-human turns.
Core Features¶
Below is an introduction to the behavior explicitly documented in the plugin’s materials.
- Tool
goal_autostart({ note }):noteexplains why a goal is being opened this time; it will be written into the logs and the body of the enqueued message; on success, it returns{ queued, note }. - Four-fold Guard (Default is Conservative):
-enabled: Defaultfalse, installation does not equal activation.
-allowedSessions: Default empty array, meaning no one is allowed to call it; specific session IDs must be listed, no wildcards.
-minIntervalMs: Default 1 hour, excessive frequency only logs and does not call.
- Logs: Writes a line before every call (containing caller, reason, time), default file~/.dsh/goal-autostart.log. - Mechanism Summary: Validate session and interval → Construct a text message with
role: 'user'andsource: { kind: 'user' }→agent.followup(message)→ WhenhasDirectHumanInputis true in the next round,create_goalcan be allowed. The implementation is consistent with the path used by the DSH ACP bridge to create user messages, the difference lies in who is allowed to pass that source.
Installation and Activation¶
Does not work by default. First install, then modify profile configuration; changes to the live profile take effect immediately, generally no need to restart the DSH process.
- Install the plugin (command comes from the project README):
dsh plugin --profile <your-profile> add dsh-goal-autostart
- Insert or adjust the plugin configuration in
cordis.patch.ymlfor that profile, for example:
- insert:
- id: goal-autostart
name: 'dsh-goal-autostart'
config:
enabled: true
allowedSessions:
- 'your-session-id' # Only allow these sessions to call
minIntervalMs: 3600000 # 1 hour
logFile: '~/.dsh/goal-autostart.log'
objectiveHint: 'Read the top of handover.md and open a goal according to the objective specified inside'
- In a session that is enabled and whose session is in the whitelist, call
goal_autostart(or a workflow you authorize to call it) when needed to continue a long-running task, and clearly state the reason innote.
Observed Pitfall (Recorded in README, 2026-11-14, DSH 0.2.2-rc.3): After modifying cordis.patch.yml under workspace-write permissions and triggering a reload, the first call to goal_autostart may report unknown tool "goal_autostart"; without restarting or reinstalling, calling it again usually recovers. The author attributes this to a permission intermediate state rather than the hot reload window; it is suggested to wait a moment after changing the configuration before calling. When you need to stably toggle plugin loading/reloading, use a danger-full-access session (or avoid modifying the profile inside workspace-write). If unsure, you can use dsh plugin --profile <p> list to investigate, but this command may also fail with EPERM under workspace-write due to a write lock file.
Uninstall:
dsh plugin --profile <your-profile> remove dsh-goal-autostart
The harmless residual config in the settings can be kept or deleted.
Typical Usage¶
The scenario comes from the README: a schedule or other session wakes up the agent after 30 minutes. The agent finds that a certain piece of work has not progressed across multiple turns and wants to create a goal to continue, but there is no human input in the current turn.
After installing above and setting enabled: true, filling in allowedSessions, call it within one turn of that session:
goal_autostart({ note: "Scheduled wake-up: please continue the previous phase according to the handover instructions" })
If the minIntervalMs is not exceeded and validation passes, a user message with the prefix 【Auto Continuation】 will appear in the next round (content includes your note and guidance to call create_goal, objectiveHint can constrain the prompt). The agent then calls create_goal according to the normal routine.
Note: You cannot create a goal immediately in the same turn — followup is fixed to the next turn; an extra turn means an extra model call, so high frequency is not recommended. For contexts where origin === 'subagent', hasDirectHumanInput is directly false, and this plugin cannot clear the gate for the subagent.
Applicable Scenarios and Notes¶
Who is it suitable for
- Wake-up source is not human (scheduled, cross-session triggers, etc.), but you want the decision to create a goal to be made by the agent, and it must go through the
create_goaltool chain. - Can accept “waiting one extra turn”, and can accept maintaining the session whitelist and call interval yourself.
Not suitable or requires alternative solutions
- Want automatic execution at the scheduled time with fixed full-access sessions: you can compare dsh-timed-goal.
- Only need goal interface enhancement: use dsh-goal-mode-enhance.
Security and Compliance (Must read the warning section of the GitHub README first)
This plugin impersonates source.kind: 'user', which bypasses a guard intentionally set by DSH. After enabling, the agent can create a goal without human operation; if triggered in a loop, it may continuously consume quota. The four-fold guard can reduce risk, but does not guarantee 100% safety, use at your own risk. The plugin runs with the permissions of the current DSH process; please review the repository source code and MIT/NOTICE yourself before installing; this is a third-party work with no affiliation to or endorsement from DeepSeek.
Conclusion¶
The value of dsh-goal-autostart lies in: under the premise of default off, session whitelist, and frequency limits, providing a controlled channel for “non-human wake-up but agent autonomously creating goals”, without rewriting the semantics of create_goal itself. Directory and documentation:
- Community directory page: https://www.skillhub.cn/plugins/mmojie/dsh-goal-autostart
- Source code and full description: https://github.com/mmojie/dsh-goal-autostart