Repository navigation
fix: start suggested follow-ups without requiring a worktree - #139731
Conversation
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 1:52 AM ET / 05:52 UTC. ClawSweeper reviewWhat this changesSuggested follow-ups now start in ordinary sessions from the web UI and TUI, support non-Git folders, and defer worktree decisions until later. Merge readiness✅ Ready for maintainer review Keep open: the central improvement remains absent from current main and the latest release. The introduced changes preserve the existing session-creation path and RPC modes; no blocking correctness defect was found. Priority: P2 Review scores
Verification
How this fits togetherAgents submit ephemeral follow-up suggestions to the Gateway, which displays them in operator clients. Accepting a suggestion creates a session and dispatches its initial task through the existing session-creation service. flowchart LR
A[Agent follow-up suggestion] --> B[Gateway suggestion registry]
B --> C[Web UI or TUI]
C --> D{Operator action}
D -->|Dismiss| E[Remove suggestion]
D -->|Start locally| F[Existing session creation]
F --> G[New session in suggested folder]
G --> H[Initial task with worktree guidance]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -325, Tests -223, Docs +2, Other 0. Total -546 across 30 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Reuse canonical session creation for local follow-ups, preserve explicit RPC placement contracts, and defer isolation decisions until the task needs them. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main rejects a suggestion whose absolute cwd is not a Git checkout. This review did not execute a failing runtime scenario. Is this the best way to solve the issue? Yes: the branch reuses existing local-session acceptance and removes the earlier Git prerequisite instead of adding a parallel execution path. Supporting non-Git suggestions also broadens the previously documented capability. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 29614f7a6893. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Carry the already-merged test-only corrections from #139651 and #139747 so the PR head and GitHub merge-ref use matching suppression line numbers. No production behavior or suppression count changes. Co-authored-by: Peter Steinberger <[email protected]>
Carry the existing #139792 repair and its merged #139715 test prerequisite. The neutral projection state comes from the owning helper, so this fixture works before and after the main-branch field rename in #139753. No session-first implementation changes. Co-authored-by: Peter Steinberger <[email protected]>
|
Merged via squash.
|
…w#139731) Suggested follow-ups now start in a normal session in the Control UI and Gateway-backed TUI. Remove the placement menu and Git-only suggestion rule; instruct the new session to ask before creating or switching to a worktree. Retain existing RPC modes and rollback/ownership safeguards. Verified plain folders and unavailable Git metadata through real session creation, UI navigation with a mock Gateway, terminal flows, and inspected before/after screenshots. Fresh local validation passed 166 tests, including the unchanged upstream test corrections from openclaw#139651 and openclaw#139747. Session context: https://team.openclaw.ai/beam/session-first-task-suggestions-openclaw-pr-7fb326346b7a Release-note context: follow-up suggestions open a usable conversation without requiring Git or a worktree first. Existing blocked sessions are unchanged. Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where users accepting a suggested follow-up would get a session blocked on Git/worktree setup, even when the task was local debugging or other work that did not need Git. A failed setup could leave the new session retrying its pending worktree before the agent could respond.
Why This Change Was Made
The Control UI and Gateway-backed TUI now offer one action: Start in a new session. Acceptance opens the task in the suggested folder without creating a worktree; the new session is instructed to explain the need and ask the user before creating or switching to one later. Suggestions no longer require a Git checkout, and suggestion-only placement menus and cloud discovery are removed.
Existing RPC placement modes, including the omitted-mode worktree behavior used by shipped clients, remain compatible. Both current clients explicitly request local session creation. This does not repair already-blocked sessions or change explicit worktree creation elsewhere.
User Impact
Evidence
check:changed.No live Gateway or user session state was changed.
Landing Review
Shared Teams session and discussion. GitHub and Teams were checked for human comments before landing; none were present.
A later CI run exposed an unrelated main-branch history fixture/type mismatch. That was fixed independently in #139794. Temporary history changes carried while investigating were removed; no history/pagination changes remain in this PR. The final tree is byte-identical to the previously reviewed head with 166 passing local tests. Exact-head CI is rerun against the repaired main baseline.