simulate_agent_session_cost
Simulate 1–100-turn coding agent sessions to project monthly token spend and compare baseline vs pruned context across cache TTLs, idle gaps, screenshot cliffs, and nine LLM pricing tiers.
Instructions
Simulate 1..100 turn O(T^2) coding agent session and monthly token spend across 5m/1h prompt-cache TTLs, pause gaps, and mid-session screenshot cache-bust cliffs across 9 published LLM pricing tiers.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "simulate_agent_session_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| turns | No | Number of turns per coding session (1..100). | |
| modelId | No | Reference LLM pricing tier ID (comparing baseline vs pruned/warm-cache trajectories across all 9 models). | claude_sonnet_4_5 |
| compactTurn | No | Optional explicit /compact turn for the optimized trajectory (auto-computed when omitted). | |
| imageTokens | No | Token weight of mid-session visual attachments injected at imageInjectionTurn. | |
| cacheTtlMode | No | Prompt-cache retention window (5m standard ephemeral cache, 1h extended cache, or none). | 5m |
| includeTurnLog | No | When true, includes turn-by-turn accounting arrays for both baseline and optimized runs. | |
| avgOutputTokens | No | Average assistant output tokens generated per turn. | |
| mcpSchemaTokens | No | Baseline eager MCP JSON Schema tokens injected on every turn. | |
| sessionsPerMonth | No | Monthly coding session count used for monthly USD/CNY budget projections. | |
| avgTurnGapMinutes | No | Average idle pause between turns in minutes (>5m triggers 5m cache TTL expiration). | |
| prunedRulesTokens | No | Optional target rules token count after deduplication and moving code blocks to on-demand docs. | |
| systemRulesTokens | No | Baseline static instruction tokens per turn (CLAUDE.md, AGENTS.md, .cursorrules). | |
| imageInjectionTurn | No | Turn number (1..100) where screenshots/images are pasted mid-session (0 = no image cliff). | |
| avgTurnGrowthTokens | No | Average new user prompt + tool output context added per turn. | |
| optimizedGapMinutes | No | Target turn pause in minutes for the optimized trajectory (defaults to <=2.8m warm window). | |
| prunedMcpSchemaTokens | No | Optional target MCP schema token count after disabling unused eager MCP servers. |