openclaw - ✅(Solved) Fix [GPT 5.4 Phase 4.2] Cross-session task coordination (Tasks API style) [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#67523Fetched 2026-04-17 08:30:16
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
cross-referenced ×2referenced ×1

Fix Action

Fixed

PR fix notes

PR #67542: feat(agents): cross-session plan store with file-level locking [Phase 4.2]

Description (problem / solution / changelog)

TL;DR

Persistent `PlanStore` for sharing plans across multiple sessions and agents, with file-level exclusive locking and stale-lock cleanup.

Tracking

  • Umbrella: #66345
  • Issue: #67523

What this PR does

  • `PlanStore` class: `read()`, `write()`, `lock()`, `mergeSteps()` operations
  • File-level exclusive locking via `O_EXCL` + 10s stale-lock cleanup
  • `StoredPlan` / `StoredPlanStep` types with per-step `updatedBy`/`updatedAt` tracking
  • Atomic writes (write to temp file, then rename) to prevent corruption
  • Namespace validation with path traversal protection

Default behavior

No behavior change when unconfigured. Plans remain session-scoped. Cross-session coordination only activates when `planStore.namespace` is explicitly set.

Path traversal fix

`write()` now validates namespace BEFORE checking plan.namespace mismatch, ensuring security-relevant validation runs first.

Files changed

FileChangeTests
`src/agents/plan-store.ts`New — PlanStore class10 tests
`src/agents/plan-store.test.ts`New — round-trip, locking, merge, traversalSelf

Dependencies

  • #67514 for extended update_plan schema
  • #67538 for plan mode runtime

What follows

  • Integration with plan mode: approved plans can be persisted for cross-agent handoff
  • Wiring into `update_plan` tool so plans auto-persist when namespace is configured

Changed files

  • src/agents/plan-store.test.ts (added, +259/-0)
  • src/agents/plan-store.ts (added, +487/-0)
RAW_BUFFERClick to expand / collapse

GPT 5.4 Enhancement — Phase 4.2

Tracking: #66345 Priority: P2 — Power-user feature for multi-agent workflows Depends on: #67514 (task-system parity), #67520 (plan mode) Confidence: 70% (complex; Claude Code Tasks API does this but Hermes does not)

Concept

Multiple sessions / multiple agents can attach to a shared plan list and coordinate work. One agent kicks off a plan, another picks it up or works on different steps in parallel.

Modeled after Claude Code's Tasks API with CLAUDE_CODE_TASK_LIST_ID env var for cross-session visibility.

Design sketch

  • src/agents/plan-store.ts extended with a shared plan namespace (env var or config key)
  • Plan state persisted to ~/.openclaw/plans/<namespace>/plan.json
  • File-level locking (or SQLite) for concurrent access
  • New plan_changed event type so sessions can subscribe to plan updates from other sessions
  • UI: Control UI shows shared plan with ownership annotations ("step 3: assigned to session-abc")

Why Phase 4

This is the highest-risk, narrowest-audience feature. It requires concurrency primitives, conflict resolution, and schema migration. Defer until plan mode ships and real multi-agent demand emerges.

Estimated size: ~500 LoC + significant test surface for concurrency

Open questions

  1. File-based locking vs SQLite for concurrent plan access?
  2. How do conflicting updates resolve? (last-write-wins vs merge)
  3. Should cross-session plans survive process restart? (yes, via disk persistence)
  4. Should there be an ownership concept per step? (suggested: optional)

extent analysis

TL;DR

Implementing a shared plan namespace with file-level locking or SQLite for concurrent access is likely the most critical step in resolving the multi-agent workflow issue.

Guidance

  • Investigate the trade-offs between file-based locking and SQLite for concurrent plan access, considering factors like performance, complexity, and data consistency.
  • Design a conflict resolution strategy, such as last-write-wins or merge, to handle updates from multiple agents.
  • Determine the requirements for cross-session plan persistence, including whether plans should survive process restarts and how ownership should be handled.
  • Consider implementing an optional ownership concept per step to facilitate coordination between agents.

Example

No code snippet is provided due to the high-level nature of the issue and the need for further design and implementation details.

Notes

The solution will depend on the specific requirements and constraints of the multi-agent workflow feature, including the trade-offs between different concurrency control mechanisms and conflict resolution strategies.

Recommendation

Apply a workaround by implementing a basic shared plan namespace with file-level locking, while continuing to investigate and design a more robust solution that addresses the open questions and concerns. This approach allows for incremental progress and testing of the feature while acknowledging the need for further refinement.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [GPT 5.4 Phase 4.2] Cross-session task coordination (Tasks API style) [1 pull requests, 1 participants]