Repository navigation
feat: move a conversation that has no project into one - #202306
Conversation
moveSessionIntoProject records the project and a pending checkout on a conversation that has neither, the same intent a session created in the project carries. Its next turn opens the checkout through prepareSessionWorkspaceForRun, so setup scripts, ignored files, sandbox and context follow the project open path. A move can name a folder in the conversation's workspace. Its commit starts the new branch, and its unsaved changes are laid over the checkout. Git reads that folder inside the conversation's sandbox, or on the host through the trusted-config view with hooks off, and hands the project one bundle. Earlier messages keep opening the files they named. The idle check moves out of PR adoption into describeSessionWorkspaceBlocker so both callers share it.
A checkout in the conversation's workspace can name Git data elsewhere on the host through a .git file or objects/info/alternates. The host carry then read another repository's commits into the project and wrote objects into it. The carry now requires the checkout's git dir and common dir to resolve inside the workspace, with no alternates, and refuses with nothing moved.
The opt-in session_project tool lists the registered projects the requester may use and moves the conversation into one, optionally bringing a checkout's work along. The move records the project and pending checkout; because the resumed turn is a session event, which never prepares a pending checkout, the tool opens it through prepareSessionWorkspaceForRun before resuming. Conversations with or without a sandbox can move. The tool is built only when tool policy names it, so agents without a tool profile do not gain it. The GitHub publication tool construction moves into a sibling module with it so openclaw-tools.ts stays within its line cap.
…table core-descriptors.ts is at its line cap, so new core methods could not be added. Its last rows move unchanged into core-descriptors.appended.ts, which the main table spreads at its end, keeping the combined order append-only. The protocol since guard and the protocol-generation scope read both files.
Adds the projects.moveSessionOptions and projects.moveSession protocol schemas and a "Move to project…" item in the conversation header menu for conversations outside every project and worktree. The dialog lists the projects the conversation can move into, says which local work comes along, and moves it, ending with a toast that names the project and branch.
…into one projects.moveSessionOptions lists the registered projects the operator may use, each with the checkouts in the conversation's workspace whose origin is that project. Git reads them inside the conversation's sandbox, or on the host through the trusted-config view for a conversation without one. projects.moveSession records the move; the person's next message opens the project, as it does for a session created in it, so the dialog's toast says so instead of naming a branch.
…s own The move dialog's host listing read HEAD, subject and origin through a .git file or alternates that could point at another repository on the host. It now skips any checkout whose git dir or common dir resolves outside the workspace or that borrows objects through alternates.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
✅ Maintainer security changes approvedA maintainer approved this revision with an explicit security approval comment.
A later push requires a fresh approval comment for an external contributor's PR. |
|
Codex review: blocked before merge. What this changesAdds menu and agent-tool actions that move an unbound conversation into a registered project while preserving history and optionally copying local work. Example: Ask “Let’s work on Juniper. Read README.md and report its release code.”
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open: it delivers a useful, maintainer-approved workflow, and no concrete introduced defect was found; landing remains blocked by security approval and unresolved CI failures. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe Control UI and agent tool submit project-move requests to the Gateway, which authorizes the destination, prepares a managed checkout, commits the existing session’s workspace binding, and resumes conversation work. flowchart TD
A[Conversation menu] --> C[Gateway move owner]
B[Session project tool] --> C
C --> D[Session and project access]
D --> E[Managed checkout preparation]
E --> F[Session workspace commit]
F --> G[Files and continued conversation]
Technical reviewBest possible solution: Land the shared Gateway move operation and its UI and tool adapters after CI attribution and current-head security approval. Do we have a high-confidence way to reproduce the issue? Current-main source and the inspected before screenshot establish the missing general conversation-to-project action; no target code was run during this review. Is this the best way to solve the issue? The implementation preserves session identity and reuses existing handoff, project access, managed checkout, and workspace commit owners; the reviewed additions support the requested workflow. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 50ff9d463371. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (22 earlier review cycles; latest 8 shown)
Reviewed November 22, 2026, 2:54 PM ET / 19:54 UTC (Revision 23). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
I checked the live Qwen3-4B runs on I checked the provider request for that second turn. It kept the first user request, the native In the separate handoff runs, Qwen made a native read and quoted the exact fixture contents in 3/3 moved sessions and 3/3 sessions started directly in Beta. All three resumed requests kept the original move ID and the completed result for the committed branch. The unregistered-project run left the session unbound and delivered a refusal to Qwen without success instructions. I also compared six moved and fresh pairs with the same permission settings. All six matched on permission mode, elevation settings, Gateway tool inventory, and the model's tools and instructions after accounting for checkout paths and session keys. The live calls showed the same approval behavior in the matched checkouts and denied the outside-file read in both Beta sessions. An explicit read-only setting carried through the move and denied |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Pre-existing failure attribution (verified before merge) All 17 red suites on Fifteen of them fail the same way on main right now: commit The other two have no main counterpart because main does not run those suites: Codex's triage of run 45059894614 found every failed job to be the same failure as on main or one already triaged. Merged under the maintainer authorized pre-existing-failure exception. |
|
/allow-security-sensitive-change |
Closes #202268
What changes
On main, moving work from the default workspace into an existing project requires another conversation and a manual transfer of local edits.
Say “let’s work on OpenClaw” in the default workspace. The model moves this conversation into the registered project with
session_project. The model can carry out the rest of that message in the project’s managed checkout. For a move-only request, the reply confirms the destination. The conversation keeps its messages. The tool is available by default for eligible sessions, subject to tool policy. The Gateway refuses a second move.Choose Move to project… in the conversation menu to do the same move yourself. When a matching checkout has file changes, the dialog previews how many will be copied. The project checkout restores those changes before repository setup. The original checkout stays in place, and earlier links still open its files.
Project moves share the checks for active runs, background processes, terminals, and child sessions with PR workspace preparation.
Sandboxed conversations can move with Docker or Podman. For other sandbox backends, the picker explains why the move is unavailable and the Gateway refuses before saving a project or creating a checkout.
Control UI comparison
Captured in the built Control UI with a synthetic project and two file changes. Main screenshot at
e309df612e.Evidence
Live model handoff
The live Qwen3-8B capture at
4b990abshows the same conversation in Juniper and the release code from its README. The model calledsession_projectand finished the read in the project checkout.Sandbox admission
On
9546f55, an isolated Gateway with a real loopback SSH sandbox showed the Docker or Podman requirement in the picker and refused the direct move request. The session kept its original workspace and ID, had no project worktree, and replied to the next message.The carry fixture exercises the Docker move handoff after the initiating turn ends. Live Docker and Podman carry remain pending.
Upgrade compatibility on
9546f55Each published binary created a conversation, saved a user message and reply, and registered Juniper in its own profile. On startup, the Gateway built at
9546f55loaded that profile. The same conversation then moved into Juniper through the built Control UI and got a new reply. These checks used synthetic repositories and a scripted local model.Each run preserved the session ID, both original messages, the project record, and the source commit. Repository setup saw the copied edit. The untracked file survived and the original files stayed in the source checkout.
The Control UI capture shows the same upgrade scenario at
4b990ab.Build and tests