Skip to content

fix(core): preserve subagent text block boundaries - #53040

Merged
neriousy merged 2 commits into
anomalyco:v2from
mlimarenko:fix-v2-subagent-text-boundaries
Oct 5, 2026
Merged

neriousy merged 2 commits into
anomalyco:v2from
mlimarenko:fix-v2-subagent-text-boundaries

Conversation

@mlimarenko

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #53039

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Preserves paragraph boundaries between independent nonempty text parts in a subagent completion. Joining them with "" turns The files are unchanged. followed by ## Result into The files are unchanged.## Result before the parent receives it.

The helper now joins those parts with "\n\n". It does not trim their content; single-part output and the no-text fallback remain unchanged. The existing subagent fixture emits two parts so foreground, continuation, and background paths exercise the same behavior.

How did you verify your code works?

With Bun 1.4.2 in packages/core:

  • The targeted regression failed before the change and passed after it.
  • bun run test test/tool-subagent.test.ts: 15 passed, 0 failed.
  • bun typecheck: passed.
  • Changed-file formatting and lint checks passed; an independent review found no remaining defect.

The full suite has not been run locally.

Screenshots / recordings

Not a UI change; the tests assert the delivered parent text.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@mlimarenko

Copy link
Copy Markdown
Contributor Author

The PR body already contains Closes #53039: #53039.

The needs:issue label appears to be a false positive for the required v2 target. I checked GraphQL: baseRefName = v2, closingIssuesReferences.totalCount = 0. The default-branch pr-standards workflow only checks that count; the v2 workflow already has the PR-body fallback for this case.

Could that existing fallback be brought to dev, or the incorrect label removed? The PR remains targeted at v2 per CONTRIBUTING.

@mlimarenko
mlimarenko force-pushed the fix-v2-subagent-text-boundaries branch from 16a6264 to 086a081 Compare October 4, 2026 02:13
@mlimarenko

Copy link
Copy Markdown
Contributor Author

Rebased onto v2 at f72a103a4b94fb9a467294877bf6243dd99c6bdc; current head is 086a0810144069ccf7d32535695be1cf562a0b51. git range-diff confirms the patches are unchanged.

15 affected Core tests passed. Native pre-push bun run check also passed (36 typecheck tasks).

The upstream test, check and nix-eval runs on this head are action_required, rather than failed tests. Could a maintainer approve the fork workflow runs? Test run.

@neriousy
neriousy merged commit f28f624 into anomalyco:v2 Oct 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants