Skip to content

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

Fix Grok discover config path and turn_number for turn 0

Cursor Agentdc29abbc4577
diff --git a/cli/beacon/internal/endpoint/harness/grok.go b/cli/beacon/internal/endpoint/harness/grok.go
index 2ff2771a..bf9f5079 100644
--- a/cli/beacon/internal/endpoint/harness/grok.go
+++ b/cli/beacon/internal/endpoint/harness/grok.go
@@ -47,7 +47,7 @@ func DiscoverGrok() Harness {
// resolving it here would read whatever repository the command happened to run from and report
// it as the machine's state. DiscoverQwen, DiscoverCline and DiscoverPi guard the same way.
hookStatus := hooks.GrokHookStatus(hooks.GrokOptions{Level: hooks.LevelUser})
- if hookStatus.HooksPath != "" {
+ if hookStatus.Installed {
h.ConfigPath = hookStatus.HooksPath
} else {
h.ConfigPath = sessionsDir
diff --git a/cli/beacon/internal/groksession/mapper.go b/cli/beacon/internal/groksession/mapper.go
index f7cd41e1..c83e988e 100644
--- a/cli/beacon/internal/groksession/mapper.go
+++ b/cli/beacon/internal/groksession/mapper.go
@@ -177,9 +177,7 @@ func (m *mapper) consumeLifecycle(ev LifecycleEvent) {
if ev.CancellationCategory != "" {
detail["cancellation_category"] = ev.CancellationCategory
}
- if ev.TurnNumber > 0 {
- detail["turn_number"] = ev.TurnNumber
- }
+ detail["turn_number"] = ev.TurnNumber
out.Raw = map[string]interface{}{"grok": detail}
m.append(out, SourceLifecycle, ev.Index)
}