← Back to PRs

#16964: test: add regression tests for sub-agent session path resolution

by StressTestor open 2026-02-15 08:44 View on GitHub →
stale size: XS
## Summary - Adds regression tests for `resolveSessionFilePath` covering sub-agent scenarios where `agentId` is required - Verifies main agent and sub-agent paths are distinct and correctly resolved - The underlying code fix was already applied; these tests prevent regressions Relates to #16826, #16278 ## Test plan - [x] Tests verify main vs sub-agent paths differ - [x] Tests verify agentId is properly incorporated into resolved paths - [x] Full test suite passes (`pnpm test:fast`, `pnpm check`) <!-- greptile_comment --> <h3>Greptile Summary</h3> Added four regression tests for `resolveSessionFilePath` covering sub-agent session path resolution scenarios. Tests verify that main agent sessions default to `agents/main/sessions/` while sub-agent sessions correctly resolve to `agents/{agentId}/sessions/` when `agentId` is provided. The underlying fix was already applied in cab0abf5; these tests prevent future regressions. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with no risk - Pure test addition covering regression scenarios. Tests are well-structured, follow existing patterns, and correctly verify the distinction between main and sub-agent session path resolution. No production code changes. - No files require special attention <sub>Last reviewed commit: 52989f8</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs