Skip to content

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

fix: remove duplicate CwdScopedResume flag that shadowed ResumesInSessionDir

Cursor Agent78a11187392e
diff --git a/cli/beacon/internal/handoff/grok_test.go b/cli/beacon/internal/handoff/grok_test.go
index c1bc50f7..087a5c0d 100644
--- a/cli/beacon/internal/handoff/grok_test.go
+++ b/cli/beacon/internal/handoff/grok_test.go
@@ -157,7 +157,7 @@ func TestPlanResumeReopensAGrokSessionByItsID(t *testing.T) {
}{
{"subagent", func(s *Session) { s.Subagent = true }, nil, ReasonNotResumable},
{"gone", func(s *Session) { s.SourcePath = filepath.Join(t.TempDir(), "missing") }, nil, ReasonSessionGone},
- {"cwd override", nil, func(o *PlanOptions) { o.Dir = t.TempDir() }, ReasonNotResumable},
+ {"cwd override", nil, func(o *PlanOptions) { o.Dir = t.TempDir() }, ReasonOtherDirectory},
} {
t.Run(tc.name, func(t *testing.T) {
s := session
diff --git a/cli/beacon/internal/handoff/resume.go b/cli/beacon/internal/handoff/resume.go
index a0e13684..bafdced4 100644
--- a/cli/beacon/internal/handoff/resume.go
+++ b/cli/beacon/internal/handoff/resume.go
@@ -130,9 +130,6 @@ func nativeBlocker(session Session, target string, opts PlanOptions) string {
return ReasonFromRuntimeLog
}
command, _ := commandFor(target)
- if command.CwdScopedResume && opts.Dir != "" && opts.Dir != session.Directory {
- return ReasonNotResumable
- }
if command.Resume == nil {
return ReasonNotResumable
}
diff --git a/cli/beacon/internal/handoff/runtimes.go b/cli/beacon/internal/handoff/runtimes.go
index 6a6bf6b0..cf355172 100644
--- a/cli/beacon/internal/handoff/runtimes.go
+++ b/cli/beacon/internal/handoff/runtimes.go
@@ -47,10 +47,6 @@ type runtimeCommand struct {
// Env overrides the runtime's environment: a variable set to a value is set, one set to "" is
// removed. It holds switches only, never credentials, because the plan prints it.
Env map[string]string
- // CwdScopedResume is true when the runtime looks up a session id under its working directory.
- // A --cwd override that differs from the session's recorded directory makes native resume
- // impossible, because the id will not be found under the new directory.
- CwdScopedResume bool
}
// Harness names, as the endpoint event schema spells them.
@@ -167,8 +163,7 @@ var runtimes = []Runtime{
// reopens runs in the mode that asks, whatever the config says; the user can still change
// the mode inside the TUI.
Command: &runtimeCommand{
- Executable: "grok",
- CwdScopedResume: true,
+ Executable: "grok",
Resume: func(s Session) ([]string, bool) {
// A subagent is a child of the session that spawned it, not one a person reopens.
if s.Subagent {