Unexpected File Opening During Runtime on Windows

Resolved 💬 3 comments Opened Aug 5, 2025 by PrzemyslawKlys Closed Aug 15, 2025

Bug Description
count_tokens.js keeps opening up on windows during run times with source code and everything wel#!/usr/bin/env node

import { readFile, stat, readdir, writeFile, mkdir } from 'node:fs/promises';
import { existsSync, statSync } from 'node:fs';
import path from 'node:path';
import process from 'node:process';
import { homedir } from 'node:os';
import https from 'node:https';
import http from 'node:http';

const USER_HOME_DIR = homedir();
const XDG_CONFIG_DIR = process.env.XDG_CONFIG_HOME ?? ${USER_HOME_DIR}/.config;
const DEFAULT_CLAUDE_CODE_PATH = '.claude';
const DEFAULT_CLAUDE_CONFIG_PATH = ${XDG_CONFIG_DIR}/claude;
const CLAUDE_CONFIG_DIR_ENV = 'CLAUDE_CONFIG_DIR';
const CLAUDE_PROJECTS_DIR_NAME = 'projects';
const USAGE_DATA_GLOB_PATTERN = '**/*.jsonl';
const TRACKING_FILE = path.join(USER_HOME_DIR, '.claude', 'leaderboard_submitted.json');
const TRACKING_RETENTION_DAYS = 30;

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 1.0.68
  • Feedback ID:

Errors

[{"error":"AxiosError: Request failed with status code 403\n    at qN (file:///C:/Users/przemyslaw.klys/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:718:1077)\n    at Unzip.X0 (file:///C:/Users/przemyslaw.klys/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:719:9955)\n    at Unzip.emit (node:events:519:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at H91.request (file:///C:/Users/przemyslaw.klys/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:721:2088)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async kC8 (file:///C:/Users/przemyslaw.klys/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1676:470)\n    at async Promise.all (index 0)\n    at async file:///C:/Users/przemyslaw.klys/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1662:3428","timestamp":"2025-08-05T08:43:14.014Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗