Skip to content

fix: collect tool results from subagent messages with absent isMeta field#23

Merged
matt1398 merged 1 commit intomatt1398:mainfrom
cesarafonseca:fix/subagent-tool-results
Feb 19, 2026
Merged

fix: collect tool results from subagent messages with absent isMeta field#23
matt1398 merged 1 commit intomatt1398:mainfrom
cesarafonseca:fix/subagent-tool-results

Conversation

@cesarafonseca
Copy link
Contributor

@cesarafonseca cesarafonseca commented Feb 19, 2026

Summary

  • Fixes a regression introduced in PR feat(chat): implement subagent input and compact boundary display items #12 where all tool calls inside subagent contexts showed "No result received"
  • In subagent JSONLs, user messages containing tool_result blocks lack the isMeta field (defaults to false). An unconditional continue in the !isMeta branch caused these messages to skip tool result collection entirely
  • Now checks for tool_result blocks before continuing, allowing them to fall through to the result collection logic

Bug

bug

Fix

fix

Testing

  • npm run typecheck passes
  • npm run lint passes
  • npm test passes
  • Added regression test in test/renderer/utils/displayItemBuilder.test.ts covering:
    • User message with isMeta: false + tool_result blocks → result collected, isOrphaned: false
    • Plain text user message without tool results → still renders as subagent_input

…ield

User messages in subagent JSONLs lack the isMeta field, defaulting to false.
An unconditional `continue` in the !isMeta branch skipped tool result
collection for these messages, causing all subagent tools to show
"No result received". Now we check for tool_result blocks before continuing,
allowing them to fall through to the result collection logic.
@matt1398
Copy link
Owner

Thanks for the detailed fix and for catching the regression from #12! Looks good to me. Merging now! 🚀

@matt1398 matt1398 merged commit 4ec2727 into matt1398:main Feb 19, 2026
3 checks passed
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