Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Merge origin/main into claude/gallant-curie-cqv4rr-i-hermes

Claude5e249a2526ee
diff --cc cli/beacon/internal/handoff/resume.go
index 33429431,ab4dc7fd..8e74e7fd
--- a/cli/beacon/internal/handoff/resume.go
+++ b/cli/beacon/internal/handoff/resume.go
@@@ -72,19 -72,12 +72,22 @@@ func PlanResume(session Session, opts P
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(), ", "))
}
+ reason := nativeBlocker(session, target, opts)
+ // Said before anything else is checked, since no directory or install fixes it.
+ if reason != "" && targetCommand.NewSession == nil {
+ others := strings.Join(BriefTargetNames(), ", ")
+ if reason == ReasonOtherRuntime {
+ return Plan{}, fmt.Errorf("%s can only reopen its own sessions; it cannot start a new session from a brief (pass --agent with one of: %s)", RuntimeLabel(target), others)
+ }
+ return Plan{}, fmt.Errorf("%s cannot start a new session from a brief, which this session needs because %s; pass --agent to continue in one of: %s",
+ RuntimeLabel(target), ReasonText(reason), others)
+ }
dir, err := resumeDir(session, opts.Dir)
if err != nil {
return Plan{}, err
diff --cc cli/beacon/internal/handoff/runtimes.go
index c23fe3b0,b7d3daf3..8a0e8d6b
--- a/cli/beacon/internal/handoff/runtimes.go
+++ b/cli/beacon/internal/handoff/runtimes.go
@@@ -8,8 -8,8 +8,9 @@@ import
"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/copilotsession"
+ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/dshsession"
"github.com/asymptote-labs/agent-beacon/cli/beacon/internal/factorysession"
+ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/hermessession"
"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"
@@@ -58,7 -58,7 +59,8 @@@ const
HarnessPrime = primesession.Harness
HarnessFactory = factorysession.Harness
HarnessCopilot = copilotsession.Harness
+ HarnessHermes = hermessession.Harness
+ HarnessDSH = dshsession.Harness
// Runtimes Beacon starts but whose sessions it reads only from the runtime log.
HarnessOhMyPi = "omp"
@@@ -199,29 -199,16 +201,39 @@@ var runtimes = []Runtime
Env: map[string]string{"COPILOT_ALLOW_ALL": "", "COPILOT_PLAN_THEN_AUTOPILOT": ""},
},
},
+ {
+ Harness: HarnessHermes,
+ Label: "Hermes Agent",
+ Aliases: []string{"hermes-agent"},
+ NewSource: func(path string) Source { return &hermesSource{path: path} },
+ Command: &runtimeCommand{
+ Executable: "hermes",
+ Resume: func(s Session) ([]string, bool) {
+ // A delegate subagent ran one task for its parent; reopening it alone reopens a fragment.
+ if s.Subagent {
+ return nil, false
+ }
+ // Hermes looks the id up in its state database, follows a compressed session on to its
+ // latest continuation, and changes into the session's recorded directory itself.
+ return []string{"--resume", s.ID}, true
+ },
+ // NewSession is nil: Hermes has no interactive start with a first message, only one-shot
+ // runs (chat -q, -z), and -z bypasses approvals. It reopens its own sessions only.
+ //
+ // HERMES_YOLO_MODE, inherited from the shell, would bypass every dangerous-command approval.
+ Env: map[string]string{"HERMES_YOLO_MODE": ""},
+ },
+ },
+ {
+ Harness: HarnessDSH,
+ Label: "DeepSeek Harness",
+ Aliases: []string{"dsh"},
+ 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.
+ // Bare "deepseek" is not an alias: it names the vendor and its models, and a runtime-log row
+ // stamped with it came from a provider route, not from DeepSeek Harness.
+ },
// The runtimes below keep no session store Beacon reads. Their sessions come from Beacon's
// runtime log, so they always continue from a brief; each can also be the runtime another
diff --cc docs/cli/handoff.mdx
index a1232cad,3840a5f7..258f4c52
--- a/docs/cli/handoff.mdx
+++ b/docs/cli/handoff.mdx
@@@ -27,11 -27,11 +27,12 @@@ Sessions come from each runtime's own l
| Prime Agent | `~/.prime/agent`, both `sessions` and `session-artifacts` (or `PRIME_AGENT_CODING_AGENT_DIR`) | `prime` |
| Factory Droid | `~/.factory/sessions` | `droid` |
| GitHub Copilot CLI | `~/.copilot/session-state` | `copilot` |
+| Hermes Agent | `~/.hermes/state.db` | `hermes` |
+ | 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. Hermes Agent delegate subagents are listed as subagents of the session that spawned them. When Hermes compresses a long conversation it continues it in a new session; each of those sessions is listed, and reopening any of them reopens the latest.
-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.
++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. Hermes Agent delegate subagents are listed as subagents of the session that spawned them. When Hermes compresses a long conversation it continues it in a new session; each of those sessions is listed, and reopening any of them reopens the latest. 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. For Factory Droid it is the sessions directory, as `beacon endpoint factory sync --sessions-dir` does. For GitHub Copilot CLI it is the `~/.copilot` directory that holds `session-state`, as `beacon endpoint copilot sync --copilot-dir` does. For Hermes Agent it is the `state.db` file, as `beacon endpoint hermes sync --db` does.
-`--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. For Factory Droid it is the sessions directory, as `beacon endpoint factory sync --sessions-dir` does. For GitHub Copilot CLI it is the `~/.copilot` directory that holds `session-state`, as `beacon endpoint copilot sync --copilot-dir` does. For DeepSeek Harness it is its `DSH_HOME`, as `beacon endpoint dsh sync --dsh-home` does.
++`--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. For Factory Droid it is the sessions directory, as `beacon endpoint factory sync --sessions-dir` does. For GitHub Copilot CLI it is the `~/.copilot` directory that holds `session-state`, as `beacon endpoint copilot sync --copilot-dir` does. For Hermes Agent it is the `state.db` file, as `beacon endpoint hermes sync --db` does. For DeepSeek Harness it is its `DSH_HOME`, as `beacon endpoint dsh sync --dsh-home` does.
### Runtimes Beacon starts but does not read
@@@ -64,7 -64,7 +65,7 @@@ beacon handoff list --jso
| Flag | Description |
|------|-------------|
- | `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime`, `droid`, `copilot` or `hermes`. |
-| `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime`, `droid`, `copilot` or `dsh`. |
++| `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime`, `droid`, `copilot`, `hermes` 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. |
@@@ -159,10 -158,10 +160,12 @@@ There are two ways to resume
The prompt names the brief by its path and asks the agent to read it, then confirm the task before changing anything. The brief is never inlined into the command line, because a command line is visible to every local user through the process table. The prompt ends with a handoff marker (see below).
-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.
+Hermes Agent has no row in the second table: its CLI has no way to start an interactive session with a first message, only one-shot runs, so it can't continue a session from a brief. A Hermes session continues from a brief in another runtime (`--agent`), and `--agent hermes` reopens only Hermes's own sessions.
+
+Claude Code, Cline, Prime Agent and Hermes 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 same holds for every runtime Beacon starts. Oh My Pi and goose approve every tool call by default, so Beacon passes `--approval-mode=always-ask` to Oh My Pi and sets `GOOSE_MODE=approve` for goose. Where a CLI takes an approval mode, Beacon names the mode that asks (Gemini CLI, Qwen Code, Muse Code, and Devin CLI, whose `DEVIN_PERMISSION_MODE` could otherwise hold `dangerous`), so a user or project setting that approves everything does not carry over. Beacon never passes a flag that turns approvals off.
@@@ -206,7 -203,7 +209,7 @@@ The link event keeps the new session's
Two paths record the link:
- **Live hooks and plugins.** Every runtime whose prompts Beacon captures as they are sent records it: the shared prompt hook (Claude Code, Cursor, Factory Droid, Qwen Code, Kiro, Kimi Code, Devin, Muse Code, OpenHands, Grok Build, DeepSeek Harness, Hermes Agent, VS Code), Antigravity (including the prompt it recovers from its transcript when the prompt hook does not fire), the Cline, OpenCode and OpenClaw plugins, and the Pi, Oh My Pi, Prime Agent and Senpi extensions (`harness.collection_method` `hook` or `plugin`).
- - **Session-store sync.** `beacon endpoint claude sync`, `codex sync`, `opencode sync`, `cline sync`, `pi sync`, `prime sync`, `factory sync`, `copilot sync` and `hermes 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`, `factory sync`, `copilot sync` and `dsh 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`, `factory sync`, `copilot sync`, `hermes 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. The same holds for GitHub Copilot CLI, whose live path is OTLP: `beacon endpoint copilot sync` records the link. 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.