Skip to content

feat: 0.1.3 — upstream #54/#45/#53 e timeout do SessionEnd - #4

Merged
caiohasouza merged 5 commits into
mainfrom
feat/0.1.3-provider-binding-and-upstream-fixes
Sep 1, 2026
Merged

feat: 0.1.3 — upstream #54/#45/#53 e timeout do SessionEnd#4
caiohasouza merged 5 commits into
mainfrom
feat/0.1.3-provider-binding-and-upstream-fixes

Conversation

@caiohasouza

Copy link
Copy Markdown
Owner

Resumo

Traz três correções do upstream e ajusta o timeout do hook que a 0.1.2 introduziu. Versão 0.1.20.1.3.

O que entra

origem o que corrige
#54 (mergeada upstream) o trace mostrava o preâmbulo de instruções no lugar do prompt real do operador; agora lê do evento item_completed/UserMessage
#45 (mergeada upstream) eventos sub_agent_activity na resolução de traces de subagente — não tínhamos, e o ganex-ops declara max_concurrent_threads_per_session = 10
#53 (aberta upstream, 2 commits) vincula explicitamente o NodeTracerProvider ao @langfuse/tracing; o registro global pode recusar em silêncio. Também limpa o provider no shutdown
SessionEnd com timeout: 3

Os quatro cherry-picks aplicaram limpos sobre a main do fork.

Sobre o timeout

O Codex limita o hook SessionEnd a 3s e avisa a cada início de sessão quando se declara mais:

clamping SessionEnd hook timeout to 3s in .../0.1.2/hooks/hooks.json

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 SessionEnd sobe um turno só — o último, já que os anteriores estão no ledger do sidecar. O Stop fica em 30s, que não é limitado.

Validação

  • pnpm test47 testes (40 antes; +7 vindos dos cherry-picks)
  • prettier --check e tsc --noEmit limpos
  • bundle commitado reproduz do fonte sem diff

Contexto: 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/observations tem projeção de campos e omite input/output sem fields=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.json mudou (path da versão e timeout), então o trusted_hash cai: reaprovar o hook em /hooks.

🤖 Generated with Claude Code

https://claude.ai/code/session_0153mpaia6pZ4oYtT479U8kF

milanagm and others added 5 commits August 31, 2026 23:50
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
@caiohasouza
caiohasouza merged commit 437b52a into main Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants