Skip to content

Releases: project-hy/dsh-claude-delegate

dsh-claude-delegate 0.8.1

Choose a tag to compare

@zhanghongyu12 zhanghongyu12 released this 20 Oct 08:13
  • Large built-in Bash output is readable in the panel. The SDK never forwards a tool's stdout, and the plugin capped every tool result at 2000 characters — cut from the head, which is where the interesting lines are not. Built-in Bash results now keep the tail up to 30000 characters (the same budget the CLI gives the model inline), render as a terminal block ($ <command> + monospace output), and say how much of the head was dropped. When the CLI saves the rest to a file (Output too large (NKB). Full output saved to: <path>), the row offers 完整输出: the host streams that file back in 200KB windows, tail first, and only for paths this session's own event stream offered (per-session allow-list), so the panel cannot be used to read arbitrary files.
  • A follow-up delegation continues the same Claude Code conversation — by name. Every call used to start a new conversation, because the session id only ever appeared in the result text and nothing passed it back. Continuation is now keyed by (workstream name, cwd) and recorded in ~/.dsh/claude-delegate-sessions.json: pass the same conversation: <name> on every call of a task and the next call resumes that conversation ([continued] <id> · run N). A call that names nothing starts a new conversation and joins no history — one directory can hold several workstreams (a slide deck beside a weekly report, frontend beside backend) and nothing in the task text can tell them apart, so guessing would silently hand one workstream another one's context; such a call also receives the list of workstreams already registered for that directory, so the name is one copy away. fresh: true forces a new conversation, an explicit resume still wins (and reports which workstream it belongs to), a conversation that no longer exists falls back to a fresh one with a note, and a conversation already busy with a running delegation is never joined. Continuation also turned out to be cheaper (cache hit: 1723 in / 7 out, against 9876 in / 9 out for a fresh start).
  • The panel reads like a conversation. Rows are grouped by Claude Code conversation — one tab per conversation, with a run-count badge — and each run shows the task it was sent (as a bubble), its reply and its process. Several runs in one tab flow in a single scroller instead of each run's own scroll box fighting for the same fixed height (which squeezed the earlier replies into a sliver). Foreground delegations register a panel row too (foreground-<n>), so they are visible and cancellable from the panel like background ones.
  • The delegation rhythm now ships with the plugin. The claude-code-delegation skill gained a section on demand-based delegation and multi-round sessions — delegate only work that is genuinely self-contained, give every workstream its own conversation: <name>, keep one task on one line — the claude_code tool description states the same rule on every call, and the README documents it with a snippet to paste into AGENTS.md.
  • The registry is visible in the panel. Registered lines go to the UI over the same RPC seam (claudeCode/listWorkstreams), so the panel header can list each line with its name, its first-round description, its run count and when it was last used, and a conversation tab is labelled with the workstream it belongs to. The registry itself (~/.dsh/claude-delegate-sessions.json, version 2) stores per line: session id, name, description (excerpt of the first task), latest task excerpt, cwd, run count, and first/last-used timestamps.
  • Two optional knobs for built-in Bash. bashOutputMaxChars (handed to the CLI as --settings, clamped 4000–128000) raises how much output the model receives inline; autoBackgroundTimeoutMs (CLAUDE_CODE_AUTO_BACKGROUND_TIMEOUT_MS) lets the CLI move a long command to the background, so its output lands in a file instead of arriving only when the command finishes. Both default to 0, which leaves the CLI's own defaults alone.
  • The default cwd no longer lands in the profile directory. DSH 0.2 exposes the calling session's working directory as agent.session.header.cwd — the field the bundled fs/bash/jobs tools read — while the plugin still looked at session.meta.cwd / creation-time options.cwd, found nothing, and fell through to process.cwd(), i.e. the desktop profile directory. A delegation that omitted cwd therefore explored the wrong tree (and registered its workstream under the wrong directory). The session id is read the same way now (agent.session.id first, matching the harness's own identity check), so registry keys and job owners agree with the harness.