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
fix(cline): honor CLINE_DIR for the plugin, discovery, inventory and sessions (#879)
Rudy Mizrahi Celekli3d626cefb4cf
diff --git a/cli/beacon/internal/clinesession/mapper_test.go b/cli/beacon/internal/clinesession/mapper_test.goindex fabb7591..b997c006 100644--- a/cli/beacon/internal/clinesession/mapper_test.go+++ b/cli/beacon/internal/clinesession/mapper_test.go@@ -5,6 +5,8 @@ import ("os""path/filepath""testing"++ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/testenv")func TestStoreListsTaskHistoryAndMapsEvents(t *testing.T) {@@ -201,3 +203,21 @@ func writeJSON(t *testing.T, path string, value interface{}) {t.Fatal(err)}}++func TestDefaultClineDirHonorsClineDir(t *testing.T) {+ home := t.TempDir()+ testenv.SetHome(t, home)+ t.Setenv("CLINE_DIR", "")+ if got := DefaultClineDir(); got != filepath.Join(home, ".cline") {+ t.Fatalf("default dir = %q", got)+ }+ custom := filepath.Join(t.TempDir(), "cline-state")+ t.Setenv("CLINE_DIR", custom)+ if got := DefaultClineDir(); got != custom {+ t.Fatalf("CLINE_DIR dir = %q, want %q", got, custom)+ }+ store, err := NewStore("")+ if err != nil || store.SessionsDir != filepath.Join(custom, "data", "sessions") {+ t.Fatalf("store = %+v, %v", store, err)+ }+}diff --git a/cli/beacon/internal/clinesession/store.go b/cli/beacon/internal/clinesession/store.goindex 172cdbb1..c6a8304f 100644--- a/cli/beacon/internal/clinesession/store.go+++ b/cli/beacon/internal/clinesession/store.go@@ -59,14 +59,25 @@ func NewStore(clineDir string) (*Store, error) {}, nil}-func DefaultClineDir() string {- home, err := os.UserHomeDir()- if err != nil || strings.TrimSpace(home) == "" {+// ClineDir is the Cline data directory for home, as Cline resolves it (resolveClineDir in+// sdk/packages/shared/src/storage/paths.ts): a trimmed, non-empty CLINE_DIR, else <home>/.cline.+// It is empty when CLINE_DIR is unset and home is empty.+func ClineDir(home string) string {+ if override := strings.TrimSpace(os.Getenv("CLINE_DIR")); override != "" {+ return override+ }+ if strings.TrimSpace(home) == "" {return ""}return filepath.Join(home, ".cline")}+// DefaultClineDir is ClineDir for the current user's home directory.+func DefaultClineDir() string {+ home, _ := os.UserHomeDir()+ return ClineDir(home)+}+func DefaultClineVSCodeStorageDir() string {home, err := os.UserHomeDir()if err != nil || strings.TrimSpace(home) == "" {diff --git a/cli/beacon/internal/endpoint/dashboard/hooks_status_test.go b/cli/beacon/internal/endpoint/dashboard/hooks_status_test.goindex 94a06e0b..3b55710b 100644--- a/cli/beacon/internal/endpoint/dashboard/hooks_status_test.go+++ b/cli/beacon/internal/endpoint/dashboard/hooks_status_test.go@@ -35,6 +35,7 @@ func TestHookStatusesReportClineWithItsPluginPath(t *testing.T) {home := t.TempDir()t.Setenv("HOME", home)t.Setenv("USERPROFILE", home)+ t.Setenv("CLINE_DIR", "")for _, status := range hookStatuses(filepath.Join(t.TempDir(), "runtime.jsonl"), true) {if status.Target != "cline" {diff --git a/cli/beacon/internal/endpoint/harness/harness_test.go b/cli/beacon/internal/endpoint/harness/harness_test.goindex d961f434..de388afc 100644--- a/cli/beacon/internal/endpoint/harness/harness_test.go+++ b/cli/beacon/internal/endpoint/harness/harness_test.go@@ -958,6 +958,7 @@ func clearCopilotEnv(t *testing.T) {func TestDiscoverClineDetectsConfigDirectoryWithoutAnExecutable(t *testing.T) {home := t.TempDir()testenv.SetHome(t, home)+ t.Setenv("CLINE_DIR", "")t.Setenv("PATH", t.TempDir())if err := os.MkdirAll(filepath.Join(home, ".cline"), 0755); err != nil {t.Fatalf("mkdir cline config dir: %v", err)@@ -979,6 +980,7 @@ func TestDiscoverClineDetectsConfigDirectoryWithoutAnExecutable(t *testing.T) {}func TestDiscoverClineTelemetryStatusVariants(t *testing.T) {+ t.Setenv("CLINE_DIR", "")cases := []struct {name stringplugin string@@ -1046,6 +1048,7 @@ func TestDiscoverClineDoesNotFallBackToAProjectPluginWhenHomeIsUnresolvable(t *t// Windows.t.Setenv("HOME", "")t.Setenv("USERPROFILE", "")+ t.Setenv("CLINE_DIR", "")pluginPath := filepath.Join(work, ".cline", "plugins", "beacon.ts")if err := os.MkdirAll(filepath.Dir(pluginPath), 0755); err != nil {diff --git a/cli/beacon/internal/endpoint/hooks/cline.go b/cli/beacon/internal/endpoint/hooks/cline.goindex c529c62d..6b920fa1 100644--- a/cli/beacon/internal/endpoint/hooks/cline.go+++ b/cli/beacon/internal/endpoint/hooks/cline.go@@ -2,11 +2,13 @@ package hooksimport ("encoding/json"+ "errors""fmt""os""path/filepath""strings"+ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/clinesession"clineplugin "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/hooks/assets/cline")@@ -184,11 +186,16 @@ func clinePluginPath(level Level) (string, error) {func clinePluginDir(level Level) (string, error) {switch level {case "", LevelUser:+ // Cline loads global plugins from <CLINE_DIR or ~/.cline>/plugins.home, err := os.UserHomeDir()- if err != nil {+ dir := clinesession.ClineDir(home)+ if dir == "" {+ if err == nil {+ err = errors.New("home directory is empty")+ }return "", err}- return filepath.Join(home, ".cline", "plugins"), nil+ return filepath.Join(dir, "plugins"), nilcase LevelProject:cwd, err := os.Getwd()if err != nil {diff --git a/cli/beacon/internal/endpoint/hooks/cline_test.go b/cli/beacon/internal/endpoint/hooks/cline_test.goindex 44022dbe..68949222 100644--- a/cli/beacon/internal/endpoint/hooks/cline_test.go+++ b/cli/beacon/internal/endpoint/hooks/cline_test.go@@ -7,6 +7,8 @@ import ("regexp""strings""testing"++ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/testenv")// clineRenderedArgv extracts the argv the installer substituted into the plugin.@@ -185,8 +187,8 @@ func TestClineEmbeddedPluginMatchesRootSource(t *testing.T) {func TestClinePluginPathsPerLevel(t *testing.T) {home := t.TempDir()- t.Setenv("HOME", home)- t.Setenv("USERPROFILE", home)+ testenv.SetHome(t, home)+ t.Setenv("CLINE_DIR", "")userPath, err := clinePluginPath(LevelUser)if err != nil {@@ -209,6 +211,33 @@ func TestClinePluginPathsPerLevel(t *testing.T) {}}+// Cline loads global plugins from $CLINE_DIR/plugins when CLINE_DIR is set, so the user-level+// plugin goes there; a project plugin stays in <cwd>/.cline/plugins.+func TestClinePluginPathFollowsClineDir(t *testing.T) {+ testenv.SetHome(t, t.TempDir())+ clineDir := t.TempDir()+ t.Setenv("CLINE_DIR", clineDir)+ userPath, err := clinePluginPath(LevelUser)+ if err != nil {+ t.Fatalf("clinePluginPath(user): %v", err)+ }+ if want := filepath.Join(clineDir, "plugins", "beacon.ts"); userPath != want {+ t.Fatalf("user plugin path = %q, want %q", userPath, want)+ }+ t.Chdir(t.TempDir())+ cwd, err := os.Getwd()+ if err != nil {+ t.Fatal(err)+ }+ projectPath, err := clinePluginPath(LevelProject)+ if err != nil {+ t.Fatalf("clinePluginPath(project): %v", err)+ }+ if want := filepath.Join(cwd, ".cline", "plugins", "beacon.ts"); projectPath != want {+ t.Fatalf("project plugin path = %q, want %q", projectPath, want)+ }+}+// A plugin file outlives a Beacon uninstall, a half-applied update, or a home directory restored// onto a machine where the binary lives elsewhere. In each case Cline loads a plugin that spawns// nothing, and reporting that as installed tells an operator telemetry is being collected when nonediff --git a/cli/beacon/internal/endpoint/inventory/inventory.go b/cli/beacon/internal/endpoint/inventory/inventory.goindex 4543649e..ba9afd28 100644--- a/cli/beacon/internal/endpoint/inventory/inventory.go+++ b/cli/beacon/internal/endpoint/inventory/inventory.go@@ -15,6 +15,7 @@ import ("github.com/pelletier/go-toml/v2""gopkg.in/yaml.v3"+ "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/endpoint/hooks")@@ -338,11 +339,14 @@ func opencodeCandidates(home, wd string) []candidate {}}+// clineCandidates resolves the user plugin through CLINE_DIR, as Cline does. Project scope is+// always <wd>/.cline.func clineCandidates(home, wd string) []candidate {- return []candidate{- {runtime: "cline", path: filepath.Join(home, ".cline", "plugins", "beacon.ts"), scope: ScopeUser, format: formatMetadataOnly, kind: KindPlugin},- {runtime: "cline", path: filepath.Join(wd, ".cline", "plugins", "beacon.ts"), scope: ScopeProject, format: formatMetadataOnly, kind: KindPlugin},+ items := []candidate{}+ if dir := clinesession.ClineDir(home); dir != "" {+ items = append(items, candidate{runtime: "cline", path: filepath.Join(dir, "plugins", "beacon.ts"), scope: ScopeUser, format: formatMetadataOnly, kind: KindPlugin})}+ return append(items, candidate{runtime: "cline", path: filepath.Join(wd, ".cline", "plugins", "beacon.ts"), scope: ScopeProject, format: formatMetadataOnly, kind: KindPlugin})}// piCandidates covers both documented Pi extension locations.diff --git a/cli/beacon/internal/endpoint/inventory/inventory_test.go b/cli/beacon/internal/endpoint/inventory/inventory_test.goindex a2022831..5ddef3c7 100644--- a/cli/beacon/internal/endpoint/inventory/inventory_test.go+++ b/cli/beacon/internal/endpoint/inventory/inventory_test.go@@ -369,6 +369,23 @@ func TestScanReadsCodexUserConfigFromCodexHome(t *testing.T) {}}+// With CLINE_DIR set, the user plugin inventory reports is the one Cline loads.+func TestScanReadsClinePluginFromClineDir(t *testing.T) {+ home := t.TempDir()+ clineDir := t.TempDir()+ t.Setenv("CLINE_DIR", clineDir)+ writeFile(t, filepath.Join(clineDir, "plugins", "beacon.ts"), `// beacon-managed-cline-plugin:v1`)+ writeFile(t, filepath.Join(home, ".cline", "plugins", "beacon.ts"), `// beacon-managed-cline-plugin:v1`)++ result := Scan(Options{HomeDir: home, SkipProjectScope: true, Runtimes: []string{"cline"}, Now: fixedNow})+ if config := findConfig(result.Configs, "cline", filepath.Join(clineDir, "plugins", "beacon.ts")); config == nil || !config.Exists {+ t.Fatalf("CLINE_DIR plugin = %#v, want it reported as present", config)+ }+ if stale := findConfig(result.Configs, "cline", filepath.Join(home, ".cline", "plugins", "beacon.ts")); stale != nil {+ t.Fatalf("inventory reported ~/.cline/plugins/beacon.ts, which Cline does not load with CLINE_DIR set: %#v", stale)+ }+}+func TestScanIncludesAllSupportedCurrentUserAndProjectConfigs(t *testing.T) {home := t.TempDir()work := t.TempDir()@@ -383,8 +400,9 @@ func TestScanIncludesAllSupportedCurrentUserAndProjectConfigs(t *testing.T) {// are cleared for the same reason.t.Setenv("OMO_CODING_AGENT_DIR", "")t.Setenv("SENPI_CODING_AGENT_DIR", "")- // Codex's user-scope files follow CODEX_HOME.+ // Codex's and Cline's user-scope files follow CODEX_HOME and CLINE_DIR.t.Setenv("CODEX_HOME", "")+ t.Setenv("CLINE_DIR", "")result := Scan(Options{HomeDir: home,@@ -512,6 +530,7 @@ func TestScanYAMLAndMetadataOnlyConfigs(t *testing.T) {home := t.TempDir()work := t.TempDir()t.Setenv("SHELL", "/bin/zsh")+ t.Setenv("CLINE_DIR", "")writeFile(t, filepath.Join(home, ".hermes", "config.yaml"), `mcpServers:memory:diff --git a/cli/beacon/internal/endpoint/lifecycle/inventory_job_test.go b/cli/beacon/internal/endpoint/lifecycle/inventory_job_test.goindex e3df1ac4..a010a24c 100644--- a/cli/beacon/internal/endpoint/lifecycle/inventory_job_test.go+++ b/cli/beacon/internal/endpoint/lifecycle/inventory_job_test.go@@ -132,6 +132,7 @@ func TestInventoryJobEnvRecordsCodexHomeForUserInstalls(t *testing.T) {t.Fatal(err)}t.Chdir(work)+ t.Setenv("CLINE_DIR", "")// Relative, so the job, which starts elsewhere, needs the absolute form.t.Setenv("CODEX_HOME", "codex-home")@@ -153,6 +154,34 @@ func TestInventoryJobEnvRecordsCodexHomeForUserInstalls(t *testing.T) {}}+// Cline uses a trimmed, non-empty CLINE_DIR as is, so the job gets its absolute form whenever it is+// set. It is recorded beside CODEX_HOME, not instead of it.+func TestInventoryJobEnvRecordsClineDirForUserInstalls(t *testing.T) {+ work := t.TempDir()+ t.Chdir(work)+ cwd, err := os.Getwd()+ if err != nil {+ t.Fatal(err)+ }+ codexHome := filepath.Join(work, "codex-home")+ if err := os.Mkdir(codexHome, 0o755); err != nil {+ t.Fatal(err)+ }+ t.Setenv("CODEX_HOME", codexHome)+ t.Setenv("CLINE_DIR", " cline-state ")++ env := inventoryJobEnv(true)+ if want := filepath.Join(cwd, "cline-state"); env["CLINE_DIR"] != want {+ t.Fatalf("CLINE_DIR = %q, want %q", env["CLINE_DIR"], want)+ }+ if env["CODEX_HOME"] == "" || len(env) != 2 {+ t.Fatalf("env = %v, want both CODEX_HOME and CLINE_DIR", env)+ }+ if got := inventoryJobEnv(false); got != nil {+ t.Fatalf("system mode env = %v, want none", got)+ }+}+func TestReconcileInventoryJobWritesWithoutLoadingWhenAsked(t *testing.T) {testenv.SetHome(t, t.TempDir())calls := installFakeInventoryJob(t, true)diff --git a/cli/beacon/internal/endpoint/lifecycle/lifecycle.go b/cli/beacon/internal/endpoint/lifecycle/lifecycle.goindex 83a42427..ca79a03a 100644--- a/cli/beacon/internal/endpoint/lifecycle/lifecycle.go+++ b/cli/beacon/internal/endpoint/lifecycle/lifecycle.go@@ -134,22 +134,35 @@ func reconcileInventoryJobWith(job inventoryJobController, opts InventoryJobOpti}// inventoryJobEnv is the environment written into a per-user inventory job. launchd and systemd-// start the job without the user's shell environment, so a CODEX_HOME exported in a shell profile-// would not reach it and the scheduled scan would inventory ~/.codex while Codex reads-// $CODEX_HOME. The value is resolved now, from the install's shell, as Codex resolves it: an-// absolute path, so a relative CODEX_HOME still means the directory it named at install time. An-// unset or invalid CODEX_HOME records nothing, and the job falls back to ~/.codex as before.+// start the job without the user's shell environment, so a CODEX_HOME or CLINE_DIR exported in a+// shell profile would not reach it and the scheduled scan would inventory ~/.codex or ~/.cline+// while the runtime reads the moved directory. Each value is resolved now, from the install's+// shell, as its runtime resolves it, and recorded as an absolute path so a relative value still+// means the directory it named at install time:+// - CODEX_HOME must name an existing directory, as Codex requires; otherwise nothing is recorded.+// - CLINE_DIR is used whenever it is non-empty after trimming, as Cline uses it.//+// A variable that is unset records nothing, and the job falls back to the default as before.// System mode records nothing: this process's environment is root's, not the console user's.func inventoryJobEnv(userMode bool) map[string]string {- if !userMode || os.Getenv("CODEX_HOME") == "" {+ if !userMode {return nil}- dir, err := codexsession.HomeDir("")- if err != nil {+ env := map[string]string{}+ if os.Getenv("CODEX_HOME") != "" {+ if dir, err := codexsession.HomeDir(""); err == nil {+ env["CODEX_HOME"] = dir+ }+ }+ if value := strings.TrimSpace(os.Getenv("CLINE_DIR")); value != "" {+ if dir, err := filepath.Abs(value); err == nil {+ env["CLINE_DIR"] = dir+ }+ }+ if len(env) == 0 {return nil}- return map[string]string{"CODEX_HOME": dir}+ return env}// inventoryEnabledFromConfigFile reads only the inventory_heartbeat.enabled key. A missing ordiff --git a/docs/changelog/cli.mdx b/docs/changelog/cli.mdxindex b135e33e..de5e60fb 100644--- a/docs/changelog/cli.mdx+++ b/docs/changelog/cli.mdx@@ -15,6 +15,7 @@ Stay up to date with the latest changes to the Agent Beacon CLI.- **Codex install, hooks and inventory follow `CODEX_HOME`** · `beacon endpoint install`, `beacon endpoint hooks install --harness codex`, `beacon endpoint discover` and inventory now read and write `$CODEX_HOME/config.toml` and `$CODEX_HOME/hooks.json` when `CODEX_HOME` is set, as Codex does. They previously always used `~/.codex`, so with `CODEX_HOME` set, Codex never saw the OTLP exporter or the SessionStart hook and live capture silently recorded nothing. A per-user install or repair also writes the resolved `CODEX_HOME` into the scheduled inventory job, which launchd and systemd start without your shell's environment. A `CODEX_HOME` that is not an existing directory is now an install error rather than a silent write to `~/.codex`. Project-level `.codex` files are unchanged.- **Oversized session events no longer stall a sync** · An event still over the 64 KB limit after its raw payload was dropped, such as a tool call with many large edit hunks, made session sync fail at that line on every sweep, so nothing later in that session was recorded. The writer now drops the event's retained content and marks it truncated, as the hook and collector writers already did, keeping the tool name, call ID and file path.- **Cursor sync keeps prompts in compacted conversations** · In a Cursor conversation with a context summary, `beacon endpoint cursor sync` and the session backfill skipped the first new record on every sync that found new activity, often the next prompt, and recorded the compaction again each time. New records are now kept and each compaction is recorded once. A compaction already recorded by an older release is recorded one more time after upgrading.+- **Cline plugin and sessions follow `CLINE_DIR`** · `beacon endpoint hooks install --harness cline`, `beacon endpoint discover`, inventory, `beacon endpoint cline status` and `sync`, and the session backfill now use `$CLINE_DIR` when `CLINE_DIR` is set, as Cline does. They previously always used `~/.cline`, so with `CLINE_DIR` set, the Beacon plugin went where Cline never loads it, live capture silently recorded nothing, and session sync found no sessions. A per-user install or repair also writes the resolved `CLINE_DIR` into the scheduled inventory job, as it does `CODEX_HOME`.### v1.3.40 · October 14, 2026diff --git a/docs/cli/hooks.mdx b/docs/cli/hooks.mdxindex 548ddf5f..13daa220 100644--- a/docs/cli/hooks.mdx+++ b/docs/cli/hooks.mdx@@ -41,7 +41,7 @@ beacon endpoint hooks [command]| Hermes Agent | `~/.hermes/config.yaml` | Not supported | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` || Kimi Code | `$KIMI_CODE_HOME/config.toml` (default `~/.kimi-code/config.toml`) | Not supported | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` || OpenCode | `~/.config/opencode/plugins/beacon.ts` | `./.opencode/plugins/beacon.ts` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` |-| Cline | `~/.cline/plugins/beacon.ts` | `./.cline/plugins/beacon.ts` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` |+| Cline | `$CLINE_DIR/plugins/beacon.ts` (default `~/.cline/plugins/beacon.ts`) | `./.cline/plugins/beacon.ts` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` || Pi | `~/.pi/agent/extensions/beacon.ts` | `./.pi/extensions/beacon.ts` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` || Oh My Pi | `~/.omp/agent/extensions/beacon.ts` | `./.omp/extensions/beacon.ts` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` || Qwen Code | `~/.qwen/settings.json` | `./.qwen/settings.json` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` |diff --git a/docs/runtimes/cline.mdx b/docs/runtimes/cline.mdxindex 6a2fa31c..2e0bab83 100644--- a/docs/runtimes/cline.mdx+++ b/docs/runtimes/cline.mdx@@ -20,7 +20,7 @@ Before enabling Cline telemetry, make sure:## Collection paths-Beacon installs an owned Cline plugin at `~/.cline/plugins/beacon.ts` for user-level hooks or `./.cline/plugins/beacon.ts` for project-level hooks. Cline auto-discovers plugin files in those directories, so no plugin registry command is required. That is also why the install works for the VS Code and JetBrains hosts, neither of which ships a `cline` executable.+Beacon installs an owned Cline plugin at `$CLINE_DIR/plugins/beacon.ts` (default `~/.cline/plugins/beacon.ts`) for user-level hooks or `./.cline/plugins/beacon.ts` for project-level hooks. Cline auto-discovers plugin files in those directories, so no plugin registry command is required. That is also why the install works for the VS Code and JetBrains hosts, neither of which ships a `cline` executable.The plugin forwards `beforeRun`, `beforeTool`, `afterTool`, and `afterRun` hook payloads to Beacon's hook adapter. It spawns the adapter directly with an argument vector rather than through a shell, so the same plugin works unchanged on macOS, Linux, and Windows.@@ -32,11 +32,13 @@ Beacon can also recover Cline activity from Cline's committed local session storbeacon endpoint cline sync```-The sync path reads `~/.cline/data/tasks`, `~/.cline/tasks`, Cline's VS Code global-storage task directory, `~/.cline/data/sessions`, and `~/.cline/kanban/workspaces`. It is local and offline, emits events with `harness.collection_method=poll`, and is useful for historical sessions or sessions that ran before the Beacon plugin was installed. Use `--print` to inspect mapped events without writing the runtime log or advancing the cursor.+The sync path reads `data/tasks`, `tasks`, `data/sessions`, and `kanban/workspaces` under `$CLINE_DIR` (default `~/.cline`), plus Cline's VS Code global-storage task directory. It is local and offline, emits events with `harness.collection_method=poll`, and is useful for historical sessions or sessions that ran before the Beacon plugin was installed. Use `--print` to inspect mapped events without writing the runtime log or advancing the cursor.++Plugin install, discovery, inventory, and session sync honor `CLINE_DIR` as Cline does: when it is set, it replaces `~/.cline`. The scheduled inventory job starts without your shell's environment, so a per-user `beacon endpoint install` or `repair` writes the `CLINE_DIR` it resolved into the job's launchd or systemd definition. If you change `CLINE_DIR` later, run `beacon endpoint repair` from a shell that has the new value. System-mode installs do not record it. Project-level `.cline` files are not affected.## Discovery and status-Beacon detects Cline through the `~/.cline` directory, treating a `cline` executable on `PATH` as an additional signal rather than the deciding one. A binary check alone would report "not detected" for the IDE hosts, which are the majority of installs.+Beacon detects Cline through the `$CLINE_DIR` directory (default `~/.cline`), treating a `cline` executable on `PATH` as an additional signal rather than the deciding one. A binary check alone would report "not detected" for the IDE hosts, which are the majority of installs.Use `beacon endpoint hooks status --harness cline` to inspect Cline plugin status. Status reports installed only when the plugin references the hook binary that is actually present, so a plugin left behind by a removed or relocated install is reported as not installed rather than as working telemetry.