Skip to content

feat: add opt-in Honcho session exclusions - #124

Open
astra-openclaw wants to merge 1 commit into
plastic-labs:mainfrom
astra-openclaw:feat/ignore-session-patterns
Open

astra-openclaw wants to merge 1 commit into
plastic-labs:mainfrom
astra-openclaw:feat/ignore-session-patterns

Conversation

@astra-openclaw

Copy link
Copy Markdown
Contributor

Summary

  • Add an opt-in ignoreSessionPatterns configuration array (default: []).
  • Match normalized OpenClaw session keys with case-sensitive globs: * stays within one colon-delimited segment, ** may cross segments, and all other characters are literal.
  • Skip both automatic context injection and message persistence before Honcho initialization or network access.
  • Document the behavior and add configuration, matcher, context, and capture regressions.

Why

Internal lanes such as model evaluation, grading, or maintenance sessions can create irrelevant memory and then inject it into ordinary conversations. Operators need a precise way to exclude an entire OpenClaw session lane without disabling Honcho for normal sessions.

The matcher uses dynamic programming rather than a generated regular expression, so overlapping ** patterns cannot trigger catastrophic regex backtracking.

Safety and scope

  • Empty by default, so existing behavior is unchanged.
  • Matching happens against the original normalized OpenClaw key before it is hashed into a Honcho session ID.
  • Exclusions prevent future injection and persistence; they do not delete existing Honcho data.
  • This is a focused session-lane control related to feat: add configurable honcho memory hygiene #78 and feat: add honcho capture hygiene controls #82. It does not add retention, cleanup, or automatic classification policies.

Validation

  • pnpm build
  • pnpm test --run — 74 tests passed
  • Exhaustive matcher comparison across 496,860 short pattern/key combinations — zero semantic mismatches
  • Adversarial multi-** non-match regression
  • git diff --check

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Your included review limit has been reached.

You’re in a promotional period — use the checkbox below to run this review for free:

  • Run review for free

On-demand reviews are free for the next 28 days. After that, they cost $0.25 per reviewed file.

How can I continue?

Run this review now using the option above, or comment @coderabbitai review --use-credits.

You can also wait for the limit to reset (next review available in 56 minutes), then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7267c985-adeb-40a3-8070-e2b445bf8001

📥 Commits

Reviewing files that changed from the base of the PR and between 65dbf0b and f2fd130.

📒 Files selected for processing (11)
  • README.md
  • config.ts
  • helpers.ts
  • hooks/capture.ts
  • hooks/context.ts
  • openclaw.plugin.json
  • test/capture.test.ts
  • test/config-ignore-sessions.test.ts
  • test/context.test.ts
  • test/helpers.test.ts
  • test/runtime.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@astra-openclaw
astra-openclaw marked this pull request as ready for review August 22, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant