Skip to content

fix: strip subagent wrapper continuation lines#495

Closed
AliceLJY wants to merge 1 commit intomasterfrom
fix/subagent-wrapper-continuation-lines
Closed

fix: strip subagent wrapper continuation lines#495
AliceLJY wants to merge 1 commit intomasterfrom
fix/subagent-wrapper-continuation-lines

Conversation

@AliceLJY
Copy link
Copy Markdown
Collaborator

@AliceLJY AliceLJY commented Apr 3, 2026

Summary

  • strip [Subagent Context] / [Subagent Task] wrapper lines before memory extraction
  • treat the follow-on subagent runtime continuation lines as orchestration metadata, not conversation content
  • restore the existing strip-envelope-metadata regression expectations on current master

Testing

  • node --test test/strip-envelope-metadata.test.mjs

This is split out as a standalone baseline fix so unrelated PRs do not stay red because of the current subagent-wrapper regression on master.

Copy link
Copy Markdown
Collaborator Author

@AliceLJY AliceLJY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review passed. Summary:

  • Simplifies subagent wrapper stripping from complex single-pass lookbehind regex → two-pass line-by-line approach
  • Header lines ([Subagent Context/Task]) stripped entirely, continuation patterns caught independently
  • Simpler, more maintainable, easier to extend

1 file, +4/-4. mergeStateStatus: CLEAN.

@rwmjhb ready for your review.

@AliceLJY
Copy link
Copy Markdown
Collaborator Author

AliceLJY commented Apr 5, 2026

Closing — master already has a more robust implementation via stripLeadingRuntimeWrappers() (line 71 of smart-extractor.ts) that covers all the patterns this PR targeted. No remaining unique changes after rebase.

@AliceLJY AliceLJY closed this Apr 5, 2026
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.

2 participants