Repository navigation
feat: add Claude session fleet - #104528
Conversation
There was a problem hiding this comment.
💡 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".
| return tabs.map((tab) => { | ||
| const active = this.activePluginTabId === pluginTabKey(tab); | ||
| return html`<openclaw-codex-sidebar |
There was a problem hiding this comment.
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 👍 / 👎.
|
Codex review: stale review; fresh review needed. Summary Next step |
There was a problem hiding this comment.
💡 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"); |
There was a problem hiding this comment.
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 👍 / 👎.
|
Merged via squash.
|
There was a problem hiding this comment.
💡 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); |
There was a problem hiding this comment.
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 👍 / 👎.
* feat: add Claude session fleet * chore: leave release notes to release automation * chore: refresh generated catalogs * fix: satisfy session catalog lint gates
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
Evidence
swift test --package-path apps/macos --filter MacNode— 96 tests 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.The repository-wide docs link checker still reports the pre-existing missing template targets
/reference/templates/IDENTITYand/reference/templates/USER; touched Anthropic/node docs format and MDX checks pass.