alibaba/arthas · error · IllegalArgumentException
${action} operation requires index parameter
Error message
${action} operation requires index parameter What it means
Both the info and replay actions require an index parameter referencing a specific TimeTunnel recording entry (the index shown by tt list). Without it Arthas cannot know which recorded invocation to inspect or replay.
Source
Thrown at core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TimeTunnelTool.java:121
/**
* 验证参数
*/
private void validateParameters(String action, String classPattern, String methodPattern,
Integer index, String searchExpression) {
switch (action) {
case "record":
if (classPattern == null || classPattern.trim().isEmpty()) {
throw new IllegalArgumentException("classPattern is required for record operation");
}
if (methodPattern == null || methodPattern.trim().isEmpty()) {
throw new IllegalArgumentException("methodPattern is required for record operation");
}
break;
case "info":
case "replay":
if (index == null) {
throw new IllegalArgumentException(action + " operation requires index parameter");
}
break;
case "search":
if (searchExpression == null || searchExpression.trim().isEmpty()) {
throw new IllegalArgumentException("search operation requires searchExpression parameter");
}
break;
case "delete":
if (index == null) {
throw new IllegalArgumentException("delete operation requires index parameter");
}
break;
case "list":
case "deleteall":
break;
default:
throw new IllegalArgumentException("Unsupported action: " + action);
}View on GitHub (pinned to 21cf2e9ba5)
Solutions
- Run tt(action="list") first to see recorded entries and their indices.
- Pass the integer index shown in the list output.
- Ensure the index still exists (it may have been deleted).
Example fix
// before tt(action="info") // after // first: tt(action="list") to find index 1000 tt(action="info", index=1000)
Defensive patterns
Strategy: validation
Validate before calling
// Before calling tt info/replay, validate index
if (("info".equals(normalizedAction) || "replay".equals(normalizedAction))
&& index == null) {
throw new IllegalArgumentException("index is required for tt " + normalizedAction);
} Try / catch
try {
String result = timeTunnel(action, ..., index, ...);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("index parameter")) {
// index missing for info or replay — run tt list first to find it
}
} Prevention
- Run tt(action="list") before info or replay to discover valid indices.
- Always pass the index when using info or replay.
- Handle stale indices (the recording may have been deleted).
When it happens
Trigger: Calling tt with action=info or action=replay while index is null. The same message is used for both actions, with the action name interpolated.
Common situations: User forgets to run tt list first to discover available indices; MCP client omits the index field.
Related errors
- classPattern is required for record operation
- methodPattern is required for record operation
- search operation requires searchExpression parameter
- delete operation requires index parameter
- Unsupported action: ${action}
AI-assisted analysis of alibaba/arthas@21cf2e9ba5 (2026-08-14).
Data as JSON: /api/errors/a688207a0a64f2a7.
Report an issue: GitHub.