Skip to content

Named and multiple concurrent sc ws sessions, and workspace re-fork (P20) #215

Closed

Description

@tonibergholm

sc ws ships one unnamed session per repo (indexed under .sc/ws/<i> with a cache file .sc/ws/cache-<i>). Named or multiple concurrent sessions, and re-forking or refreshing a workspace from a newer tip, are deferred in ROADMAP.md (P20).

Needs a design decision. Questions to settle:

  • Naming and addressing: sc ws fork --name <n> versus index-only; collision rules; what list, run, harvest and abandon take.
  • Concurrency: several sessions harvesting into one branch (harvest lands on the checked-out branch today, and falls back to work-<i> on conflict).
  • Refresh: rebase the workspace onto a newer tip, or abandon and re-fork. The partial-clone view rules from ADR-0050 must hold.
  • Interaction with the protected caches and the sparse view each workspace is forked under.

Acceptance criteria (once designed)

  • Two sessions can be forked, run and harvested independently with deterministic outcomes.
  • Tests for name collisions, harvest order, abandon of one while another runs, and a partial clone.
  • ADR-0030 and ADR-0050 updated or superseded.

Activity

  1. tonibergholm-codento commented on Oct 20, 2026

    @tonibergholm-codento
    Collaborator

    PR #258 builds named and concurrent sessions (ADR-0055): sc ws fork --name, --session on the other verbs, separate .sc/ws-<name>/ roots, first-harvest-wins, and ws run no longer holding the repo lock.

    Remaining for this issue: workspace refresh (move a live workspace onto a newer tip). It is designed in ADR-0055 (replay each workspace's candidate with the ADR-0049 engine, refuse on any conflict, re-materialize under the recorded view) but not built: it needs a headless merge-into-tree entry point and a re-materialize that keeps files an agent may have open. Abandon and re-fork covers it for now.

  2. added 19 commits that reference this issue on Oct 20, 2026
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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions