Repository navigation
feat: add follow-up task suggestions - #102422
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 9, 2026, 1:28 AM ET / 05:28 UTC. Summary Reproducibility: yes. Source inspection shows isolated cron supplies both durable Review metrics: 2 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Accepted suggestions should be owned by the durable agent session key, with run metadata kept separately if needed; after that, maintainers should review the additive protocol, tool, UI, and worktree contract as one feature. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows isolated cron supplies both durable Is this the best way to solve the issue? No. The implementation is plausible, but it is not the best merge candidate until task suggestions use a durable parent session key and maintainers confirm the new core API/UI direction. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against acac359de64e. Label changesLabel justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (2 earlier review cycles) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d371dc415d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const taskSuggestionSessionKey = normalizeOptionalString( | ||
| options?.runSessionKey ?? options?.agentSessionKey, | ||
| ); |
There was a problem hiding this comment.
Use durable session keys for task suggestions
When a caller supplies both keys, this records runSessionKey as the suggestion's source session. Isolated cron runs do this (src/cron/isolated-agent/run.ts:652 builds agent:...:cron:...:run:<id> and src/agents/agent-tools.ts:995 forwards it), but those run keys are not persisted session-store keys, so taskSuggestions.accept later passes a non-existent parentSessionKey to sessions.create and the accepted suggestion fails with unknown parent session. Store the durable agentSessionKey for suggestions and keep any run id separately if needed.
Useful? React with 👍 / 👎.
|
Land-ready proof for exact head
No known proof gaps. The model tools remain policy-configurable in the coding group; acceptance creates one operator-approved managed-worktree session from the server-stored suggestion without interrupting or auto-starting the current turn. |
|
Merged via squash.
|
* feat(tools): add follow-up task suggestions * chore: leave changelog to release flow * fix(tools): add task suggestion display metadata * fix(tools): update task suggestion display snapshot * docs: format task suggestion tool table * test(gateway): expect compaction worktree workspace * test(gateway): preserve configured compaction workspace * fix(ui): translate task suggestions
Closes #102421
What Problem This Solves
Models can identify valuable follow-up coding work, but they previously had no operator-approved way to turn that recommendation into a fresh, isolated coding session. Plain-text suggestions are not actionable, while starting a subagent immediately skips consent and does not create a user-owned managed-worktree session.
Why This Change Was Made
This adds configurable
spawn_taskanddismiss_taskmodel tools to the coding tool group. A proposal becomes an ephemeral Control UI card and never starts automatically; accepting it creates a new seeded session in its own managed worktree. The gateway owns a bounded, permission-checked lifecycle, and worktree-backed sessions consistently reuse their persisted worktree path for agent runs, replies, compaction, and sandbox reporting.Suggestions are intentionally process-local. Acceptance is task-ID-only and idempotent, uses the server-stored prompt and project root, and rolls back partial session/worktree creation before restoring a retryable suggestion.
User Impact
Operators can inspect, accept, or dismiss model-recommended follow-up work without interrupting the current turn. Accepted work opens as a fresh coding session with the exact proposed prompt and an isolated managed worktree. Administrators can configure both tools through the existing tool policy, coding profile, and tool groups.
Evidence
pnpm check:changed— https://github.com/openclaw/openclaw/actions/runs/28991563745tsgolanes passed.pnpm ui:i18n:checkandpnpm check:protocol-coveragepassed.git diff --checkpassed.AI assistance: Codex implemented and reviewed the change; the product contract was maintainer-provided and all reported evidence was run against the resulting patch.