Skip to content

feat: implement filtering for harness-injected context in workflow an…#154

Open
mc5eamus wants to merge 1 commit into
mainfrom
fix/codex-instructions-injection-filter
Open

feat: implement filtering for harness-injected context in workflow an…#154
mc5eamus wants to merge 1 commit into
mainfrom
fix/codex-instructions-injection-filter

Conversation

@mc5eamus

Copy link
Copy Markdown
Collaborator

This pull request improves the handling of harness-injected context messages (such as AGENTS.md instructions and environment context) in workflow analysis and session parsing. These injected messages, which are not real user prompts, are now filtered out to prevent them from being clustered or recorded as user activity, ensuring more accurate workflow and skill extraction.

Filtering of harness-injected context:

  • Added the isHarnessInjectedContext utility in helpers.ts, which detects known harness-injected markers to identify and filter out these messages.
  • Updated analyzer-workflows.ts to call isHarnessInjectedContext in the noise filter, ensuring such messages are excluded from workflow clustering. [1] [2]
  • Modified parser-codex.ts to skip harness-injected context in both user response items and user message events, preventing these from being treated as real user prompts. [1] [2] [3]

Test coverage:

  • Added tests in analyzer-workflows.test.ts and parser-codex.test.ts to verify that harness-injected AGENTS.md and environment context are ignored and do not affect workflow clustering or prompt extraction. [1] [2]…alysis and parsing

Description

Related Issues

Checklist

  • npm run check passes (typecheck + lint + spellcheck + knip + tests)
  • Changes are covered by tests (if applicable)
  • Documentation updated (if applicable)

@github-actions

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@mc5eamus mc5eamus requested a review from aymenfurter June 20, 2026 19:51
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.

Skill Finder suggests Codex injected AGENTS.md context as a custom skill opportunity

1 participant