-
-
Notifications
You must be signed in to change notification settings - Fork 801
main #546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
main #546
Conversation
delorenj
commented
Jan 4, 2026
- openrouter
- Fix race condition causing worker startup failures
- Add database-level deduplication to prevent duplicate observations
- chore: modify; code; in; plugin,; remove; obsolete; .swarm/memory.db\n\n 10 files changed, 268 insertions(+), 294 deletions(-)\n
Removed redundant worker start commands from UserPromptSubmit, PostToolUse, and Stop hooks that were causing multiple worker instances to race for port 37777. Worker now starts only during SessionStart; hook scripts use ensureWorkerRunning() to poll for readiness instead of launching new processes. This eliminates the "Process died during startup" error that occurred when hooks fired concurrently. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Multiple hook executions from different plugin versions and duplicate hook registrations in ~/.claude/settings.json were causing the same observations to be saved multiple times with identical timestamps. Changes: - Add deduplication check in SessionStore.storeObservation() that prevents inserting duplicate observations within a 1-second window - Check for existing observation with same session, title, and timestamp before INSERT - Return existing observation ID instead of creating duplicate - Change worker host binding from 127.0.0.1 to 0.0.0.0 for network accessibility - Rebuild plugin artifacts with updated deduplication logic This is a defense-in-depth fix that complements the cleanup of: - Removed duplicate hook registrations from ~/.claude/settings.json - Cleaned up old plugin versions (7.4.0, 8.2.0) - Updated plugin registry to use only v8.2.5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…n\n 10 files changed, 268 insertions(+), 294 deletions(-)\n
There was a problem hiding this comment.
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: 79f0f75832
ℹ️ 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".
| if (observation.title) { | ||
| const existing = this.db.prepare(` | ||
| SELECT id, created_at_epoch FROM observations | ||
| WHERE sdk_session_id = ? AND title = ? AND ABS(created_at_epoch - ?) < 1000 | ||
| `).get(sdkSessionId, observation.title, timestampEpoch) as { id: number; created_at_epoch: number } | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dedup query references missing sdk_session_id
The new deduplication block in storeObservation queries observations using sdk_session_id and passes sdkSessionId, but the table schema defines memory_session_id (see earlier migration) and this method only receives memorySessionId. Because sdkSessionId is undefined and the column does not exist, any observation with a title will hit this path and SQLite will throw no such column: sdk_session_id before the insert, preventing observations from being stored. The dedup check should use the correct column/parameter or be removed.
Useful? React with 👍 / 👎.
- Add `scripts/dev-sync.sh` for deterministic plugin build/sync/restart - Add `mise.toml` with tasks for sync, logs, and health checks - Add session warning when plugin is updated mid-session - Update `context-hook` to prepend update warning if needed - Add `.swarm/` to .gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.