feat: 0.1.3 — upstream #54/#45/#53 e timeout do SessionEnd - #4
Merged
Merged
Conversation
(cherry picked from commit 46e3936)
…langfuse#45) (cherry picked from commit 7500867)
…rter (cherry picked from commit 0a1f0fb)
(cherry picked from commit bab8508)
Codex clamps the SessionEnd hook to 3s and warns on every session start when a larger value is declared: clamping SessionEnd hook timeout to 3s in .../0.1.2/hooks/hooks.json Declare 3 and the warning goes away. Measured headroom: the hook takes 0.87s on the largest rollout available here (5.5 MB, 27 turns), and SessionEnd uploads a single turn — the last one — because every earlier turn is already in the sidecar ledger. Stop keeps 30s: it is not clamped. Ships together with three upstream fixes cherry-picked in this branch: langfuse#54 (read the user prompt from the structured item event), langfuse#45 (sub_agent_activity events when resolving subagent traces) and langfuse#53 (bind the Langfuse tracer provider, plus clearing it on shutdown). 47 tests pass, prettier and tsc clean, and the committed bundle reproduces from source. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0153mpaia6pZ4oYtT479U8kF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo
Traz três correções do upstream e ajusta o timeout do hook que a
0.1.2introduziu. Versão0.1.2→0.1.3.O que entra
item_completed/UserMessagesub_agent_activityna resolução de traces de subagente — não tínhamos, e oganex-opsdeclaramax_concurrent_threads_per_session = 10NodeTracerProviderao@langfuse/tracing; o registro global pode recusar em silêncio. Também limpa o provider no shutdownSessionEndcomtimeout: 3Os quatro cherry-picks aplicaram limpos sobre a
maindo fork.Sobre o timeout
O Codex limita o hook
SessionEnda 3s e avisa a cada início de sessão quando se declara mais:Declarar 3 elimina o aviso. Folga medida: o hook leva 0,87 s no maior rollout disponível aqui (5,5 MB, 27 turnos), e o
SessionEndsobe um turno só — o último, já que os anteriores estão no ledger do sidecar. OStopfica em 30s, que não é limitado.Validação
pnpm test— 47 testes (40 antes; +7 vindos dos cherry-picks)prettier --checketsc --noEmitlimposContexto: o que a langfuse#53 NÃO resolveu
Levantei a hipótese de que a langfuse#53 explicaria observations sem conteúdo no nosso Langfuse self-hosted. Não explicava — testei o bundle novo contra um rollout real e o resultado não mudou.
A causa real era erro meu de leitura da API:
/api/public/v2/observationstem projeção de campos e omiteinput/outputsemfields=io. Com o parâmetro certo, todas as observations têm conteúdo, inclusive as de antes de qualquer mudança nossa. A telemetria estava saudável.A langfuse#53 entra assim mesmo, como robustez — o modo de falha que ela fecha é real e silencioso —, mas não como correção de um problema observado aqui.
Ao instalar
hooks.jsonmudou (path da versão e timeout), então otrusted_hashcai: reaprovar o hook em/hooks.🤖 Generated with Claude Code
https://claude.ai/code/session_0153mpaia6pZ4oYtT479U8kF