Skip to main content
← Back to list
01Issue
BugOpenExtensionsPublic
AssigneesNone

Relationships

#4212 agent-sessions: follow-ups from the 4211 reviews (repo resolution cache and edge cases)

Opened by skunk-ape · 10/31/2026

Follow-up to swamp-club#4211 (@swamp/agent-sessions import: repos, all, exclude, repo resolution). These are the non-blocking findings from the verify-reviews rounds on 4211 that were left as-is. Reviews passed each round, but new edge cases kept coming, so they are collected here instead of being fixed one round at a time.

Cache and identity

  • A changed remote leaves stale cache entries (medium). A cached transcript keeps its old identity key when another clone's origin is changed with set-url, for example during a host migration. If the remote now names a repo being imported, those transcripts stay hidden until their files change. A remote that is added is handled, because resolutions by path are not cached; a changed remote is not. Options: key the cache on the current remote too, or re-read cached repos' origin once per checkout.
  • Uncached transcripts mean git runs in every directory on every import (medium). Transcripts that are unresolved, gone, have no cwd, or are in a repo with no remote are re-read on every import. Their directories go to git one at a time, each with a 10s timeout, in the default mode too. Options: cache settled non-git verdicts, and use bounded concurrency for git.
  • The unplaced count is noise in single-repo mode (low). The unresolved count and its log line include sessions from all over the machine (~, /tmp), even in the default single-repo mode.

Resolution edge cases

  • Repo names go into globs unescaped (low). A directory named like demo[1] or a{b,c} can mis-match. candidateNames already uses a marker; resolveGone should do the same.
  • A git timeout on a nested swamp repo degrades quietly (low). A swamp repo inside a larger git repo has no .git of its own, so a git timeout there silently falls back to plain-folder mode.
  • A relative cwd resolves against the wrong directory (low). A relative cwd in a transcript resolves against the process's working directory.
  • Long identities can merge (low). recordRepo cuts identities over 200 characters from the left, so two long identities that differ only at the start collapse into one.

Tests and docs

  • Fixtures read the global git config on Windows (low). Fixtures set GIT_CONFIG_GLOBAL only off Windows; use NUL there.
  • Missing git skips most tests quietly (low). Most import tests are ignored when git is missing. Consider failing in CI instead.
  • One unwrapped README line (low), in the Which sessions section.

Open question (from real data)

On the author's machine, about 9k of about 9.9k transcripts are headless verify-review sessions in removed /tmp/swamp-verify-* worktrees. The default ~/.cue/work/*/<repo> glob leaves them unplaced. Decide whether all should cover them by default (a glob such as /tmp/swamp-verify-*), or leave it to the caller.

02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

10/31/2026, 1:57:11 AM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

system commented 10/31/2026, 1:57:11 AM

Classified automatically when this issue was filed.

  • Type: Bug
  • Source: Extensions

If you feel this classification is incorrect, add a ripple to tell us so.

Sign in to post a ripple.