Skip to content

fix(sdk): re-arm triggered skills after condensation - #4552

Draft
uuzzrm wants to merge 1 commit into
OpenHands:mainfrom
uuzzrm:codex/fix-triggered-skills-after-condensation
Draft

fix(sdk): re-arm triggered skills after condensation#4552
uuzzrm wants to merge 1 commit into
OpenHands:mainfrom
uuzzrm:codex/fix-triggered-skills-after-condensation

Conversation

@uuzzrm

@uuzzrm uuzzrm commented Aug 20, 2026

Copy link
Copy Markdown

HUMAN:


AGENT:
This PR was prepared by an AI agent (OpenAI Codex) on behalf of uuzzrm. The implementation and verification details are included below.

Why

Triggered knowledge skills and path-scoped rules are currently deduplicated for the entire conversation. If condensation forgets the event that carried the trigger content, the deduplication marker remains in ConversationState, so later matching triggers are silently skipped.

Summary

  • Rebuild keyword-skill and path-rule activation state from the active conversation view after a Condensation event is applied.
  • Preserve the existing once-per-active-view behavior when the activation event remains available.
  • Add session-level regression coverage for keyword skills and path rules through LocalConversation.condense().

Issue Number

Fixes #4544

How to Test

The regression tests exercise the real LocalConversation.condense() path with an LLMSummarizingCondenser, persisted events, active-view condensation, and a subsequent matching trigger.

make build
uv run pre-commit run --files openhands-sdk/openhands/sdk/conversation/impl/local_conversation.py tests/sdk/conversation/test_triggered_skills_after_condensation.py
uv run pytest tests/sdk/conversation/test_path_rules_injection.py tests/sdk/conversation/local/test_conversation_send_message.py tests/sdk/conversation/test_condense.py tests/sdk/conversation/test_triggered_skills_after_condensation.py -q

The focused command completed with 52 passed tests. tests/sdk/conversation/goal/test_render_transcript.py also passed independently. A full tests/sdk/conversation run was attempted, but the local test run exhausted temporary-disk space before it could produce a final directory-wide result; no full-suite pass is claimed.

Video/Screenshots

Not applicable for this SDK behavior change.

Design Doc

Not required for this focused bug fix.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

  • No serialized event shape changed; existing persisted events remain readable.
  • The PR is intentionally left as a draft until a human replaces the repository-required HUMAN: note in their own words.

Rebuild trigger deduplication state from the active view after condensation so forgotten keyword skills and path rules can be injected again on a later matching trigger. Keep the existing once-per-view behavior for triggers whose activation events remain visible.\n\nFixes OpenHands#4544\n\nCo-authored-by: openhands <openhands@all-hands.dev>
@github-actions

Copy link
Copy Markdown
Contributor

📁 PR Artifacts Notice

This PR contains a .pr/ directory with temporary PR-specific documents. Because this is a fork PR, the directory will be automatically removed from main immediately after merge.

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.

[Bug]: Triggered skills and path rules silently stop applying after condensation

1 participant