Skip to content

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

Merge main into this branch

Claude3b71e6f2fa27
diff --cc cli/beacon/internal/handoff/resume_test.go
index a4fdc5ee,f5afcc5b..128838cf
--- a/cli/beacon/internal/handoff/resume_test.go
+++ b/cli/beacon/internal/handoff/resume_test.go
@@@ -24,7 -24,8 +24,7 @@@ func installed(names ...string) func(st
}
}
- var allRuntimes = installed("claude", "codex", "opencode", "cline", "pi", "prime-agent", "fx")
-var allRuntimes = installed("claude", "codex", "opencode", "cline", "pi", "prime-agent",
- "omp", "gemini", "qwen", "kiro-cli", "agy", "devin", "muse", "openhands", "goose")
++var allRuntimes = installed("claude", "codex", "opencode", "cline", "pi", "prime-agent", "omp", "gemini", "qwen", "kiro-cli", "agy", "devin", "muse", "openhands", "goose", "fx")
// 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.go
index 0bed6668,c23c418d..fd2d2b16
--- a/cli/beacon/internal/handoff/runtimes.go
+++ b/cli/beacon/internal/handoff/runtimes.go
@@@ -57,7 -53,17 +57,18 @@@ const
HarnessCline = clinesession.Harness
HarnessPi = pisession.Harness
HarnessPrime = primesession.Harness
+ HarnessFx = fxsession.Harness
+
+ // Runtimes Beacon starts but whose sessions it reads only from the runtime log.
+ HarnessOhMyPi = "omp"
+ HarnessGemini = "gemini_cli"
+ HarnessQwen = "qwen_code"
+ HarnessKiro = "kiro"
+ HarnessAntigravity = "antigravity_cli"
+ HarnessDevin = "devin-cli"
+ HarnessMuse = "muse_code"
+ HarnessOpenHands = "openhands"
+ HarnessGoose = "goose"
)
// runtimes lists every runtime handoff supports, in display order.
@@@ -154,22 -160,103 +165,119 @@@ var runtimes = []Runtime
NewSession: func(prompt string) []string { return []string{"--", prompt} },
},
},
+ {
+ 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.
+ },
+ },
+
+ // 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
+ // session continues in. Where a CLI lets its approval mode be set, the command pins the mode
+ // that asks, so a user or project setting that approves everything does not carry over to a
+ // session Beacon starts.
+ {
+ Harness: HarnessOhMyPi,
+ Label: "Oh My Pi",
+ Aliases: []string{"oh-my-pi"},
+ // Oh My Pi approves every tool call by default (tools.approvalMode "yolo").
+ Command: &runtimeCommand{
+ Executable: "omp",
+ NewSession: func(prompt string) []string { return []string{"--approval-mode=always-ask", prompt} },
+ },
+ },
+ {
+ Harness: HarnessGemini,
+ Label: "Gemini CLI",
+ Aliases: []string{"gemini", "gemini-cli"},
+ Command: &runtimeCommand{
+ Executable: "gemini",
+ NewSession: func(prompt string) []string {
+ return []string{"--approval-mode", "default", "--prompt-interactive", prompt}
+ },
+ },
+ },
+ {
+ Harness: HarnessQwen,
+ Label: "Qwen Code",
+ Aliases: []string{"qwen", "qwen-code"},
+ // A positional prompt is one-shot in Qwen Code; --prompt-interactive keeps the session open.
+ Command: &runtimeCommand{
+ Executable: "qwen",
+ NewSession: func(prompt string) []string {
+ return []string{"--approval-mode", "default", "--prompt-interactive", prompt}
+ },
+ },
+ },
+ {
+ Harness: HarnessKiro,
+ Label: "Kiro",
+ Aliases: []string{"kiro-cli"},
+ Command: &runtimeCommand{
+ Executable: "kiro-cli",
+ NewSession: func(prompt string) []string { return []string{"chat", prompt} },
+ },
+ },
+ {
+ Harness: HarnessAntigravity,
+ Label: "Antigravity CLI",
+ Aliases: []string{"antigravity", "agy"},
+ Command: &runtimeCommand{
+ Executable: "agy",
+ NewSession: func(prompt string) []string { return []string{"--prompt-interactive", prompt} },
+ },
+ },
+ {
+ Harness: HarnessDevin,
+ Label: "Devin CLI",
+ // Beacon's Devin CLI hooks record "devin-cli"; hooks written by older versions recorded
+ // "devin", which reaches this entry through its alias.
+ Aliases: []string{"devin"},
+ // DEVIN_PERMISSION_MODE can hold "dangerous", which approves every tool; the flag wins over
+ // it. Devin reads a bare argument as a path to open, so the prompt follows --.
+ Command: &runtimeCommand{
+ Executable: "devin",
+ NewSession: func(prompt string) []string { return []string{"--permission-mode", "auto", "--", prompt} },
+ },
+ },
+ {
+ Harness: HarnessMuse,
+ Label: "Muse Code",
+ Aliases: []string{"muse", "muse-code"},
+ Command: &runtimeCommand{
+ Executable: "muse",
+ NewSession: func(prompt string) []string { return []string{"--approval-mode", "on-request", prompt} },
+ },
+ },
+ {
+ Harness: HarnessOpenHands,
+ Label: "OpenHands",
+ Command: &runtimeCommand{
+ Executable: "openhands",
+ NewSession: func(prompt string) []string { return []string{"--task", prompt} },
+ },
+ },
+ {
+ Harness: HarnessGoose,
+ Label: "goose",
+ // goose approves every tool call by default and has no flag for its mode, only GOOSE_MODE.
+ Command: &runtimeCommand{
+ Executable: "goose",
+ NewSession: func(prompt string) []string { return []string{"run", "--interactive", "--text", prompt} },
+ Env: map[string]string{"GOOSE_MODE": "approve"},
+ },
+ },
}
// Harnesses lists the runtimes handoff supports, in display order.
diff --cc docs/cli/handoff.mdx
index 9698295a,26095a20..c9c4b404
--- a/docs/cli/handoff.mdx
+++ b/docs/cli/handoff.mdx
@@@ -29,10 -28,26 +29,28 @@@ Sessions come from each runtime's own l
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.
-`--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 fx its sessions directory, as `beacon endpoint fx sync --sessions-dir` does.
+
+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
+
+ Beacon keeps no reader for these runtimes' own session stores, so `list` does not show their sessions. `export` and `resume` still find one by id in Beacon's runtime log, and they can be the runtime another session continues in (`--agent`):
+
+ | Runtime | `--agent` |
+ |---------|-----------|
+ | Oh My Pi | `omp` |
+ | Gemini CLI | `gemini` |
+ | Qwen Code | `qwen` |
+ | Kiro | `kiro` |
+ | Antigravity CLI | `agy` |
+ | Devin CLI | `devin` |
+ | Muse Code | `muse` |
+ | OpenHands | `openhands` |
+ | goose | `goose` |
+
+ Kimi Code can only take a prompt non-interactively, and Senpi (`omo`) moves Pi's agent directory into its own the first time it runs, so Beacon does not start them.
+
## `beacon handoff list`
Lists resumable sessions, newest first.
@@@ -130,10 -153,10 +157,12 @@@ 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.
+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.
+
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.
+
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.
| Flag | Description |