Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: research
parent_issue: "none"
goal_ref: >-
native Claude Code / Claude-GPT の human-required workflow stop と autonomous completion を、
transcript末尾の正規表現ではなく session/turn/tool lifecycle と user intervention の因果に基づいて
比較可能な metric contract として定義し、agent-retrospective が誤った runtime 優劣を出さない状態にする
change_kind: research-onlyBackground
2026-09-21 の manual retrospective は native 1856 / Claude-GPT 934 session を対象に、
各 JSONL の「最終 substantive 発言の末尾 350 文字」を正規表現分類し、
- native: human-required stop 95、5.1 stops / 100 sessions
- Claude-GPT: human-required stop 230、24.6 stops / 100 sessions
- autonomous completion rate: native 94.9%、Claude-GPT 75.4%
と報告した。
しかし同じ報告内の代表例では、native の avoidable_human_escalation 23件の大半が
「重複 wakeup / notification に対して既に完了と再報告した」ケースであり、
定義上の「task 未完了 + 新しい user action が必要で停止」と一致しない。
また分析自身が以下を limitation として認めている。
- 1 JSONL file = 1 session と仮定
- resume / continuation normalization 未実施
- final tail 350 chars の regex heuristic
- 全数目視なし
- error が後続 turn で self-recover したか未追跡
- Claude-GPT の production source は canonical collector ではなく isolated transcript tree を独自走査
この状態では 5.1% vs 24.6% を「human-required stop rate」として扱うと、runtime の実際の自律性差を誤評価する可能性が高い。
Outcome
human_required_workflow_stop/v1 相当の metric semantics を research record として確定し、
少なくとも以下を区別できるようにする。
- task terminal completion
- turn-level Stop / StopFailure
- machine-enforced denial だが同一 session で自動 recovery
- true user-intervention-required stop
- legitimate human boundary
- avoidable human escalation
- duplicate wakeup/no-op notification
- transient transport error + retry success
- unresolved transport error
- resume / continuation
その上で native / Claude-GPT の bounded sample を同一ルールで再ラベルし、
heuristic metric の precision/recall または confusion matrix を評価する。
In Scope
- current session manifest / hook-event / transcript / task-context の利用可能な identity/lifecycle signal の棚卸し
- session identity と resume/continuation normalization
- user message が「新しい不可欠な情報」だったかの判定可能性
- same-cause retry の dedupe
- terminal task state と turn termination の分離
- no-op / duplicate wakeup を human-required stop に含めない規則
- 50〜100件程度の stratified manual ground-truth sample
- heuristic classifier との confusion matrix
- native / Claude-GPT に同一 metric computability 条件を適用
- evidence 不足時は
unknown/indeterminateとし 0 にしない
Out of Scope
- LLM による自由記述分類だけを authority にすること
- 新規常駐 telemetry / generic control-plane
- raw transcript の GitHub 公開
- metric が未確定のまま runtime 優劣を断定すること
- 実装: Claude-GPT launcher の classifyAllShell を native default と同様に省略する #2709 の classifier policy 実装
Acceptance Criteria
- AC1:
human-required stopを「task 未完了」「agent が自律継続しない」「続行に新 user action が実際に必要」の3条件を最低限含む形で定義する - AC2: duplicate wakeup / completed-task再報告 / courtesy question を true stop から分離する
- AC3: turn-level Stop/StopFailure と session/task completion を同一視しない
- AC4: resume / continuation / retry chain を session-level metric へ正規化する規則を定義する
- AC5: stratified ground-truth sample を作り、既存 tail-regex heuristic の false positive / false negative を記録する
- AC6: native / Claude-GPT の双方で同じ source-quality gate を満たせない metric は cross-runtime rate を算出せず
indeterminateとする - AC7: 再計算した rate と 2026-09-21 exploratory 5.1% / 24.6% の差を説明し、以前の値を authoritative baseline として固定しない
- AC8: implementation が必要な場合のみ、既存 agent-retrospective schema / collector への最小 follow-up scope を提示する
Related / Dedupe
- 調査: issue-refinement-loop / Claude Code セッションの途中停止・再開要求の根本原因をログから分類する #204 — 過去の途中停止・再開要求の根本原因調査
- P0: agent-retrospective の Claude-GPT self-hosted run を完走可能にし all-terminal fan-in と runtime coverage を統合する #2642 / 実装: agent-retrospective: runtime source coverage と checkpoint 確定を分離し、未観測を誤って resolved にしない #2644 — runtime coverage / metric computability
- 調査: native Claude Code / Claude-GPT の auto mode 過剰ブロックを実効ポリシー・分類基準を揃えて比較し、最小修正先を確定する #2647 — auto-mode denial comparison
- 調査: Claude-GPT の 503 / completed-without-output 停止を authoritative lifecycle で再集計し recovery owner を特定する #2710 — 503/completed-without-output の authoritative recovery 調査
- 調査: agent-retrospective の canonical since-last + full-analysis E2E を current main で再検証する #2711 — canonical retrospective E2E 再検証
本 Issue は「stop metric の意味論と測定妥当性」に限定し、個別 transport/classifier fix を所有しない。
Stop Conditions
- source evidence が metric 条件を満たさない場合は
indeterminateとし、補完推測しない - secret/raw transcript を public artifact に含めない
- new telemetry が不可欠と判明した場合は、まず既存 source で代替不能な理由を記録して separate implementation scope とする
Delivery Rule
research-only。metric contract と validation result を先に確定し、collector/schema 実装は必要な場合のみ別 Issue に分離する。
Activity
squne121 commentedon Sep 21, 2026
Research Record (stop-metric-analyst, 2026-09-21)
主要発見: 前回metric(5.1%/24.6%)は再現不能・authoritativeではない
subagents/*.jsonl)とtool-result artifactを"session"として混入させていた(top-level session fileは実際にはnative 553件・gpt 534件)。stop_hook_summary.session_id(内部id)でグルーピングすると296ファイルが57 logical sessionへ収束し、resume/continuationチェーンが多数存在する。claude_gpt側に同等の内部idがあるかは未確認(open item)。AC別disposition
indeterminate。native/claude_gpt間でsession identity解決度・globの対象範囲(native=単一project dir、gpt=全project+worktree dir)が非対称なため、単一のcross-runtime rateは算出しない。stop_hook_summary.session_idでsession keyingする (2)subagents//tool-results/をsession count対象から除外する (3) 拒否/ブロック系lexiconをheuristicへ追加。classifier policy自体の実装は#2709の範囲。Research disposition完了。前回の5.1%/24.6%は破棄し、以後のretrospectiveでは本記録のindeterminate判定を正とする。concrete collector defect(2件)は#2711の発見と合わせてdedupeの上、最小限のfollow-up Issueとして分離する。
squne121 commentedon Sep 21, 2026
Research disposition完了。metric semantics確定・前回の5.1%/24.6%は破棄・indeterminate判定を記録。concrete collector defectはfollow-up issueへ分離予定。