Earn 14 free days when your bug report or suggestion is accepted — how it works
Advanced

codeloop_flush_usage

Drain the persisted offline usage queue and POST events to the CodeLoop backend. Called automatically on shutdown; expose for explicit retries.

When to use codeloop_flush_usage

Use `codeloop_flush_usage` when your AI agent needs to drain the persisted offline usage queue and post events to the codeloop backend. called automatically on shutdown; expose for explicit retries.

Parameters

No parameters — call directly.

What you get back

{ flushed_count, remaining_count, last_error }

FAQ

What does codeloop_flush_usage do?

Drain the persisted offline usage queue and POST events to the CodeLoop backend. Called automatically on shutdown; expose for explicit retries.

When should an AI agent call codeloop_flush_usage?

Use `codeloop_flush_usage` when your AI agent needs to drain the persisted offline usage queue and post events to the codeloop backend. called automatically on shutdown; expose for explicit retries.

What does codeloop_flush_usage return?

{ flushed_count, remaining_count, last_error }

Is codeloop_flush_usage part of the CodeLoop MCP server?

Yes. CodeLoop ships as an MCP server installed via `npx codeloop init`. Cursor and Claude Code call it automatically once the User Rule (Cursor) or CLAUDE.md (Claude Code) is in place.

Related