MCPcopy Create free account
hub / github.com/SethGammon/Citadel / estimateSessionCost

Function estimateSessionCost

scripts/telemetry-stats.js:222–225  ·  view source on GitHub ↗

* Compute estimated cost for a single session based on agent activity. * Used as fallback when real token data is not available. * * @param {number} agentCount - Number of sub-agents spawned this session * @param {number} durationMinutes - Session duration in minutes * @returns {number} Estimat

(agentCount, durationMinutes)

Source from the content-addressed store, hash-verified

220 * @returns {number} Estimated cost in dollars (rounded to 2 decimal places)
221 */
222function estimateSessionCost(agentCount, durationMinutes) {
223 const cost = BASE_SESSION_COST + (agentCount * COST_PER_SUBAGENT) + (durationMinutes * COST_PER_MINUTE);
224 return Math.round(cost * 100) / 100;
225}
226
227/**
228 * Read real token/cost data directly from Claude Code session JSONL files.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected