Repository navigation
feat: fork a channel into a sibling channel - #470
Merged
Merged
Conversation
Fork channel (sidebar menu, `ace fork`, host op `fork`) creates a new channel in the source's project, seeded with a message naming the source and carrying its summary. The source root chat's lane continues as a new lane from its current commit; the source is only read. Why: packages/channel/src/channel.ts#class Channel | a fork's starting lane is recorded only in the commit that creates the root chat, so reopening never moves a chat that switched lanes Why: apps/host/src/manage.ts#function fork | forking only reads the source channel: info and changes requests, never writes to its pi state or lane
iamnbutler
force-pushed
the
fork-channel
branch
from
October 16, 2026 22:14
11820af to
84d42f5
Compare
2 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #33. Adds Fork channel: a new sibling channel in the source's project, following the decision on #33 and old Ace's
POST /channels/{cid}/fork.forkhost op (owner only, from the host that runs the source; peers refused likecreate) andace fork <channel>.manage.forkreads the source'sinfoand root-chatchanges, picks a name, runslane new <fork>/<lane> --base <source HEAD>in the project, saves the record, and posts the seed message.Options.lane, from the catalog record's new optionallanefield. It is applied only throughharness.root'sinit, in the commit that creates the root chat, which records theLanesDocentry and sets the chat's cwd. Reopening never moves a chat. The pi format is unchanged (an existingLanesDocentry shape), so no migration is needed.onFork/ "Fork channel" item inpackages/uisession-item actions. It shows a toast and selects the fork.Product decisions
fork-of-<name>(as in old Ace). It gets-2,-3… past existing channel names and lane branch prefixes left in the project. It is recorded as not deliberate (named: false), so the fork's agent renames it once its work takes shape.sayfrom the person who forked. It names#source (channel <id>), includes the source's summary, and gives the lane and commit it continues from, with a note when uncommitted or untracked work stayed behind. No run starts and no credentials are needed.Remaining on #33: forking cloud compute channels; "Fork from this message" as a chat fork (after #19).
Smoke test (isolated
ACE_HOME/ACE_CONFIG_HOME, realanthropic/claude-haiku-4-5):try-fork, committedb.txt, leftc.txtuntracked and set a summary.ace forkcreatedfork-of-fork-srcwith worktree.lane/trees/fork-of-fork-src/try-forkat the source's commit.ace infoshowed the root chat on lanetry-forkwith that cwd. The transcript showed the seed message with summary and uncommitted-work note.fork-of-fork-src/try-fork.ace backupbefore and after gave identicalsqlite3 .dumpoutput, and the source lane's HEAD and status were unchanged.ace serve --loopback, the gatewayforkop createdfork-of-fork-src-2(numbering) and a fork of the fork (lane at the fork's new commit).Built in Ace
Built with Claude Code outside Ace, in a session already running there; no Ace gap involved.