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
test(cursor): a local subagent with no folder open is still recorded
shukieshah923b17ca7982
diff --git a/cli/beacon-hooks/cmd/cursor_compat.go b/cli/beacon-hooks/cmd/cursor_compat.goindex 614897ce..aff222ba 100644--- a/cli/beacon-hooks/cmd/cursor_compat.go+++ b/cli/beacon-hooks/cmd/cursor_compat.go@@ -80,7 +80,10 @@ func cursorRecordsThisHook(command string, input map[string]interface{}) bool {// subagent summaries attributed to this machine, with nothing to say the agent never ran on it.//// Such a payload names the cloud agent ("bc-<uuid>") or one of its subagents ("task-call-<id>")-// and no workspace. A cloud agent on a self-hosted worker has the same kind of id but runs in a+// and no workspace. A cloud subagent's reasoning carries no parent id to tie it to its agent, so+// the prefix alone has to say it: local agents and their subagents get plain UUIDs (every local+// subagent transcript Cursor 3.30 had written was named by one). A cloud agent on a self-hosted+// worker has the same kind of id but runs in a// checkout, so a hook there keeps recording, as does every hook in a cloud sandbox// (BEACON_ORIGIN=cloud), where the project hooks from `beacon cloud cursor print-hooks` record// the agent itself.diff --git a/cli/beacon-hooks/cmd/cursor_compat_test.go b/cli/beacon-hooks/cmd/cursor_compat_test.goindex 00ab5281..50703840 100644--- a/cli/beacon-hooks/cmd/cursor_compat_test.go+++ b/cli/beacon-hooks/cmd/cursor_compat_test.go@@ -404,6 +404,20 @@ func TestCursorCloudAgentsStillRecordWhereTheyRun(t *testing.T) {t.Fatalf("wrote %d events, want the reasoning recorded", n)}})+ t.Run("a local subagent with no workspace open", func(t *testing.T) {+ // A local subagent has a plain UUID of its own, never a task-call- id.+ logPath := setupCursorCompatRun(t, "cursor", "agent-thought")+ runHookWithInput(t, runAgentThought, relayedCloudThought("51762848-3459-4f0b-bdd8-f896f78f9acf"))+ stop := relayedCloudSubagentStop()+ stop["conversation_id"] = "8b01d14e-50f0-41f8-aa3f-6781f51243d4"+ stop["parent_conversation_id"] = "8b01d14e-50f0-41f8-aa3f-6781f51243d4"+ setupCursorCompatRun(t, "cursor", "subagent-stop")+ t.Setenv("BEACON_ENDPOINT_LOG", logPath)+ runHookWithInput(t, subagentStopCmd.Run, stop)+ if n := countEndpointEvents(t, logPath); n != 2 {+ t.Fatalf("wrote %d events, want the subagent's reasoning and its stop recorded", n)+ }+ })}func TestCursorDesktopRelayReplyIsUnchanged(t *testing.T) {