What Is the Token Warning Threshold for Token-Burner Mode in Claude-Video?

The token warning threshold for token-burner mode in the bradautomates/claude-video repository is fixed at 250 frames.

The claude-video project provides AI-powered video processing capabilities through modular skills. Within the watch skill, selecting token-burner mode captures every scene-change frame across the entire video duration, creating a proportional increase in image token consumption. To prevent users from accidentally incurring excessive API costs, the codebase implements a hardcoded token warning threshold of 250 frames that alerts users before processing completes.

The 250-Frame Safety Check in watch.py

The warning logic resides in skills/watch/scripts/watch.py around lines 319‑324. When the --detail token-burner argument is active, the script evaluates the extracted frame count against the threshold:

if detail == "token-burner" and len(frames) > 250:
    print()
    print(
        f"> **Warning:** token-burner detail selected {len(frames)} frames. "
        "This may use a large number of image tokens."
    )

This conditional statement triggers exclusively when token-burner mode is selected and the frames list exceeds 250 elements. The warning prints to standard output, providing immediate visibility into potential token costs without halting execution.

Configuration of Detail Levels

The valid detail level options, including token-burner, are centrally defined in skills/watch/scripts/config.py. This configuration file acts as the schema for the --detail CLI argument, ensuring that token-burner is recognized as a high-fidelity extraction mode. While config.py defines the available modes, the 250-frame threshold itself is implemented as runtime logic in watch.py, creating a separation between mode definitions and safety guardrails.

Practical Execution and Warning Scenarios

Invoking the watch skill with token-burner mode on lengthy content requires explicit detail selection:

python -m skills.watch.scripts.watch https://example.com/video.mp4 --detail token-burner

If scene detection yields more than 250 frames, the console outputs the formatted warning string prior to API submission. This allows operators to abort the process if the projected token count exceeds budget constraints. The tests/test_watch.py file contains test cases validating this specific behavior, ensuring the warning fires correctly when frame counts surpass the threshold.

Summary

  • The token warning threshold for token-burner mode is 250 frames.
  • The validation occurs in skills/watch/scripts/watch.py at lines 319‑324.
  • The warning triggers only when detail == "token-burner" and the frame list length exceeds 250.
  • Available detail levels are defined in skills/watch/scripts/config.py.
  • This mechanism prevents unintentional consumption of large image token budgets.

Frequently Asked Questions

What happens if I exceed the token warning threshold in token-burner mode?

The system prints a console warning displaying the total frame count and a caution about high image token usage, then continues processing the video. This notification is informational rather than a hard stop, giving users visibility into costs without blocking workflow.

Where is the token warning threshold defined in the codebase?

The threshold is hardcoded as the integer 250 in skills/watch/scripts/watch.py within the frame processing logic at lines 319‑324. This specific value determines when the warning message emits during token-burner operations.

Can I adjust the 250-frame threshold for token-burner warnings?

Currently, the limit is fixed at 250 frames in the source code. To change this threshold, you must modify the integer value in the conditional check within skills/watch/scripts/watch.py and redeploy the application; no configuration file externalizes this parameter.

Does the low or medium detail level trigger the same token warnings?

No. The warning logic specifically targets the token-burner detail level. Alternative modes like low or medium employ different frame sampling strategies that do not activate this specific 250-frame threshold validation.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →