Repository navigation
fix(session-flow): classify automated, Desktop and orphaned sessions in audit-sessions - #6179
Conversation
…in audit-sessions (#6076) Store each session's transcript entrypoint values and take sweep medians and findings over interactive sessions, counting the automated ones set aside. Raise the tools.interrupts threshold to 1, count Claude Desktop prompts (origin.kind human, promptSource sdk) as typed turns after one leading system-reminder block, and skip set-aside .orphaned- transcripts in collect. Co-authored-by: ksextonmelodic <ksextonmelodic@gmail.com>
Co-authored-by: ksextonmelodic <ksextonmelodic@gmail.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 2m 25s —— View job Security review —
|
|
Claude finished @kyle-sexton's task in 4m 4s —— View job Claude is reviewing this PR
Code review (
|
|
claude-security-review has reviewed this pull request through 083967c; a later push is reviewed from there. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 083967c1ab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-review has reviewed this pull request through 083967c; a later push is reviewed from there. |
…ollect (#6076) Co-authored-by: ksextonmelodic <ksextonmelodic@gmail.com>
Summary
/session-flow:audit-sessionscounted headless and Agent SDK sessions in its medians and findings, flagged a single interrupt, missed Claude Desktop prompts as typed turns, and would have collected a set-aside.orphaned-transcript as a second session. This fixes all four (findings E4, E6, E7, I6 of #6074).Fix
entrypointvalues inentrypoints(or["unknown"]). Sweep sets aside a session whose entrypoints are allsdk-cli/sdk-ts/sdk-py(census.session_class) and reportsautomated_set_asideandunclassifiedin the window, the summary and the markdown header. Sessions with no known entrypoint stay in. Drift still reads every record. A new canary,key_path:user:entrypoint, feedstokens.main,tokens.sub,time.active_sandhuman.turns. No new flag.tools.interruptsthreshold goes from 0 to 1, the store's own p90 (confirmed below).transcript_reader.typed_text()accepts anorigin.kind: humanrecord whatever itspromptSource, after dropping one leading<system-reminder>block.is_typed_turn()wraps it. Collect excerpts the stripped text. CLI records are unchanged, and/session-flow:retrobenefits too.RECORD_TYPESis untouched (feat(session-flow): teach the transcript reader eight current record types #5931 owns it).*.orphaned-*stem and counts it inskipped_orphaned.reference/store-layout.mddocuments the field and population in pointer form. session-flow 0.48.6 with a CHANGELOG entry.Maintainer-confirms decisions
Made on 2026-10-04 by frontier review (Claude Opus 5.5), under the owner's delegation of human-gate items:
cwdis left out. The issue offers it only as a cheaper first step before a re-collect, which happens anyway. Headless sandbox runs already carryentrypoint: sdk-cli, and a temp-path rule would also set aside interactive scratch sessions. After merge, compare the first sweep'sautomated_set_asideon the maintainer's machine with the issue's 245; a result near 125 would mean that machine's sandboxes are notsdk-cliand thecwdstep is needed.key_path:user:entrypointcanary feedstokens.main,tokens.sub,time.active_sandhuman.turns: the four metrics whose pooled and interactive-only medians the 2026-10-03 audit compared, all of which moved. Widen the feeds if a later comparison shows another metric moving (the canary's basis text and the CHANGELOG now say exactly that).origin.kind: humanrecords, as the issue scopes it. No CLI typed or queued record starts with a reminder (0 of 2,337), and headless prompts carry no origin, so neither CLI nor headless counts change.tools.interruptsthreshold is confirmed at 1. It is the store's own p90, the rule every threshold insweep-rules.jsonfollows. 57 of the 81 sessions threshold 0 flagged had a single interrupt, and threshold 1 flags 24 of 764.Verification
test_parse_transcript.py45 passed; running-retrotest_observer.py78 passed.claude -ptranscripts on the test VM (Claude Code 2.1.288), every record stored["sdk-cli"]with 0 typed turns and sweep set them all aside.scripts/run-ruff.sh check, typos, markdownlint-cli2, changelog parity (all four modes) and gitleaks are clean.Related
Closes #6076
Part of #6074. Coordinates with #5931 (same reader file, no overlap in record types) and #5818.