Served session title can be captured by a Claude Pro quota probe ("quota")
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
Línea de trabajo
Comienza en core/session/store.go, en titleCandidate y el fold de Store.Append, y revisa después el campo MaxTokens existente en core/pipeline/extensions.go. Verifica que el candidato de título considere los metadatos de inferencia antes que el contenido del mensaje. Se considera hecho cuando una completion limitada a un token no puede reclamar un título de sesión, mientras que los prompts breves ordinarios sí pueden.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
A Claude Pro account's quota probe can claim a session's served title permanently. On a
178-event session the title is quota — the entire content of a one-token completion Claude Code
fires to check quota, which happened to be the first event through the proxy. Under the fold's
first-wins rule that named the session for the rest of its life.
quota is a poor title in general, but it is specifically poor for a Claude Pro account, where
this probe goes to api.anthropic.com on the same session id as the conversation. An account routed
through LiteLLM does not produce this shape at all, so the defect is invisible on those setups and
shows up only for direct-Anthropic (Pro/Max) users.
Observed
Session 0fac85c4-…, 178 events, title: "quota". The two events that carry it are seq 1 and 2 —
the first two events in the session:
seq=1 outbound POST api.anthropic.com/v1/messages
model=claude-haiku-4-5-20251001 maxTokens=1 messages=1
messages[0] = {role: user, content: "quota"} # 5 bytes, the whole message
seq=2 (the response)
completion="#" finishReason=max_tokens outputTokens=1 promptTokens=8
The rest of the session is 40 claude-opus-5-5 events. Model histogram: 4 haiku, 40 opus.
The fold behaves exactly as designed — there is no /rename and no <user_query> anywhere in this
session, so rankUserMsg (2) is the best rank any event offers, and seq 1 wins it first. Replaying
titleCandidate + the Store.Append fold against the live event stream reproduces quota from
seq 1, message 0, rank 2.
The harvest does not cover this session — ~/.cortex/session-metadata.json has no entry for
this id. So abctl's harvest-wins precedence has nothing to override with, and quota is what an
operator actually sees in the TITLE column.
Why titleFrom cannot catch it today
titleFrom already discards machinery it can recognise from the string: a <transcript> envelope,
a message that is nothing but <system-reminder> blocks, a /rename or <user_query> envelope
with a blank body. But a one-word user message is indistinguishable from a genuinely terse human
prompt at the string level, and titleFrom sees only content. Nothing about "quota" as a
string says it is machinery. Rejecting short messages would discard real prompts and is not the
answer.
Suggested server-side fix
The discriminating signal is not in the string, it is in the request metadata the event already
carries — and maxTokens is the decisive one:
MaxTokens == 1— a completion capped at one token cannot be a conversational turn. It is a
liveness/quota/classification probe by construction. Both quota events havemaxTokens: 1and
finishReason: max_tokenswithoutputTokens: 1.- Supporting signals, weaker on their own:
len(messages) == 1on an event at seq 1 of a long
session, and amodelthat differs from the session's dominant model (haiku against opus here).
Neither should be needed ifmaxTokensis used, and the model comparison in particular is
fragile — it needs session state the candidate extraction does not have and would misfire on a
legitimately haiku-only session.
Cheapest correct change: have titleCandidate return rankNone when
e.Inference.MaxTokens != nil && *e.Inference.MaxTokens <= 1, before it scans messages.
Two things make this cheap:
MaxTokens *intis already onpipeline.InferenceExtension(core/pipeline/extensions.go:156),
so there is no wire or schema change.titleCandidate(&event)already takes the whole event (core/session/store.go:340), so it has
the field in hand — no signature change, and the check is one pointer test in front of the scan
it already does, i.e. strictly cheaper than today on exactly these events.
It should be <= 1 rather than == 1 for the same defensive reason the rest of this file uses
(a 0 or negative value is not a conversation either), and it must run before the message scan so
a probe never claims a rank at all — under first-wins, a rank claimed is a title locked in.
Scope note
This is server-side only (core/session). abctl's harvest-wins fallback happens to mask it on
sessions the harvester can name, but as this session shows, it does not always have one — so the
fix belongs in the store, not the client.
Assisted-By: Claude (Anthropic AI) [email protected]
- Lenguaje dominante
- Go
- Estrellas
- 18
- Forks
- 42
- Merge medio
- 12 h 20 min
- PR fusionados (30 d)
- 229
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rossoctl/cortex
-
UI shows costs for all sessions even when drilled into a sessionPosiblemente ocupada @esnible la tomó hace 12 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
rossoctl/cortex#1116 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
enhancement laptop
Dificultad 5/5 Más de una semana Aptitud para principiantes 40/100
Los mantenedores suelen responder en 1 día
-
Decouple plugins from Go pipeline internals: parser test data, session facts, serializable recordsAbiertoenhancement laptop
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
enhancement laptop
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
Los mantenedores suelen responder en 1 día
-
Feed recording, sessions and cost through one input that does not depend on the Go listenersAbiertoenhancement laptop
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
Todos los issues de rossoctl/cortex
Issues similares
-
[flaky test] TestValidatorCommitterDropsEmptyStatusBatch: submits to the mock VC before its stream is registeredPosiblemente ocupada @liran-funaro la tomó hoy. Abiertocoordinator flaky-test race-condition testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
hyperledger/fabric-x-committer#876 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
garethgeorge/backrest#1426 ·
Los mantenedores suelen responder en 1 día
-
enhancement nav-pilot
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
valkey-io/valkey-operator#549 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
kind/features
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
TencentBlueKing/bk-nodemgr#3804 ·
Los mantenedores suelen responder en 1 día