aws / aws/amazon-q-developer-cli

Telemetry for context window usage over time

Offen
#2,832 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
2k
Forks
439
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Goal - have visibility into context window usage to help identify when and why a user might run out of context window and need to compact or start a new session.

The current /usage command does a great job of describing what areas are specifically consuming context.

Current context window (60630 of 200k tokens used)
|██████████████|██████████████████████████████████████████████████████████████████ 30.32%

█ Context files: ~120 tokens (0.06%)
█ Tools: ~35490 tokens (17.75%)
█ Q responses: ~2120 tokens (1.06%)
█ Your prompts: ~22910 tokens (11.45%)

Ideally we'd have logging or other instrumentation that gives this information at meaningful events:

1. Session Startup
2. Context overflow
3. After compacting
4. If it is easy to have this information recorded during the session as well, this could also be useful.

If we can log the number of "turns" or other increments it would help us see if tokens get consumed by large single actions, or a collection of actions.

When this is instrumented and segmented we can start to characterize the "common" experiences that people have.

Things like - are there patterns for people who run out of the context window more? Is it b/c tool responses are chewing up context? Or MCP tool descriptions consume too much? Or users have too many context files?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Das Issue nennt nur den Befehl `/usage` und keine Dateien oder Tests. Beginne damit, seine Implementierung und die Abrechnung des Kontextfensters zu finden, und kläre anschließend, wie Startup-, Overflow- und Compaction-Ereignisse aufgezeichnet und segmentiert werden sollten; für den Abschluss ist eine abgestimmte Instrumentierung erforderlich, die die Nutzung über die Zeit und die Anzahl der Turns sichtbar macht.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
cli, observability-sre
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.