Skip to content

feat: add Claude session fleet - #104528

Merged
steipete merged 4 commits into
mainfrom
codex/claude-session-sidebar-transcripts
Jul 11, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/claude-session-sidebar-transcripts

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

OpenClaw can federate Codex sessions across a Gateway and paired Mac nodes, but Claude CLI and Claude Desktop histories are invisible. Users cannot find or read those sessions from the shared sidebar or Control UI.

Closes #104493.

Why This Change Was Made

Add a read-only Anthropic-owned session catalog that merges current Claude CLI JSONL/index data with Claude Desktop metadata, excludes archived and sidechain sessions, and federates results across connected nodes. Transcript reads use bounded reverse JSONL scanning and explicit cursors so large histories are never loaded at once. Native macOS nodes expose the same constrained commands, while the shared sidebar/controller gains an isolated Claude state path.

User Impact

  • Claude CLI and Claude Desktop sessions appear in the OpenClaw sidebar, grouped by host.
  • Opening a session shows its full read-only transcript with explicit older-history pagination.
  • The full Claude Sessions page paginates catalogs per host; the sidebar intentionally loads only the newest bounded page.
  • The Anthropic plugin starts this read-only catalog by default and respects plugin allow/deny/disable policy.
  • Malformed node data, symlink escapes, archived sessions, sidechains, oversized items, and host failures fail closed or remain isolated.

Evidence

  • swift test --package-path apps/macos --filter MacNode — 96 tests passed.
  • Focused Testbox Vitest: Anthropic catalog 6, sidebar/controller 9, bundled metadata 36 — all passed.
  • node scripts/run-tsgo.mjs -p tsconfig.extensions.json — passed on Testbox.
  • pnpm build — passed on Testbox.
  • pnpm ui:i18n:check — all 20 locales clean after rebasing current main.
  • Recorded UI E2E: sidebar open, catalog Load more, transcript open, older transcript page — passed.
  • Real local Claude data: 34 active sessions found (22 Desktop, 12 CLI); CLI transcript returned 2 items plus a continuation cursor.
  • Fresh autoreview: no accepted/actionable findings.

The repository-wide docs link checker still reports the pre-existing missing template targets /reference/templates/IDENTITY and /reference/templates/USER; touched Anthropic/node docs format and MDX checks pass.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui extensions: anthropic plugin: file-transfer size: XL maintainer Maintainer-authored PR labels Jul 11, 2026
@steipete steipete self-assigned this Jul 11, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bff3d644e2

ℹ️ 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".

Comment on lines +2073 to +2075
return tabs.map((tab) => {
const active = this.activePluginTabId === pluginTabKey(tab);
return html`<openclaw-codex-sidebar

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Key native session sidebars by plugin tab

When the advertised session tabs change on reconnect or after enabling/disabling codex/anthropic, this unkeyed array lets Lit reuse an existing <openclaw-codex-sidebar> instance for the other catalog. CodexSidebar keeps separate Codex/Claude controller state and stopPolling() stops only the current catalogKind, so the previous catalog's poll timer can keep issuing hidden requests even after that tab is gone; key each rendered sidebar by pluginTabKey(tab) or render distinct keyed elements so the old instance disconnects cleanly.

Useful? React with 👍 / 👎.

@clawsweeper

clawsweeper Bot commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head d64c048acca29ea32fde9ca6eb7e6e9586d0fcb5, but the PR head is now 22af66e10f597c11f08682c33bb46483682fd86f. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d64c048acc

ℹ️ 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".

}

function projectsDir(homeDir: string): string {
return path.join(homeDir, ".claude", "projects");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor CLAUDE_CONFIG_DIR when locating Claude sessions

Claude Code’s env-var docs define CLAUDE_CONFIG_DIR as overriding ~/.claude for session history (https://code.claude.com/docs/en/env-vars). In an OpenClaw Gateway/node launched with CLAUDE_CONFIG_DIR=$HOME/.claude-work, this helper still points availability/list/read at $HOME/.claude/projects, so the new catalog appears empty or unavailable even though claude is writing active sessions to $CLAUDE_CONFIG_DIR/projects; resolve the config root from env (and mirror it in the native macOS catalog) before appending projects.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit c3b426f into main Jul 11, 2026
100 checks passed
@steipete
steipete deleted the codex/claude-session-sidebar-transcripts branch July 11, 2026 15:23
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22af66e10f

ℹ️ 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".

continue;
}
const createdAt = timestampMs(entry.created);
const updatedAt = timestampMs(entry.modified) ?? timestampMs(entry.fileMtime);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use file mtimes for indexed Claude recency

When a project has sessions-index.json but that entry stops updating while the .jsonl transcript keeps receiving messages, this path records recency only from the stale index values and discoverCliRecords later skips the same sessionId, so active sessions can sort as old and fall off the first sidebar/full-catalog page. Stat the resolved filePath and use it as a fallback/max for updatedAt/recencyAt; the Swift MacNodeClaudeSessionCatalog indexed-record path needs the same treatment.

Useful? React with 👍 / 👎.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 12, 2026
* feat: add Claude session fleet

* chore: leave release notes to release automation

* chore: refresh generated catalogs

* fix: satisfy session catalog lint gates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos app: web-ui App: web-ui docs Improvements or additions to documentation extensions: anthropic maintainer Maintainer-authored PR plugin: file-transfer size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show Claude CLI and Desktop sessions across paired computers

1 participant