dsh-superagent-prototype: dsh-superagent Treats Your Attention as the Scarce Resource
DeepSeek's open research prototype is not another code generator. It is a governance layer for autonomous work: tickets with mandates, an observe-before-auto rollout mode, and a routing rule that decides which agent owns your next message.
- dsh-superagent is a governance layer dressed as a coding agent: its most novel code decides who owns a human's follow-up message, not how to edit a file.
- The default acceptance mode is observe, which lets a team measure what an autonomous agent would have done before granting it any authority.
- Routing is derived from state, never stored as a flag, so a message reaches the LLM assessor only when no worker ticket already owns it.
- The README calls it a research prototype first, and the code runs with broad OS-user permissions, so the honesty is part of the design.
A one-line comment with three possible owners
Picture a busy GitHub thread. A reviewer drops a short follow-up: "did the retry logic ever land?" In most agent systems, that message is either picked up by a single bot or lost. In dsh-superagent, it has three candidate owners at once.
The worker on the ticket that owns the thread can take it. Or the message can be routed to an LLM assessor because no worker currently owns it. Or it can be dropped entirely, because the person already stopped that ticket and its mandate was withdrawn.
That ambiguity is not a bug to paper over. It is the design problem the repository is built around, and it is solved by a single pure function named followupOwners. A human types one line, and the system has to answer a question that most software never asks: who decides who decides?
The rule that routes a human's follow-up
followupOwners takes a trigger and a set of records and returns the list of tickets that own the message. It reads like a sequence of gates, and each gate can empty the result.
- Return empty unless the trigger is human. Bots and CI never enter this path.
- Return empty if the trigger was requeued.
- Exclude tickets that handed the trigger back, and exclude context-only tickets.
- Return empty if an Eval currently holds the trigger.
- Keep only tickets that are still live, or that ended by something other than a human and still hold an undelivered input for this trigger.
The subtle case is in that last gate. A ticket can decide while it is live, and it can also decide once a person dropped its Subscription to the Thread, and while it is ended, not by a person, with the Trigger waiting to resume it. The function depends only on a small FollowupRecords interface with three getters, so it can be tested in isolation.
The design elegance is that this answer is never stored. Intake queues a message for the assessor only when this.owners(trigger).length === 0. The routing decision is derived from current state, so the system cannot disagree with itself. There is no flag to fall out of sync.
observe is the default, and that is the point
Once you understand the routing rule, the obvious question is who let this thing run. The answer, by default, is nobody.
The system defines an AcceptMode with three values: off, observe, and auto. In observe, the agent assesses candidates and records what it would accept without starting any work. That is a trust ramp. A team that has never run an autonomous agent before can watch its judgment for a week before granting it the authority to act.
A second safety detail sits beside it: a mandate does not widen. An explicit request and an inferred candidate carry different Strength values, and a revalidate hook lets the core re-check a mandate's basis before an ended ticket resumes. A rule tightened after the fact blocks the resumption.
It is also a way of working with an agent: take as little human attention as possible, and give as much value as possible.
Nine steps from a GitHub event to a ticket
The routing rule sits on top of an intake pipeline. Intake.receive normalizes timestamps to canonical ISO form, validates that threads are non-empty, and deduplicates by trigger id. Then it filters through scope. Rejections are recorded, not discarded, which keeps an audit trail of everything the agent chose to ignore.
From there it correlates threads, fans out to subscribed tickets, and records inputs with deterministic IDs built from key('input', ticketId, 'trigger', trigger.id). Deterministic IDs make redelivery idempotent: the same event twice produces the same input row once. Finally it queues for Eval only if no owner exists, then wakes each reached ticket.
One rule inside the fan-out deserves attention. Only a person's message on a non-context thread resumes an ended ticket. Bots and CI do not, because the executor re-reads threads when it resumes anyway. A human-stopped ticket receives nothing afterward, because its mandate was withdrawn. The distinction between machine chatter and human intent is enforced at the door.
const followed = !!thread.context?.includes(ticketId)
const resumes = trigger.human && ticket?.ended?.by !== 'human' && !followed
if (!ticket || (!liveTicket(ticket) && !resumes)) continue
Permission that cannot quietly expand
The authorization model reads less like a feature and more like a set of contracts. Policy.gate decides admission. Policy.admitsInferred separates explicit work from inferred work. A human-stopped ticket receives nothing afterward because its mandate was withdrawn, and the withdrawal is not reversible by the agent itself.
The trust boundary is stated plainly in the ports file. The assessor receives bounded facts, never authority. The LLM can read every ticket on the thread, including ended ones, so it can judge duplicates. It cannot grant itself permission. Results return through Engine.decide, so the assessor is asynchronous and decoupled from the transaction that produced the question.
How it survives a restart without doing the work twice
Pushing a branch, commenting, and opening a pull request are not transactional. No amount of clever bookkeeping makes them exactly-once. The design gives up on that and does something more honest instead.
On host restart, the system checks two things: was the last worker report in a terminal-ish state, and was anything delivered after it. If the session is not settled, the ticket restarts with a fixed recovery note that is really an idempotency instruction to the model.
Inspect the current worktree, git history and GitHub state before continuing. Do not repeat an already completed external operation.
That is the whole trick. Rather than trusting a ledger, the agent re-inspects the world. It is a small, unglamorous choice, and it is the kind of thing that only shows up once you have watched an agent run for a month.
What it does that the other agents do not
Every row below is scored on how work arrives, who authorizes it, and where the result goes. Capability is deliberately excluded, because it is not the axis this project competes on.
| Project | How work arrives | Interaction model | Authorization | Scope |
|---|---|---|---|---|
| dsh-superagent | GitHub events, optional Feishu. A person asks, or a team rule permits. | Always-running service. Replies in the originating conversation. | Explicit ticket plus mandate. off / observe / auto. Mandates do not widen. | One repository. |
| SWE-agent | A GitHub issue, run by a human. | Batch run against a benchmark or issue. | None. The operator invokes it. | Any repo it is pointed at. |
| OpenHands | Operator starts a session. | Interactive agent platform, self-hosted or hosted. | Operator-driven. | General software tasks. |
| Aider | Developer opens a terminal in a local repo. | Interactive pair programming. | Developer in the loop, always. | Local working copy. |
| AutoCodeRover | A GitHub issue, run by a researcher. | Research run for issue resolution. | None. Invoked by the operator. | Any repo it is pointed at. |
| GitHub Copilot coding agent | Assigned issues, inside GitHub. | Hosted, GitHub-native. | Managed by GitHub's permission model. | The repo it is installed on. |
The closest overlap in outcome is the Copilot coding agent: both turn an issue into a pull request. The closest overlap in design intent is none of them. None of the others ships an observe mode, and none of them lets a mandate be revalidated after a ticket has already ended.
A research prototype, and the README says so first
The repository closes on honesty, and it starts with it too. The README states the code grew out of the team's day-to-day development work, with much of the engineering done by coding agents, and that it has been adapted for publication. The published version differs from the internal one.
Research prototype for reference only, not an official DeepSeek product.
The operational reality is worth stating plainly. Worker and coordinator sessions run with broad OS-user permissions. A dedicated system account, a separate GitHub identity, and a restricted authorized-user list are prudent before anyone points this at a live repository. The README also warns that the prototype may contain bugs and inconsistent practices. Read it as a design document with a working skeleton attached, not as a product you install and forget.





