Commit 9014964
refactor: only include agentId in tool calls for subagents
Conditionally add agentId to tool call metadata only when the agent has a parent. This prevents the base agent from unnecessarily including its ID in tool calls while maintaining proper tracking for spawned subagents.
Also simplified CLI agent block logic by removing unused helper and using existing recursive update function.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>1 parent a2a0e48 commit 9014964
File tree
3 files changed
+14
-46
lines changed- backend/src/tools
- cli/src/hooks
3 files changed
+14
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
430 | 431 | | |
431 | 432 | | |
432 | 433 | | |
433 | | - | |
| 434 | + | |
| 435 | + | |
434 | 436 | | |
435 | 437 | | |
436 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 27 | | |
46 | 28 | | |
47 | 29 | | |
| |||
532 | 514 | | |
533 | 515 | | |
534 | 516 | | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
544 | 523 | | |
545 | 524 | | |
546 | 525 | | |
| |||
732 | 711 | | |
733 | 712 | | |
734 | 713 | | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
| 714 | + | |
| 715 | + | |
751 | 716 | | |
752 | 717 | | |
753 | 718 | | |
| |||
0 commit comments