Skip to content

round-trip-tracker: consolidate stale PRs #6, #7, #8 - #9

Open
rajkripal wants to merge 3 commits into
jugaad-lab:mainfrom
rajkripal:consolidate/round-trip-tracker
Open

round-trip-tracker: consolidate stale PRs #6, #7, #8#9
rajkripal wants to merge 3 commits into
jugaad-lab:mainfrom
rajkripal:consolidate/round-trip-tracker

Conversation

@rajkripal

Copy link
Copy Markdown

Consolidates three stale, stacked PRs into a single mergeable script on main. #6, #7, and #8 were opened sequentially (each based on the previous branch) and never landed, so round-trip-tracker.py doesn't exist on main at all yet.

This cherry-picks the three round-trip-tracker commits from that chain, in order, onto current main:

No conflicts between them; cherry-pick was clean. Verified with python3 -m py_compile round-trip-tracker.py and a smoke test via --from-jsonl against a sample transcript (loads messages, logs a chain, first_try_success reported correctly).

Leaving #6, #7, #8 open for you to close at your discretion.

bunny-bot-openclaw and others added 3 commits July 28, 2026 12:01
`extract_text` only checked for OpenClaw-style `toolCall`/`toolResult`
types, so tool calls and results in Claude Code sessions (which use
`tool_use`/`tool_result`) were silently skipped. Brain signal detection
returned 0 hits on every Claude Code session because cashew Bash calls
appeared in `tool_use` blocks that were never read.

Fix: check both type names in each branch. For `tool_use`, read args
from `input` (falling back to `arguments`). Also handle `attachment`
entries in `load_from_jsonl` so startup hook results, which carry brain
context, are included as user messages.
Two fixes for the 0% brain usage bug:

1. JSONL parser: add a branch for attachment entries where
   attachment.type == "hook_success", extracting content from
   attachment.content instead of the missing message key.

2. extract_task_chains: after building all chains, do one
   session-level has_brain_context(messages, 0, len(messages)) pass.
   Startup hook_success entries land before the first user message so
   per-chain checks always miss them; session-level propagation fixes this.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Capture the per-message model from Claude Code JSONL entries (falling
back to CASHEW_CLAUDE_MODEL/CLAUDE_MODEL or the bridge's
current-model.txt when the transcript doesn't carry one) and stamp it
on each logged chain as session_model. Report now breaks stats out by
model so the "better models use tools better" hypothesis is testable
instead of vibes.
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