Skip to content

session-flow: the no-project-root handoff fallback contradicts itself and CLAUDE_PLUGIN_DATA is unset #4295

Closed

Description

@kyle-sexton

What

reference/topic-docs.md line 54 says the no-project-root handoff fallback path (${CLAUDE_PLUGIN_DATA}/topic-docs/handoffs/) has "nothing persisted", but the handoff skill actually writes the file there — the doc contradicts the code's own behavior. Separately, CLAUDE_PLUGIN_DATA was unset in the Bash environment when this was hit (2026-09-16, handoff written from C:\Users\KyleSexton, not a git repo), so the path had to be derived by hand from ~/.claude/plugins/data/<plugin>/.

Proposed change

  • Fix the wording in reference/topic-docs.md line 54 to match actual behavior (the fallback path does persist the handoff file).
  • Have save_point.py new default --memory-dir to the plugin data root when the cwd has no git top level, instead of requiring CLAUDE_PLUGIN_DATA to be set.
  • Consider .work naming for symmetry with other plugin-data conventions.

Source

  • NOTES.md row I30
  • reference/topic-docs.md line 54
  • phase12-filing-plan.md CCP1

🤖 Generated with Claude Code

https://claude.ai/code/session_01EPKhyDMaFS7aCU14YRYNPk

Activity

  1. added
    needs-triage
    on Sep 20, 2026
  2. added
    agent-ready
    status: ready
    and removed
    needs-triage
    on Sep 23, 2026
  3. added theissue type on Sep 23, 2026
  4. kyle-sexton commented on Sep 23, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage.

    Agent Brief

    Type: Bug
    Summary: Fix a reference doc's contradiction of its own code's behavior for the no-project-root handoff fallback, and give the save-point script a working default location for that same case instead of one that silently lands in the wrong place.

    Current behavior:
    The reference documentation describing the no-project-root handoff fallback states that nothing is persisted at that fallback location, but the handoff mechanism actually does write a file there — the doc contradicts the code's own behavior. Separately, when the working directory has no discoverable git top-level (not a repository) and the environment variable naming the plugin's data root is unset, the save-point script's default for its own memory-directory argument resolves to a bare relative location rather than falling back to the plugin's data root, so a handoff can land somewhere unexpected instead of at the documented fallback location.

    Desired behavior:
    The reference doc's description of the no-project-root fallback matches what the code actually does: a file is persisted there, not nothing. The save-point script's memory-directory default, when invoked with no explicit value and the working directory has no discoverable git top-level, resolves to the plugin's data root's topic-docs location (matching what the fallback documentation describes) rather than to the bare relative default it currently falls back to. This applies both when the plugin-data-root environment variable is set and when it is unset; in the unset case, the script derives or falls back to an equivalent location rather than requiring that variable to be set. The resolved fallback location still passes the same below-a-boundary-directory validation and self-ignore guard the script already applies to a normal, repository-relative memory directory.

    Key interfaces:

    • The reference doc's description of the no-project-root handoff fallback: corrected to state that a file is persisted there
    • The save-point script's memory-directory default resolution: gains a no-git-toplevel branch resolving to the plugin's data root's topic-docs location instead of the bare relative default
    • The script's existing validation (the below-a-boundary-directory check and the self-ignore guard): applied unchanged to the new fallback location

    Acceptance criteria:

    • The reference doc no longer states that nothing is persisted at the no-project-root handoff fallback location; it states that a file is written there
    • Running the save-point script's creation command with no explicit memory-directory argument, from a working directory with no git top-level, and with the plugin-data-root environment variable set, resolves the memory directory to that variable's topic-docs location
    • The same invocation with the plugin-data-root environment variable unset still resolves to a usable fallback location rather than erroring or defaulting to the bare relative location
    • The resolved fallback location passes the script's existing below-a-boundary-directory validation and self-ignore guard without modification to those checks

    Out of scope:

    • Renaming the memory-directory default for symmetry with other plugin-data conventions (the issue itself only says this is worth considering, not required)
    • Changing the fallback behavior for the ordinary case where a git top-level does exist
  5. kyle-sexton commented on Sep 27, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during work-loop.

    Ratify C3 dispatch? The work-loop admission gate (instance melo-lap-001-wsl-2) reads this item (work-class: scoped, type Bug) as C3, bug-fix-shaped: the session-flow no-project-root handoff fallback contradicts itself. The lane has not finished its first drain and the item has no recorded ratification. There is no open closing PR.

    Intended dispatch: one /work-items:work worker implements the brief and opens a draft PR. Ratify through /work-items:attend-queue.

  6. added
    needs-human
    and removed
    agent-ready
    on Sep 27, 2026
  7. kyle-sexton commented on Sep 29, 2026

    @kyle-sexton
    MemberAuthor

    This comes from the 2026-09-29 audit of the Cursor run (report: .work/audit/REPORT.md). No reopen; labels untouched (needs-human is the unanswered C3-ratify escalation, not a content decision).

    Follow-up sweep delivered by #5239 (fix/audit-session-flow)

    • save-point.md lists five subcommands and the no --memory-dir default.
    • The hop harness treats save_point.py memory-root as read-only.
    • The find-handoff eval names the memory-root derivation.
    • The CLAUDE_PLUGIN_DATA not-exported claim has a four-part record with the plugins-reference basis.

    Still open. The topic-docs convention README wording ("nothing persisted") is requested from the conventions group. #5239 uses Refs #4295.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-humanstatus: ready

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions