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
Merge remote-tracking branch 'origin/main' into claude/gallant-curie-cqv4rr-m-cursor
Claude720e59a6c824
diff --cc cli/beacon/internal/handoff/resume_test.goindex 35156383,f014eab3..505464ca--- a/cli/beacon/internal/handoff/resume_test.go+++ b/cli/beacon/internal/handoff/resume_test.go@@@ -26,7 -26,7 +26,7 @@@ func installed(names ...string) func(stvar allRuntimes = installed("claude", "codex", "opencode", "cline", "pi", "prime-agent", "droid","omp", "gemini", "qwen", "kiro-cli", "agy", "devin", "muse", "openhands", "goose", "copilot",- "hermes", "cursor-agent")- "hermes", "fx")++ "hermes", "fx", "cursor-agent")// resumableSession is a session whose directory and session file both exist.func resumableSession(t *testing.T, harness, id string) Session {diff --cc cli/beacon/internal/handoff/runtimes.goindex f0b9fa0d,e46f6234..d7bce59b--- a/cli/beacon/internal/handoff/runtimes.go+++ b/cli/beacon/internal/handoff/runtimes.go@@@ -8,9 -8,9 +8,10 @@@ 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/cursorsession""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/fxsession""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"@@@ -65,7 -65,7 +66,8 @@@ constHarnessCopilot = copilotsession.HarnessHarnessHermes = hermessession.HarnessHarnessDSH = dshsession.Harness+ HarnessFx = fxsession.Harness+ HarnessCursor = cursorsession.Harness// Runtimes Beacon starts but whose sessions it reads only from the runtime log.HarnessOhMyPi = "omp"@@@ -239,26 -239,22 +241,42 @@@ var runtimes = []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.},+ {+ Harness: HarnessFx,+ Label: "fx",+ Aliases: []string{"fx"},+ NewSource: func(dir string) Source { return &fxSource{dir: dir} },+ Command: &runtimeCommand{+ Executable: "fx",+ // fx looks a session id up within the workspace it runs in; the plan starts it in the+ // session's workspace root.+ Resume: func(s Session) ([]string, bool) { return []string{"--resume", s.ID}, true },+ // fx resumes only sessions of the workspace it is started in.+ ResumesInSessionDir: true,+ // No NewSession: fx has no interactive session that starts from a prompt (`fx ask` is+ // one-shot), so it reopens its own sessions but cannot pick one up from a brief.+ },+ },+ {+ Harness: HarnessCursor,+ Label: "Cursor",+ NewSource: func(dir string) Source { return &cursorSource{dir: dir} },+ // cursor-agent asks before running commands unless given --force; Beacon never passes it.+ Command: &runtimeCommand{+ Executable: "cursor-agent",+ Resume: func(s Session) ([]string, bool) {+ // --resume takes a CLI chat id. IDE conversations and subagent transcripts are not+ // chats the CLI can load.+ if !cursorCLIChat(s) {+ return nil, false+ }+ return []string{"--resume", s.ID}, true+ },+ NewSession: func(prompt string) []string { return []string{prompt} },+ // cursor-agent looks a chat id up under a hash of the directory it is started in.+ ResumesInSessionDir: true,+ },+ },// 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 anotherdiff --cc docs/cli/handoff.mdxindex 0a742bcf,9834c474..e5bb7880--- a/docs/cli/handoff.mdx+++ b/docs/cli/handoff.mdx@@@ -29,11 -29,13 +29,14 @@@ Sessions come from each runtime's own l| GitHub Copilot CLI | `~/.copilot/session-state` | `copilot` || Hermes Agent | `~/.hermes/state.db` | `hermes` || DeepSeek Harness | `~/.dsh/sessions` (or under `DSH_HOME`) | `dsh` |+ | fx | `~/.fx/sessions` | `fx` |+| Cursor | `~/.cursor/projects` (agent transcripts) and Cursor's global storage `state.vscdb` (Composer conversations) | `cursor` |-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.+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. A Cursor conversation can be stored both as a transcript and as a Composer record under one id; it is listed once, as the transcript when `cursor-agent` can reopen it and as the Composer record otherwise. Cursor subagent transcripts are listed as subagents of the conversation that started them.- `--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. For Cursor it is the projects directory, as `beacon endpoint cursor sync --projects-dir` does. Cursor's global storage database is always read from its default location.-`--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. For fx it is its sessions directory, as `beacon endpoint fx sync --sessions-dir` 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. For fx it is its sessions directory, as `beacon endpoint fx sync --sessions-dir` does. For Cursor it is the projects directory, as `beacon endpoint cursor sync --projects-dir` does. Cursor's global storage database is always read from its default location.++ fx records no session title, so an fx session is listed under its first prompt, and its directory is the workspace fx last bound it to.### Runtimes Beacon starts but does not read@@@ -66,7 -68,7 +69,7 @@@ beacon handoff list --jso| Flag | Description ||------|-------------|- | `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime`, `droid`, `copilot`, `hermes`, `dsh` or `cursor`. |-| `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime`, `droid`, `copilot`, `hermes`, `dsh` or `fx`. |++| `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime`, `droid`, `copilot`, `hermes`, `dsh`, `fx` or `cursor`. || `--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. |@@@ -136,7 -138,7 +139,8 @@@ There are two ways to resume| Factory Droid | `droid --resume <id>` || GitHub Copilot CLI | `copilot --resume=<id>` || Hermes Agent | `hermes --resume <id>` |+ | fx | `fx --resume <id>`, in the session's workspace |+ | Cursor | `cursor-agent --resume <chat id>` (chats `cursor-agent` started only) |- **Start a new session from a brief.** Otherwise, or with `--agent` naming another runtime or with `--new`, Beacon writes a brief (see `export`) and starts a new session. The first message of that session points at the brief:@@@ -169,8 -170,8 +173,10 @@@ Claude Code, Cline, Prime Agent and HerBeacon 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.+ fx has no interactive session that starts from a prompt (`fx ask` runs one request and exits), so it is not in the new-session table. Beacon reopens an fx session natively, and continues it in another runtime with `--agent`; `--agent fx` for another runtime's session, `--new` on an fx session, and an fx session whose files are gone stop with an error rather than launching anything. fx looks a session id up within the workspace it runs in, so Beacon starts it in the session's workspace, and `--cwd` naming another directory stops with an error too, since fx could not find the session there. fx's default permission mode is `auto`, where a reviewer resolves permission requests, and fx has no command-line flag to change it. Beacon passes none: it reopens your own session under whatever permission mode your fx configuration sets.++`cursor-agent --resume` reopens only chats the CLI itself started, which it keeps under `~/.cursor/chats` (or `CURSOR_CONFIG_DIR`, or `$XDG_CONFIG_HOME/cursor`) keyed by the directory the chat ran in. Beacon reopens a Cursor session natively only when that chat store exists for the session's recorded directory, and only from that directory: with `--cwd` pointing elsewhere, it continues from a brief. Conversations from the Cursor IDE, Composer records, and subagent transcripts continue from a brief. Beacon never passes `--force` or `--yolo`, so `cursor-agent` still asks before running commands.+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.@@@ -214,7 -215,7 +220,7 @@@ The link event keeps the new session'sTwo 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`, `hermes sync`, `dsh sync` and `cursor 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`, `dsh sync` and `fx 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`, `dsh sync`, `fx sync` and `cursor 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.