You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Structured searches that skip the agent report the whole period instead of the query's timestamp window #2465
When search_logs / search_errors / search_traces get a structured query with an explicit dataset, fields and sort, the handler skips the embedded agent and sends only statsPeriod (packages/mcp-core/src/tools/support/search-events/search.ts:1016 on main @ fc117c37: timeParams = { statsPeriod: params.period ?? "14d" }). If the query itself names an absolute window with timestamp:>= / timestamp:<, Sentry still applies those bounds, so the rows are right. But the executed search reports statsPeriod: "7d" with start/end null ("Time range: Last 7d").
The same window through the agent path reports start/end, because the agent moves the bounds into timeRange. So samples and aggregates over one window describe it two ways, and an automated caller can't confirm which window an aggregate covered.
Evidence (MCP-SERVER-GTP, opencode, server 0.42.0)
Sample call, agent path: the final /events/ request sent the query's timestamp:>=…Z timestamp:<…Z bounds and start/end set to the same 15-minute window.
Aggregate call about 3 minutes later, with explicit fields and sort=-count(message): no agent spans. The /events/ request kept the same timestamp: bounds in query but sent statsPeriod=7d and no start/end.
Fix: on the no-agent path, narrow the period to the query's top-level timestamp: bounds, the same way the agent path narrows it to the agent's range (#2146). Draft PR to follow.
Activity
linear-code commentedon Nov 22, 2026
MCP-1272