The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
handoff: add DeepSeek Harness
Claudeb955f0de9965
diff --git a/cli/beacon/cmd/handoff_resume.go b/cli/beacon/cmd/handoff_resume.goindex f877babf..0b822010 100644--- a/cli/beacon/cmd/handoff_resume.go+++ b/cli/beacon/cmd/handoff_resume.go@@ -38,7 +38,8 @@ When the session's own runtime can reopen it, it is reopened with its full conteOtherwise, or with --agent naming another runtime or --new, Beacon writes a handoff brief of thesession and starts a new session whose first message points at it. The brief is passed by path,-never inlined into the command line.+never inlined into the command line. Beacon cannot start DeepSeek Harness, so its sessions continue+in another runtime named with --agent.The runtime runs in the session's directory, in this terminal. Beacon asks before launching unless--yes is given; --print shows what would run without writing or launching anything. Cline is alwaysdiff --git a/cli/beacon/internal/dshsession/handoff_test.go b/cli/beacon/internal/dshsession/handoff_test.gonew file mode 100644index 00000000..be4cd3d3--- /dev/null+++ b/cli/beacon/internal/dshsession/handoff_test.go@@ -0,0 +1,53 @@+package dshsession++import (+ "testing"++ "github.com/asymptote-labs/agent-beacon/pkg/asymptoteobserve"+)++func TestMapSessionRecordsAHandoffLink(t *testing.T) {+ ref := SessionRef{ID: "new-1", Path: "/tmp/sessions/ws/new-1/session.v3.jsonl.zstd"}+ prompt := "Continue the work.\n\n" + asymptoteobserve.HandoffMarker("claude_code", "src-1")+ records := []Record{+ mustRecord(t, 1, record("session", map[string]interface{}{"id": "new-1", "cwd": "/work"})),+ mustRecord(t, 2, record("user/message", map[string]interface{}{"message": map[string]interface{}{"content": prompt}})),+ mustRecord(t, 3, record("user/message", map[string]interface{}{"message": map[string]interface{}{"content": "no marker here"}})),+ }+ mapped := MapSession(ref, records, MapOptions{})+ var links []MappedEvent+ for _, m := range mapped {+ if m.Event.Event.Action == "session.handoff" {+ links = append(links, m)+ }+ }+ if len(links) != 1 {+ t.Fatalf("links = %d, want 1: %+v", len(links), mapped)+ }+ link := links[0]+ if link.SourceLine != 2 || link.Event.Handoff == nil || link.Event.Handoff.SourceHarness != "claude_code" || link.Event.Handoff.SourceSessionID != "src-1" {+ t.Fatalf("link = %+v handoff=%+v", link, link.Event.Handoff)+ }+ if link.Event.Session == nil || link.Event.Session.ID != "new-1" || link.Event.Session.WorkingDirectory != "/work" {+ t.Fatalf("link session = %+v", link.Event.Session)+ }+ if link.Event.Harness.Name != Harness || link.Event.Harness.CollectionMethod != "poll" || link.Event.Event.Fidelity != "observed" {+ t.Fatalf("link provenance = %+v %+v", link.Event.Harness, link.Event.Event)+ }+ if link.Event.Prompt != nil || link.Event.Content != nil || (link.Event.GenAI != nil && link.Event.GenAI.Input != nil) {+ t.Fatalf("the link must not repeat the prompt: %+v", link.Event)+ }+ ids := map[string]bool{}+ for _, m := range mapped {+ if ids[m.Event.Event.ID] {+ t.Fatalf("duplicate event id %s", m.Event.Event.ID)+ }+ ids[m.Event.Event.ID] = true+ }+ again := MapSession(ref, records, MapOptions{})+ for i := range mapped {+ if again[i].Event.Event.ID != mapped[i].Event.Event.ID {+ t.Fatal("event ids must be deterministic, so a second sync never duplicates the link")+ }+ }+}diff --git a/cli/beacon/internal/dshsession/mapper.go b/cli/beacon/internal/dshsession/mapper.goindex 02c43172..6e594b6f 100644--- a/cli/beacon/internal/dshsession/mapper.go+++ b/cli/beacon/internal/dshsession/mapper.go@@ -133,6 +133,11 @@ func (m *mapper) emitPrompt(record Record) {})ev.Raw = m.rawDsh(record, nil)m.append(record, "prompt.submitted", ev)+ if info, ok := asymptoteobserve.ParseHandoffMarker(text); ok {+ link := m.base(record, "session.handoff", "session", schema.SeverityInfo, "Session continued from a "+info.SourceHarness+" session")+ link.Handoff = &info+ m.append(record, "prompt.submitted.handoff", link)+ }}func (m *mapper) emitAssistant(record Record) {diff --git a/cli/beacon/internal/dshsession/store.go b/cli/beacon/internal/dshsession/store.goindex f92df0da..25558a69 100644--- a/cli/beacon/internal/dshsession/store.go+++ b/cli/beacon/internal/dshsession/store.go@@ -164,8 +164,13 @@ func (s *Store) readMeta(ref SessionRef) *SessionMeta {meta.ID = firstString(record.Data, "id", "sessionId", "session_id")meta.CWD = firstString(record.Data, "cwd", "workingDirectory", "working_directory")meta.ParentSessionID = firstString(record.Data, "parentSession", "parent_session", "parentSessionId")+ meta.Origin = firstString(record.Data, "origin")case "session/title":meta.Title = firstString(record.Data, "title")+ case "user/message":+ if meta.FirstPrompt == "" {+ meta.FirstPrompt = strings.TrimSpace(userMessageText(record.Data))+ }case "request/header":meta.Model = requestHeaderModel(record.Data)}@@ -173,7 +178,7 @@ func (s *Store) readMeta(ref SessionRef) *SessionMeta {break}}- if meta.ID == "" && meta.CWD == "" && meta.ParentSessionID == "" && meta.Title == "" && meta.Model == "" {+ if meta.ID == "" && meta.CWD == "" && meta.ParentSessionID == "" && meta.Origin == "" && meta.Title == "" && meta.FirstPrompt == "" && meta.Model == "" {return nil}return metadiff --git a/cli/beacon/internal/dshsession/types.go b/cli/beacon/internal/dshsession/types.goindex 133bf14d..7b54f401 100644--- a/cli/beacon/internal/dshsession/types.go+++ b/cli/beacon/internal/dshsession/types.go@@ -81,8 +81,13 @@ type SessionMeta struct {ID stringCWD stringParentSessionID string- Title string- Model string+ // Origin is "subagent" for a session DSH spawned for delegated work. A fork also names its+ // parent session, but has no origin.+ Origin string+ Title string+ // FirstPrompt is the first prompt's text, for naming a session DSH has not titled.+ FirstPrompt string+ Model string}type Stats struct {diff --git a/cli/beacon/internal/handoff/dsh.go b/cli/beacon/internal/handoff/dsh.gonew file mode 100644index 00000000..733c840d--- /dev/null+++ b/cli/beacon/internal/handoff/dsh.go@@ -0,0 +1,78 @@+package handoff++import (+ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/dshsession"+ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/schema"+)++// DeepSeek Harness keeps one directory per session under $DSH_HOME/sessions, holding a record+// file whose first record names the session, where it ran, and the session it came from.++type dshSource struct{ dir string }++func (s *dshSource) Harness() string { return HarnessDSH }++// store reads dir as DSH_HOME, as `beacon endpoint dsh sync --dsh-home` does. Empty means the+// default, honouring $DSH_HOME.+func (s *dshSource) store() (*dshsession.Store, error) { return dshsession.NewStore(s.dir) }++func (s *dshSource) List() ([]Session, error) {+ store, err := s.store()+ if err != nil {+ return nil, err+ }+ if !store.Exists() {+ return nil, nil+ }+ refs, err := store.List()+ if err != nil {+ return nil, err+ }+ sessions := make([]Session, 0, len(refs))+ for _, ref := range refs {+ session := Session{+ Harness: HarnessDSH,+ ID: ref.ID,+ SourcePath: ref.Path,+ UpdatedAt: unixMS(ref.ModTimeUnixMS),+ }+ if meta := ref.Meta; meta != nil {+ session.Title = oneLine(firstNonEmpty(meta.Title, meta.FirstPrompt))+ session.Directory = meta.CWD+ // A fork names its parent session too, but is a session of its own; only a session DSH+ // spawned for delegated work is a subagent.+ if meta.Origin == "subagent" {+ session.Subagent, session.ParentID = true, meta.ParentSessionID+ }+ }+ sessions = append(sessions, session)+ }+ return sessions, nil+}++func (s *dshSource) Events(session Session) ([]schema.Event, error) {+ store, err := s.store()+ if err != nil {+ return nil, err+ }+ refs, err := store.List()+ if err != nil {+ return nil, err+ }+ for _, ref := range refs {+ if ref.ID != session.ID || ref.Path != session.SourcePath {+ continue+ }+ records, _, err := store.Read(ref)+ if err != nil {+ return nil, err+ }+ mapped := dshsession.MapSession(ref, records, dshsession.MapOptions{})+ events := make([]schema.Event, 0, len(mapped))+ for _, m := range mapped {+ events = append(events, m.Event)+ }+ return events, nil+ }+ return nil, errSessionGone(session)+}diff --git a/cli/beacon/internal/handoff/dsh_test.go b/cli/beacon/internal/handoff/dsh_test.gonew file mode 100644index 00000000..2ae23d4b--- /dev/null+++ b/cli/beacon/internal/handoff/dsh_test.go@@ -0,0 +1,191 @@+package handoff++import (+ "errors"+ "os"+ "path/filepath"+ "reflect"+ "strings"+ "testing"+ "time"++ "github.com/klauspost/compress/zstd"++ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/testenv"+ "github.com/asymptote-labs/agent-beacon/pkg/asymptoteobserve"+)++var dshUpdated = time.Date(2026, 9, 24, 11, 0, 0, 0, time.UTC)++// dshRecord is one line of a DeepSeek Harness session record file.+func dshRecord(t *testing.T, kind string, data map[string]interface{}) string {+ return jsonLine(t, map[string]interface{}{"type": kind, "time": "2026-09-24T10:59:00Z", "data": data})+}++// writeDSHSession writes a session record file as DSH does: one zstd frame per append, in the+// session's own directory under $DSH_HOME/sessions, beside its lock file.+func writeDSHSession(t *testing.T, dir string, updated time.Time, lines ...string) string {+ t.Helper()+ enc, err := zstd.NewWriter(nil)+ if err != nil {+ t.Fatal(err)+ }+ defer enc.Close()+ var frames []byte+ for _, line := range lines {+ frames = enc.EncodeAll([]byte(line), frames)+ }+ path := filepath.Join(dir, "session.v3.jsonl.zstd")+ writeFixture(t, filepath.Join(dir, "session.lock"), "")+ if err := os.MkdirAll(dir, 0o755); err != nil {+ t.Fatal(err)+ }+ if err := os.WriteFile(path, frames, 0o644); err != nil {+ t.Fatal(err)+ }+ setModTime(t, path, updated)+ return path+}++// dshFixture lays down a DSH_HOME holding a titled session, a subagent it spawned, and a fork of it.+func dshFixture(t *testing.T) (StoreDirs, string) {+ t.Helper()+ testenv.SetHome(t, t.TempDir())+ isolateRuntimeEnv(t)+ home := filepath.Join(t.TempDir(), "dsh-home")+ dirs := StoreDirs{HarnessDSH: home}+ sessions := filepath.Join(home, "sessions", "--work-api--")++ main := writeDSHSession(t, filepath.Join(sessions, "dsh-sess-1"), dshUpdated,+ dshRecord(t, "session", map[string]interface{}{"id": "dsh-sess-1", "cwd": "/work/api", "isSeeded": false, "delegationDepth": 0}),+ dshRecord(t, "user/message", map[string]interface{}{"message": map[string]interface{}{"content": "add a rate limiter"}}),+ dshRecord(t, "session/title", map[string]interface{}{"title": "Add a\nrate limiter"}),+ dshRecord(t, "assistant/message", map[string]interface{}{"message": map[string]interface{}{+ "content": []interface{}{map[string]interface{}{"type": "text", "text": "Added a token bucket."}},+ }}))++ writeDSHSession(t, filepath.Join(sessions, "dsh-sub-1"), dshUpdated.Add(time.Minute),+ dshRecord(t, "session", map[string]interface{}{"id": "dsh-sub-1", "cwd": "/work/api", "parentSession": "dsh-sess-1", "origin": "subagent", "isSeeded": false, "delegationDepth": 1}),+ dshRecord(t, "user/message", map[string]interface{}{"message": map[string]interface{}{"content": "find the request handlers"}}))++ // A fork also names its parent session, but it is a session of its own.+ writeDSHSession(t, filepath.Join(sessions, "dsh-fork-1"), dshUpdated.Add(2*time.Minute),+ dshRecord(t, "session", map[string]interface{}{"id": "dsh-fork-1", "cwd": "/work/api", "parentSession": "dsh-sess-1", "isSeeded": true, "delegationDepth": 0}),+ dshRecord(t, "user/message", map[string]interface{}{"message": map[string]interface{}{"content": "try a sliding window instead"}}))+ return dirs, main+}++func TestListReadsDSHSessions(t *testing.T) {+ dirs, main := dshFixture(t)+ sessions, err := List(DefaultSources(dirs), Filter{Harness: HarnessDSH, IncludeSubagents: true})+ if err != nil {+ t.Fatalf("List: %v", err)+ }+ byID := map[string]Session{}+ for _, s := range sessions {+ byID[s.ID] = s+ }+ want := Session{Harness: HarnessDSH, ID: "dsh-sess-1", Title: "Add a rate limiter", Directory: "/work/api", SourcePath: main, UpdatedAt: dshUpdated}+ if got := byID["dsh-sess-1"]; !reflect.DeepEqual(got, want) {+ t.Fatalf("dsh session = %+v\nwant %+v", got, want)+ }+ if sub := byID["dsh-sub-1"]; !sub.Subagent || sub.ParentID != "dsh-sess-1" || sub.Title != "find the request handlers" {+ t.Fatalf("dsh subagent = %+v, want a subagent of dsh-sess-1", sub)+ }+ if fork := byID["dsh-fork-1"]; fork.Subagent || fork.ParentID != "" || fork.Title != "try a sliding window instead" {+ t.Fatalf("dsh fork = %+v, want a top-level session", fork)+ }++ top, err := List(DefaultSources(dirs), Filter{Harness: HarnessDSH})+ if err != nil {+ t.Fatal(err)+ }+ if got := strings.Join(sessionKeys(top), ","); got != "deepseek_harness/dsh-fork-1,deepseek_harness/dsh-sess-1" {+ t.Fatalf("top-level sessions = %s, want the fork and the session, newest first", got)+ }+}++func TestListWithoutADSHStore(t *testing.T) {+ testenv.SetHome(t, t.TempDir())+ isolateRuntimeEnv(t)+ sessions, err := (&dshSource{dir: filepath.Join(t.TempDir(), "missing")}).List()+ if err != nil || sessions != nil {+ t.Fatalf("List = %v, %v; want nothing and no error", sessions, err)+ }+}++func TestDSHHomeComesFromTheEnvironment(t *testing.T) {+ dirs, main := dshFixture(t)+ t.Setenv("DSH_HOME", dirs[HarnessDSH])+ session, err := Find(DefaultSources(StoreDirs{}), HarnessDSH, "dsh-sess-1")+ if err != nil || session.SourcePath != main {+ t.Fatalf("Find = %+v, %v", session, err)+ }+}++func TestDSHSessionBuildsABrief(t *testing.T) {+ dirs, _ := dshFixture(t)+ sources := DefaultSources(dirs)+ // A unique prefix finds the session too.+ session, err := Find(sources, HarnessDSH, "dsh-ses")+ if err != nil {+ t.Fatalf("Find: %v", err)+ }+ events, err := Events(sources, session)+ if err != nil {+ t.Fatalf("Events: %v", err)+ }+ brief := BuildBrief(session, events, FromSessionStore, time.Now())+ if brief.Prompts != 1 || !strings.Contains(brief.FirstRequest, "add a rate limiter") || !strings.Contains(brief.LastMessage, "token bucket") {+ t.Fatalf("brief prompts=%d first=%q last=%q", brief.Prompts, brief.FirstRequest, brief.LastMessage)+ }+ if !strings.Contains(brief.Render(), "DeepSeek Harness") {+ t.Fatalf("the brief should name DeepSeek Harness:\n%s", brief.Render())+ }+}++func TestDSHSessionGoneFromItsStore(t *testing.T) {+ dirs, main := dshFixture(t)+ session := Session{Harness: HarnessDSH, ID: "dsh-sess-1", SourcePath: main + ".moved"}+ if _, err := Events(DefaultSources(dirs), session); !errors.Is(err, ErrNotFound) {+ t.Fatalf("Events = %v, want ErrNotFound", err)+ }+}++func TestPlanResumeContinuesADSHSessionElsewhere(t *testing.T) {+ session := resumableSession(t, HarnessDSH, "dsh-1")+ // Beacon cannot start dsh, so its sessions need --agent.+ _, err := PlanResume(session, PlanOptions{BriefPath: filepath.Join(t.TempDir(), "b.md"), LookPath: allRuntimes})+ if err == nil || !strings.Contains(err.Error(), "cannot start DeepSeek Harness") || !strings.Contains(err.Error(), "--agent") {+ t.Fatalf("resume without --agent err = %v", err)+ }+ if _, err := PlanResume(resumableSession(t, HarnessClaude, "s-1"), PlanOptions{Target: HarnessDSH, LookPath: allRuntimes}); err == nil || !strings.Contains(err.Error(), "DeepSeek Harness cannot be started") {+ t.Fatalf("--agent dsh err = %v", err)+ }++ brief := filepath.Join(t.TempDir(), "brief.md")+ plan, err := PlanResume(session, PlanOptions{Target: HarnessClaude, BriefPath: brief, LookPath: allRuntimes})+ if err != nil {+ t.Fatalf("PlanResume: %v", err)+ }+ if plan.Mode != ModeNewSession || plan.Reason != ReasonOtherRuntime || plan.Executable != "/bin/claude" || len(plan.Args) != 1 {+ t.Fatalf("plan = %+v", plan)+ }+ if !strings.HasSuffix(plan.Args[0], "[beacon-handoff from=deepseek_harness session=dsh-1]") {+ t.Fatalf("the prompt should carry the handoff marker: %q", plan.Args[0])+ }+ if info, ok := asymptoteobserve.ParseHandoffMarker(plan.Args[0]); !ok || info.SourceHarness != HarnessDSH || info.SourceSessionID != "dsh-1" {+ t.Fatalf("marker = %+v, %v", info, ok)+ }+}++func TestParseHarnessAcceptsDSHNames(t *testing.T) {+ for _, name := range []string{"dsh", "deepseek", "deepseek_harness", "DeepSeek-Harness"} {+ if got, err := ParseHarness(name); err != nil || got != HarnessDSH {+ t.Fatalf("ParseHarness(%q) = %q, %v", name, got, err)+ }+ }+ if strings.Contains(strings.Join(StartableNames(), ","), "dsh") {+ t.Fatalf("StartableNames = %v, want no dsh", StartableNames())+ }+}diff --git a/cli/beacon/internal/handoff/fixtures_test.go b/cli/beacon/internal/handoff/fixtures_test.goindex e9c90e3f..c242c9ed 100644--- a/cli/beacon/internal/handoff/fixtures_test.go+++ b/cli/beacon/internal/handoff/fixtures_test.go@@ -24,7 +24,7 @@ var (// runtime the fixture leaves at its default reads only the test's HOME.func isolateRuntimeEnv(t *testing.T) {t.Helper()- for _, name := range []string{"PI_CODING_AGENT_DIR", "PRIME_AGENT_CODING_AGENT_DIR"} {+ for _, name := range []string{"PI_CODING_AGENT_DIR", "PRIME_AGENT_CODING_AGENT_DIR", "DSH_HOME"} {t.Setenv(name, "")}}diff --git a/cli/beacon/internal/handoff/resume.go b/cli/beacon/internal/handoff/resume.goindex 2b30824d..ab4dc7fd 100644--- a/cli/beacon/internal/handoff/resume.go+++ b/cli/beacon/internal/handoff/resume.go@@ -72,8 +72,11 @@ func PlanResume(session Session, opts PlanOptions) (Plan, error) {target = opts.Target}targetCommand, ok := commandFor(target)+ if !ok && opts.Target == "" {+ return Plan{}, fmt.Errorf("beacon handoff cannot start %s; continue the session in another runtime with --agent (supported: %s)", RuntimeLabel(target), strings.Join(StartableNames(), ", "))+ }if !ok {- return Plan{}, fmt.Errorf("%s sessions cannot be started by beacon handoff (supported: %s)", target, strings.Join(StartableNames(), ", "))+ return Plan{}, fmt.Errorf("%s cannot be started by beacon handoff (supported: %s)", RuntimeLabel(target), strings.Join(StartableNames(), ", "))}dir, err := resumeDir(session, opts.Dir)if err != nil {diff --git a/cli/beacon/internal/handoff/runtimes.go b/cli/beacon/internal/handoff/runtimes.goindex 76162102..6f67339a 100644--- a/cli/beacon/internal/handoff/runtimes.go+++ b/cli/beacon/internal/handoff/runtimes.go@@ -7,6 +7,7 @@ import ("github.com/asymptote-labs/agent-beacon/cli/beacon/internal/claudesession""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/clinesession""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/codexsession"+ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/dshsession""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/opencodesession""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/pisession""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/primesession"@@ -53,6 +54,7 @@ const (HarnessCline = clinesession.HarnessHarnessPi = pisession.HarnessHarnessPrime = primesession.Harness+ HarnessDSH = dshsession.Harness)// runtimes lists every runtime handoff supports, in display order.@@ -149,6 +151,14 @@ var runtimes = []Runtime{NewSession: func(prompt string) []string { return []string{"--", prompt} },},},+ {+ Harness: HarnessDSH,+ Label: "DeepSeek Harness",+ Aliases: []string{"dsh", "deepseek"},+ NewSource: func(dir string) Source { return &dshSource{dir: dir} },+ // dsh has no interactive terminal session to start: `--profile headless` answers one task+ // and exits, and `dsh web` is a browser UI. Its sessions continue in another runtime.+ },}// Harnesses lists the runtimes handoff supports, in display order.diff --git a/docs/cli/handoff.mdx b/docs/cli/handoff.mdxindex 4b458e2b..74e06d5d 100644--- a/docs/cli/handoff.mdx+++ b/docs/cli/handoff.mdx@@ -25,10 +25,11 @@ Sessions come from each runtime's own local session store, not from Beacon's run| Cline | `~/.cline/data` | `cline` || Pi | `~/.pi/agent/sessions` (or under `PI_CODING_AGENT_DIR`) | `pi` || Prime Agent | `~/.prime/agent`, both `sessions` and `session-artifacts` (or `PRIME_AGENT_CODING_AGENT_DIR`) | `prime` |+| DeepSeek Harness | `~/.dsh/sessions` (or under `DSH_HOME`) | `dsh` |-When a Codex thread has more than one rollout file, `beacon handoff` lists it once, under its newest file. Cline can hold the same task both as a CLI session and in its older task history; the CLI session is the copy that is listed. Cline kanban cards are not sessions and are not listed. Prime Agent subagent transcripts, under `session-artifacts`, are listed as subagents of the session that started them.+When a Codex thread has more than one rollout file, `beacon handoff` lists it once, under its newest file. Cline can hold the same task both as a CLI session and in its older task history; the CLI session is the copy that is listed. Cline kanban cards are not sessions and are not listed. Prime Agent subagent transcripts, under `session-artifacts`, are listed as subagents of the session that started them. A DeepSeek Harness session that DSH spawned for delegated work is listed as a subagent of the session that started it; a fork of a session is listed as a session of its own.-`--store-dir <runtime>=<path>` takes the location in the table: for Pi its sessions directory, as `beacon endpoint pi sync --sessions-dir` does, and for Prime Agent the agent directory holding both of its roots.+`--store-dir <runtime>=<path>` takes the location in the table: for Pi its sessions directory, as `beacon endpoint pi sync --sessions-dir` does, for Prime Agent the agent directory holding both of its roots, and for DeepSeek Harness its `DSH_HOME`, as `beacon endpoint dsh sync --dsh-home` does.## `beacon handoff list`@@ -43,7 +44,7 @@ beacon handoff list --json| Flag | Description ||------|-------------|-| `--harness` | Only this runtime: `claude`, `codex`, `opencode`, or `cline`. |+| `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime` or `dsh`. || `--here` | Only sessions that ran in the current directory or below it. || `--dir` | Only sessions that ran in this directory or below it. || `--subagents` | Include subagent sessions. They are hidden by default, because resuming one resumes a fragment of its parent's task. |@@ -126,6 +127,8 @@ There are two ways to resume:Claude Code, Cline and Prime Agent subagent sessions, and Cline's older task history, can't be reopened by their CLIs, so they always continue from a brief. A session known only from Beacon's runtime log also continues from a brief, and it needs `--agent` if its own runtime isn't one Beacon can start.+Beacon cannot start DeepSeek Harness, because it has no interactive terminal session to start: `dsh --profile headless` answers one task and exits, and `dsh web` is a browser UI. A DeepSeek Harness session therefore continues in another runtime, named with `--agent`, and `--agent dsh` is refused.+Cline approves every tool call by default. Beacon always passes `--auto-approve false`, so a session Beacon starts never gets auto-approval on Beacon's say-so. You can still turn it on inside the Cline TUI.The runtime runs in this terminal, in the session's recorded directory. If that directory no longer exists, Beacon stops rather than starting somewhere else; pass `--cwd` to choose a directory. Beacon prints the plan and asks `Continue? [Y/n]` before launching. Without a terminal, it launches only with `--yes`. `beacon handoff resume` exits with the runtime's own exit code.@@ -163,7 +166,7 @@ The link event keeps the new session's id, workspace and harness, and leaves theTwo paths record the link:- **Live hooks.** The prompt hook for Claude Code and the Cline and OpenCode plugins record it as the prompt is sent (`harness.collection_method: hook`).-- **Session-store sync.** `beacon endpoint claude sync`, `codex sync`, `opencode sync`, `cline sync`, `pi sync` and `prime sync` record it when they read the prompt back from the runtime's store (`harness.collection_method: poll`).+- **Session-store sync.** `beacon endpoint claude sync`, `codex sync`, `opencode sync`, `cline sync`, `pi sync`, `prime sync` and `dsh sync` record it when they read the prompt back from the runtime's store (`harness.collection_method: poll`).Codex CLI prompts reach Beacon over OTLP and through `beacon endpoint codex sync`, not a prompt hook, so a session continued in Codex is linked by the sync. For a runtime that also has a prompt hook or plugin, a sync can record the same link the hook already did; the two carry different `collection_method` values, as every other event those runtimes report through both paths does. A sync's link has a deterministic `event.id`, so syncing again never duplicates it.