mixdog 0.9.4 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -38
- package/package.json +4 -1
- package/scripts/bench/r5-orchestrated-task.json +7 -0
- package/scripts/bench/round-r13-clientmeta.json +464 -0
- package/scripts/bench/round-r14-betafeatures.json +466 -0
- package/scripts/bench/round-r15-fulldefault.json +462 -0
- package/scripts/bench/round-r16-sessionid.json +466 -0
- package/scripts/bench/round-r17-wirebytes.json +456 -0
- package/scripts/bench/round-r18-prewarm.json +468 -0
- package/scripts/bench/round-r19-clean.json +472 -0
- package/scripts/bench/round-r20-prewarm-clean.json +475 -0
- package/scripts/bench/round-r21-delta-retry.json +473 -0
- package/scripts/bench/round-r22-full-probe.json +693 -0
- package/scripts/bench/round-r23-itemprobe.json +701 -0
- package/scripts/bench/round-r24-shapefix.json +677 -0
- package/scripts/bench/round-r25-serial.json +464 -0
- package/scripts/bench/round-r26-parallel3.json +671 -0
- package/scripts/bench/round-r27-parallel10.json +894 -0
- package/scripts/bench/round-r28-parallel10-stagger.json +882 -0
- package/scripts/bench/round-r29-parallel10-stagger166.json +886 -0
- package/scripts/bench/round-r30-instid.json +253 -0
- package/scripts/bench/round-r31-upgradeprobe.json +256 -0
- package/scripts/bench/round-r32-vs-codex-lead.json +254 -0
- package/scripts/bench/round-r33-vs-codex-codex.json +115 -0
- package/scripts/bench/round-r34-orchestrated.json +120 -0
- package/scripts/bench/round-r35-orchestrated-codex.json +61 -0
- package/scripts/bench/round-r36-orchestrated-capped.json +128 -0
- package/scripts/bench-run.mjs +40 -7
- package/scripts/internal-comms-bench.mjs +2 -4
- package/scripts/model-catalog-audit.mjs +209 -0
- package/scripts/model-list-sanitize-test.mjs +37 -0
- package/scripts/recall-bench.mjs +76 -13
- package/scripts/recall-quality-cases.json +12 -0
- package/scripts/tool-smoke.mjs +2 -2
- package/src/agents/heavy-worker/AGENT.md +7 -7
- package/src/agents/scheduler-task/AGENT.md +2 -3
- package/src/agents/webhook-handler/AGENT.md +2 -3
- package/src/agents/worker/AGENT.md +9 -10
- package/src/app.mjs +12 -1
- package/src/headless-role.mjs +7 -1
- package/src/mixdog-session-runtime.mjs +15 -14
- package/src/output-styles/default.md +14 -18
- package/src/output-styles/minimal.md +4 -5
- package/src/output-styles/simple.md +7 -8
- package/src/rules/agent/00-common.md +6 -5
- package/src/rules/agent/30-explorer.md +16 -5
- package/src/rules/lead/01-general.md +5 -5
- package/src/rules/lead/lead-brief.md +6 -3
- package/src/rules/lead/lead-tool.md +6 -4
- package/src/rules/shared/01-tool.md +17 -21
- package/src/runtime/agent/orchestrator/agent-runtime/agent-dispatch.mjs +8 -3
- package/src/runtime/agent/orchestrator/providers/model-catalog.mjs +19 -0
- package/src/runtime/agent/orchestrator/providers/model-list-sanitize.mjs +11 -3
- package/src/runtime/agent/orchestrator/providers/openai-oauth-http-sse.mjs +9 -1
- package/src/runtime/agent/orchestrator/providers/openai-oauth-ws.mjs +53 -9
- package/src/runtime/agent/orchestrator/providers/openai-oauth.mjs +23 -10
- package/src/runtime/agent/orchestrator/providers/openai-ws-delta.mjs +11 -9
- package/src/runtime/agent/orchestrator/providers/openai-ws-pool.mjs +33 -4
- package/src/runtime/agent/orchestrator/providers/provider-catalog-cache.mjs +80 -0
- package/src/runtime/agent/orchestrator/session/loop/recall-fasttrack.mjs +93 -0
- package/src/runtime/agent/orchestrator/session/loop.mjs +27 -5
- package/src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs +1 -1
- package/src/runtime/agent/orchestrator/stall-policy.mjs +20 -1
- package/src/runtime/agent/orchestrator/tools/builtin/builtin-tools.mjs +7 -7
- package/src/runtime/agent/orchestrator/tools/code-graph-tool-defs.mjs +1 -1
- package/src/runtime/channels/backends/discord-gateway.mjs +2 -2
- package/src/runtime/channels/backends/discord.mjs +15 -26
- package/src/runtime/channels/backends/telegram.mjs +8 -12
- package/src/runtime/channels/index.mjs +23 -43
- package/src/runtime/channels/lib/backend-dispatch.mjs +5 -3
- package/src/runtime/channels/lib/config.mjs +37 -149
- package/src/runtime/channels/lib/event-pipeline.mjs +4 -4
- package/src/runtime/channels/lib/event-queue.mjs +15 -9
- package/src/runtime/channels/lib/inbound-routing.mjs +2 -39
- package/src/runtime/channels/lib/interaction-workflows.mjs +5 -113
- package/src/runtime/channels/lib/scheduler.mjs +27 -113
- package/src/runtime/channels/lib/webhook/deliveries.mjs +3 -2
- package/src/runtime/channels/lib/webhook.mjs +8 -47
- package/src/runtime/memory/index.mjs +9 -0
- package/src/runtime/memory/lib/core-memory-store.mjs +5 -1
- package/src/runtime/memory/lib/ko-morph.mjs +195 -0
- package/src/runtime/memory/lib/memory-recall-store.mjs +47 -10
- package/src/runtime/memory/lib/memory-text-utils.mjs +46 -0
- package/src/runtime/memory/lib/query-handlers.mjs +27 -5
- package/src/runtime/memory/tool-defs.mjs +2 -2
- package/src/runtime/shared/config.mjs +14 -4
- package/src/runtime/shared/markdown-frontmatter.mjs +19 -0
- package/src/runtime/shared/schedules-store.mjs +13 -3
- package/src/runtime/shared/tool-execution-contract.mjs +2 -2
- package/src/session-runtime/config-helpers.mjs +45 -10
- package/src/session-runtime/quick-model-rows.mjs +46 -11
- package/src/session-runtime/quick-search-models.mjs +28 -27
- package/src/session-runtime/settings-api.mjs +34 -1
- package/src/session-runtime/tool-defs.mjs +1 -1
- package/src/session-runtime/workflow.mjs +1 -1
- package/src/standalone/agent-tool/tool-def.mjs +1 -1
- package/src/standalone/agent-tool.mjs +30 -0
- package/src/standalone/channel-admin.mjs +102 -90
- package/src/standalone/explore-tool.mjs +39 -10
- package/src/tui/App.jsx +126 -28
- package/src/tui/app/app-format.mjs +11 -4
- package/src/tui/app/channel-pickers.mjs +2 -4
- package/src/tui/app/maintenance-pickers.mjs +60 -28
- package/src/tui/app/model-options.mjs +5 -1
- package/src/tui/app/settings-picker.mjs +0 -1
- package/src/tui/app/transcript-window.mjs +8 -2
- package/src/tui/app/use-transcript-scroll.mjs +3 -1
- package/src/tui/app/use-transcript-window.mjs +19 -1
- package/src/tui/components/ConfirmBar.jsx +10 -7
- package/src/tui/components/Picker.jsx +32 -11
- package/src/tui/components/PromptInput.jsx +10 -1
- package/src/tui/components/StatusLine.jsx +6 -3
- package/src/tui/dist/index.mjs +440 -293
- package/src/tui/engine.mjs +48 -12
- package/src/tui/index.jsx +11 -52
- package/src/ui/statusline.mjs +10 -0
- package/src/workflows/default/WORKFLOW.md +15 -17
- package/src/workflows/sequential/WORKFLOW.md +15 -17
- package/vendor/ink/build/ink.js +9 -1
- package/scripts/recall-usecase-probe.json +0 -6
- package/src/runtime/channels/lib/holidays.mjs +0 -138
|
@@ -0,0 +1,882 @@
|
|
|
1
|
+
{
|
|
2
|
+
"round": "28",
|
|
3
|
+
"runner": "lead",
|
|
4
|
+
"opts": {
|
|
5
|
+
"provider": "openai-oauth",
|
|
6
|
+
"model": "gpt-5.5",
|
|
7
|
+
"effort": null,
|
|
8
|
+
"fast": false,
|
|
9
|
+
"env": {
|
|
10
|
+
"MIXDOG_DATA_DIR": "C:\\Users\\tempe\\.mixdog\\bench-data"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"tasks": 12,
|
|
14
|
+
"completed": 12,
|
|
15
|
+
"completion_rate": 100,
|
|
16
|
+
"sessions": [
|
|
17
|
+
"sess_57728_1783071795209_1783071795448_71fa5e61e6ecb475570364df123b303f",
|
|
18
|
+
"sess_51156_1783071798234_1783071798464_c166c30d76fae5a4ded44c6229496e24",
|
|
19
|
+
"sess_59984_1783071801251_1783071801508_823ab26c20fd578146024f68d1733f23",
|
|
20
|
+
"sess_19992_1783071804242_1783071804475_3ef8d44b03c6f45b4f7121dd497302c5",
|
|
21
|
+
"sess_28856_1783071807239_1783071807472_9662a783985ea41e8cda524d1e8343c8",
|
|
22
|
+
"sess_46952_1783071810232_1783071810466_f731a885e41218866e9fa5779b5419cc",
|
|
23
|
+
"sess_37472_1783071813242_1783071813487_2043b6b30432bce173056c74f698e430",
|
|
24
|
+
"sess_14324_1783071816242_1783071816480_fe9b76ef49ba5d1531b76b6b3e502379",
|
|
25
|
+
"sess_51644_1783071819240_1783071819469_8122cc9a92952472385145df79f774f1",
|
|
26
|
+
"sess_45940_1783071822232_1783071822453_4605b8338cff9ad5fb6f9e2d1424bc62",
|
|
27
|
+
"sess_43448_1783071848279_1783071848513_42ed6b818b66c016f007797b9f122702",
|
|
28
|
+
"sess_50916_1783071848974_1783071849207_bcf3defcfec3fb5606fe8a9ac6d2f118"
|
|
29
|
+
],
|
|
30
|
+
"results": [
|
|
31
|
+
{
|
|
32
|
+
"id": "r4-debug-forwarding-gap#1",
|
|
33
|
+
"agent": "reviewer",
|
|
34
|
+
"ok": true,
|
|
35
|
+
"ms": 69167,
|
|
36
|
+
"sessionId": "sess_57728_1783071795209_1783071795448_71fa5e61e6ecb475570364df123b303f",
|
|
37
|
+
"output": "sessionId: sess_57728_1783071795209_1783071795448_71fa5e61e6ecb475570364df123b303f\n재영님, 조사 완료했습니다. 핵심 경로는 `start()`가 `bridge-state.json`을 먼저 쓰고, 소유권/백엔드 연결/전사 바인딩/워치 설치가 뒤따르는 구조입니다.\n\n- **가장 큰 위험: 기존 전사 파일을 첫 바인딩할 때 EOF로 시작** — persisted cursor가 같은 전사로 확인되지 않으면 `setContext()`가 `currentSize`로 커서를 잡아 이미 쓰인 assistant 출력은 건너뜁니다. 자동 backlog catch-up은 없습니다. `src/runtime/channels/lib/output-forwarder.mjs:117`, `src/runtime/channels/index.mjs:625`\n\n- **not-yet-created transcript 워치 공백** — `fs.watch()`는 없는 파일에 실패하고, re-arm poll이 파일 생성 후 `forwardNewText()`로 backlog를 읽습니다. 60초 안에 생성되면 복구되지만, timeout 이후 생성되면 다음 rebind/flush 전까지 자동 복구되지 않습니다. `src/runtime/channels/index.mjs:340`, `src/runtime/channels/index.mjs:357`, `src/runtime/channels/index.mjs:384`\n\n- **bridge-state 활성화 후 backend 연결 전 ownership gate** — pre-connect 중 `forwardNewText()`는 `_isOwner()`에서 false로 종료되어 전송은 지연됩니다. 커서는 전진하지 않으므로 연결 후 `forwardNewText()` 또는 re-arm으로 backlog가 복구됩니다. `src/runtime/channels/index.mjs:1735`, `src/runtime/channels/index.mjs:776`, `src/runtime/channels/lib/output-forwarder.mjs:351`\n\n- **watch 설치 직전/직후 짧은 쓰기 레이스** — 성공적으로 watch가 설치되면 `scheduleWatchFlush()`가 즉시 예약되어 stat 이후 쓰인 bytes를 읽습니다. backlog catch-up으로 복구됩니다. `src/runtime/channels/lib/output-forwarder.mjs:656`, `src/runtime/channels/lib/output-forwarder.mjs:665`\n\nVerdict: 60초 re-arm 안에 생성되는 일반 first-reply 공백은 복구되지만, persisted cursor 없는 기존 파일 바인딩과 re-arm timeout 이후 생성은 실제 silent drop/indefinite delay 위험입니다.",
|
|
38
|
+
"card": {
|
|
39
|
+
"session": "sess_57728_1783071795209_1783071795448_71fa5e61e6ecb475570364df123b303f",
|
|
40
|
+
"provider": "openai-oauth",
|
|
41
|
+
"model": "gpt-5.5",
|
|
42
|
+
"wall_ms": 58666,
|
|
43
|
+
"turns": 6,
|
|
44
|
+
"tool_calls": 7,
|
|
45
|
+
"tools_per_turn": 1.2,
|
|
46
|
+
"total_tool_ms": 990,
|
|
47
|
+
"llm_stream_ms": 57685,
|
|
48
|
+
"cache_ratio": 0.6365751512331317,
|
|
49
|
+
"cached_tokens": 87552,
|
|
50
|
+
"prompt_tokens": 137536,
|
|
51
|
+
"uncached_tokens": 49984,
|
|
52
|
+
"output_tokens": 5282,
|
|
53
|
+
"cache_weighted_input_10": 58739.2,
|
|
54
|
+
"cache_weighted_input_25": 71872,
|
|
55
|
+
"prompt_growth": 29460,
|
|
56
|
+
"antipatterns": 1,
|
|
57
|
+
"issues": 11,
|
|
58
|
+
"issue_types": [
|
|
59
|
+
"cache",
|
|
60
|
+
"cache_break",
|
|
61
|
+
"cache_miss",
|
|
62
|
+
"broad_tool_result",
|
|
63
|
+
"service_tier",
|
|
64
|
+
"tool_churn_cluster"
|
|
65
|
+
],
|
|
66
|
+
"read_fragmentation_paths": [],
|
|
67
|
+
"grep_sweep_count": 0
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "r4-impl-usage-summary#1",
|
|
72
|
+
"agent": "worker",
|
|
73
|
+
"ok": true,
|
|
74
|
+
"ms": 50739,
|
|
75
|
+
"sessionId": "sess_51156_1783071798234_1783071798464_c166c30d76fae5a4ded44c6229496e24",
|
|
76
|
+
"output": "sessionId: sess_51156_1783071798234_1783071798464_c166c30d76fae5a4ded44c6229496e24\n구현 범위가 작고 요청에 실행 승인이 포함되어 있어 바로 적용하고 검증하겠습니다.완료했습니다, 재영님.\n\n- **Diff 요약**: `package.json`에 `usage:today` 추가, `scripts/usage-today.mjs` 신규 추가.\n- **기능**: `MIXDOG_DATA_DIR`를 반영해 `agent-trace.jsonl`을 읽고, 로컬 자정 이후 usage를 모델별/전체 합계로 출력합니다.\n- **검증**: `node --check scripts/usage-today.mjs` 성공, `npm run usage:today` 실행 성공.\n- **실행 결과**: 오늘 기준 `gpt-5.5` 400 calls, total cost `$40.511113`.\n- **참고**: 기존 작업트리에 있던 `src/runtime/channels/lib/event-queue.mjs`, `output-forwarder.mjs` 변경은 건드리지 않았습니다.",
|
|
77
|
+
"card": {
|
|
78
|
+
"session": "sess_51156_1783071798234_1783071798464_c166c30d76fae5a4ded44c6229496e24",
|
|
79
|
+
"provider": "openai-oauth",
|
|
80
|
+
"model": "gpt-5.5",
|
|
81
|
+
"wall_ms": 40249,
|
|
82
|
+
"turns": 7,
|
|
83
|
+
"tool_calls": 9,
|
|
84
|
+
"tools_per_turn": 1.3,
|
|
85
|
+
"total_tool_ms": 2252,
|
|
86
|
+
"llm_stream_ms": 37749,
|
|
87
|
+
"cache_ratio": 0.7021675140487021,
|
|
88
|
+
"cached_tokens": 62976,
|
|
89
|
+
"prompt_tokens": 89688,
|
|
90
|
+
"uncached_tokens": 26712,
|
|
91
|
+
"output_tokens": 3514,
|
|
92
|
+
"cache_weighted_input_10": 33009.6,
|
|
93
|
+
"cache_weighted_input_25": 42456,
|
|
94
|
+
"prompt_growth": 10977,
|
|
95
|
+
"antipatterns": 0,
|
|
96
|
+
"issues": 10,
|
|
97
|
+
"issue_types": [
|
|
98
|
+
"cache",
|
|
99
|
+
"cache_break",
|
|
100
|
+
"tool_error",
|
|
101
|
+
"service_tier"
|
|
102
|
+
],
|
|
103
|
+
"read_fragmentation_paths": [],
|
|
104
|
+
"grep_sweep_count": 0
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "r4-explain-compact-engine#1",
|
|
109
|
+
"agent": "explore",
|
|
110
|
+
"ok": true,
|
|
111
|
+
"ms": 76820,
|
|
112
|
+
"sessionId": "sess_59984_1783071801251_1783071801508_823ab26c20fd578146024f68d1733f23",
|
|
113
|
+
"output": "sessionId: sess_59984_1783071801251_1783071801508_823ab26c20fd578146024f68d1733f23\nArchitecture brief (≤40 lines):\n\n- **Public surface**: compaction engine exports `semanticCompactMessages` and `recallFastTrackCompactMessages`; facade re-exports them via `compact.mjs`. `src/runtime/agent/orchestrator/session/compact/engine.mjs:278`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:445`, `src/runtime/agent/orchestrator/session/compact.mjs:52`\n- **Main callers**: live loop runs pre-send compaction; manager runs manual/auto-clear compaction through `runSessionCompaction`. `src/runtime/agent/orchestrator/session/loop.mjs:329`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:143`, `src/runtime/agent/orchestrator/session/manager.mjs:1849`, `src/runtime/agent/orchestrator/session/manager.mjs:1950`\n- **Fire condition**: auto policy requires `auto !== false`, a boundary, trigger/buffer/target settings, and type selection. `src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:89`, `src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:100`, `src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:117`, `src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:123`\n- **Threshold**: compaction fires when pressure reaches trigger, when token estimate is unavailable, or when reactive overflow forces it. `src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:170`\n- **Loop decision**: loop drains pending steering first, estimates tokens, marks reactive vs auto trigger, and either records a check-only telemetry event or enters `compacting`. `src/runtime/agent/orchestrator/session/loop.mjs:324`, `src/runtime/agent/orchestrator/session/loop.mjs:351`, `src/runtime/agent/orchestrator/session/loop.mjs:352`, `src/runtime/agent/orchestrator/session/loop.mjs:365`, `src/runtime/agent/orchestrator/session/loop.mjs:373`\n- **Type routing**: recall-fasttrack runs first when selected; otherwise semantic runs if enabled; unavailable type throws. `src/runtime/agent/orchestrator/session/loop.mjs:414`, `src/runtime/agent/orchestrator/session/loop.mjs:439`, `src/runtime/agent/orchestrator/session/loop.mjs:496`\n- **Semantic no-op**: if sanitized transcript already fits and not forced, semantic returns unchanged, before redaction. `src/runtime/agent/orchestrator/session/compact/engine.mjs:284`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:289`\n- **Semantic window**: engine separates protected prefix, previous summary, and non-summary live messages before choosing head/tail. `src/runtime/agent/orchestrator/session/compact/engine.mjs:100`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:102`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:110`\n- **Tail budget**: preserved recent tail uses explicit `preserveRecentTokens`/`keepTokens`, otherwise bounded by 25% budget, 8k default, min 2k, max 80%. `src/runtime/agent/orchestrator/session/compact/budget.mjs:274`\n- **Semantic tail choice**: user-bearing live history keeps up to recent user turns and may split the newest turn to fit. `src/runtime/agent/orchestrator/session/compact/engine.mjs:134`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:141`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:151`\n- **No-user tail choice**: assistant/tool-only history cuts only at non-tool indices, preserving tool pairs and allowing empty tail/head cases as recoverable. `src/runtime/agent/orchestrator/session/compact/engine.mjs:121`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:193`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:207`\n- **Boundary repair**: selected tail is re-sanitized/reconciled so assistant tool calls and tool results stay provider-valid. `src/runtime/agent/orchestrator/session/compact/engine.mjs:244`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:250`\n- **Recall tail**: recall-fasttrack preserves newest structured turns, capped by user-count and token cap; if oversized, it drops oldest turns then truncates the last surviving turn. `src/runtime/agent/orchestrator/session/compact/engine.mjs:593`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:601`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:610`\n- **Recall no-user support**: recall tail accepts assistant/tool-only recent structure and computes head before that tail. `src/runtime/agent/orchestrator/session/compact/engine.mjs:613`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:617`\n- **Redaction hook**: both semantic and recall redact tool-call secrets after fit/no-op check and before window selection, so preserved system/tail are measured and emitted redacted. `src/runtime/agent/orchestrator/session/compact/engine.mjs:306`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:312`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:644`\n- **Redaction behavior**: redaction only changes sensitive tool-call argument values and raw secret pairs, preserving structure/order/pairing. `src/runtime/agent/orchestrator/session/compact/text-utils.mjs:219`, `src/runtime/agent/orchestrator/session/compact/text-utils.mjs:261`, `src/runtime/agent/orchestrator/session/compact/text-utils.mjs:319`\n- **Semantic failure points**: missing provider, empty live window, no compactable head, prompt fit failure, empty summary, summary fit failure, or final over-budget all throw. `src/runtime/agent/orchestrator/session/compact/engine.mjs:279`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:254`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:315`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:335`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:372`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:385`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:395`\n- **Recall failure points**: no compactable history with empty recall, empty recall text, summary fit failure, or final over-budget all throw. `src/runtime/agent/orchestrator/session/compact/engine.mjs:653`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:666`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:691`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:698`\n- **Fallbacks**: loop falls back from semantic failure to unanchored tool-output prune, but skips that fallback for recall-fasttrack failures. `src/runtime/agent/orchestrator/session/loop.mjs:500`, `src/runtime/agent/orchestrator/session/loop.mjs:517`, `src/runtime/agent/orchestrator/session/loop.mjs:527`\n- **Manager degraded path**: manager recall-fasttrack failure can retry semantic once; if all fail, it records `manual_failed`/`post_turn_failed`. `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:231`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:242`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:348`\n- **Hard failure path**: loop records `overflow_failed`, emits failed compact event, then raises `AgentContextOverflowError`. `src/runtime/agent/orchestrator/session/loop.mjs:552`, `src/runtime/agent/orchestrator/session/loop.mjs:597`, `src/runtime/agent/orchestrator/session/loop.mjs:618`",
|
|
114
|
+
"card": {
|
|
115
|
+
"session": "sess_59984_1783071801251_1783071801508_823ab26c20fd578146024f68d1733f23",
|
|
116
|
+
"provider": "openai-oauth",
|
|
117
|
+
"model": "gpt-5.5",
|
|
118
|
+
"wall_ms": 66286,
|
|
119
|
+
"turns": 9,
|
|
120
|
+
"tool_calls": 14,
|
|
121
|
+
"tools_per_turn": 1.6,
|
|
122
|
+
"total_tool_ms": 764,
|
|
123
|
+
"llm_stream_ms": 65047,
|
|
124
|
+
"cache_ratio": 0.6644304897227508,
|
|
125
|
+
"cached_tokens": 181248,
|
|
126
|
+
"prompt_tokens": 272787,
|
|
127
|
+
"uncached_tokens": 91539,
|
|
128
|
+
"output_tokens": 5104,
|
|
129
|
+
"cache_weighted_input_10": 109663.8,
|
|
130
|
+
"cache_weighted_input_25": 136851,
|
|
131
|
+
"prompt_growth": 68411,
|
|
132
|
+
"antipatterns": 1,
|
|
133
|
+
"issues": 17,
|
|
134
|
+
"issue_types": [
|
|
135
|
+
"cache",
|
|
136
|
+
"cache_break",
|
|
137
|
+
"cache_miss",
|
|
138
|
+
"readonly_stall",
|
|
139
|
+
"broad_tool_result",
|
|
140
|
+
"service_tier",
|
|
141
|
+
"tool_churn_cluster"
|
|
142
|
+
],
|
|
143
|
+
"read_fragmentation_paths": [],
|
|
144
|
+
"grep_sweep_count": 0
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "r4-debug-forwarding-gap#2",
|
|
149
|
+
"agent": "reviewer",
|
|
150
|
+
"ok": true,
|
|
151
|
+
"ms": 112499,
|
|
152
|
+
"sessionId": "sess_19992_1783071804242_1783071804475_3ef8d44b03c6f45b4f7121dd497302c5",
|
|
153
|
+
"output": "sessionId: sess_19992_1783071804242_1783071804475_3ef8d44b03c6f45b4f7121dd497302c5\n관련 경로를 먼저 확인해 활성화부터 전달까지의 흐름과 누락 지점을 추적하겠습니다.재영님, 조사 결과 활성화 직후 “active” 표시는 먼저 나가고, 실제 전달 준비는 뒤따라와 일부 구간은 지연되며 한 구간은 실제 누락 가능성이 있습니다.\n\n- **최대 영향: 새로 잡힌 기존 transcript의 선행 출력 누락** — `setContext()`가 matching persisted cursor가 없으면 현재 EOF로 커서를 잡아, bind 전에 이미 기록된 assistant 출력은 읽지 않습니다. Catch-up: **복구 안 됨**. `src/runtime/channels/lib/output-forwarder.mjs:117`, `src/runtime/channels/index.mjs:625`, `src/runtime/channels/index.mjs:441`\n\n- **활성화 표식과 실제 소유/연결 사이 지연** — `bridge-state.json`은 `setChannelBridgeActive()` 직후 쓰이지만, ownership claim, `backend.connect()`, binding은 이후입니다. 이때 watcher flush는 `_isOwner()`에서 막혀 읽지 않으므로 드롭은 아니고 지연됩니다. Catch-up: **post-connect `forwardNewText()`로 복구**. `src/runtime/channels/lib/tool-dispatch.mjs:48`, `src/runtime/channels/lib/tool-dispatch.mjs:59`, `src/runtime/channels/index.mjs:769`, `src/runtime/channels/index.mjs:801`, `src/runtime/channels/lib/output-forwarder.mjs:351`\n\n- **아직 생성되지 않은 transcript의 `fs.watch` 공백** — `startWatch()`는 없는 파일에서 실패하고, 별도 re-arm poll이 250ms 간격/60초 한도로 파일 생성 후 watch와 backlog read를 수행합니다. Catch-up: **60초 내 생성은 복구, timeout 뒤는 다음 rebind/turn-end 전까지 지연**. `src/runtime/channels/lib/output-forwarder.mjs:656`, `src/runtime/channels/index.mjs:340`, `src/runtime/channels/index.mjs:376`, `src/runtime/channels/index.mjs:384`\n\n- **pre-connect re-arm 조기 종료** — pending transcript poll이 연결 전 실행되면 `!bridgeRuntimeConnected`에서 종료하지만, 연결 후 missing path를 다시 re-arm합니다. Catch-up: **복구됨, 단 첫 전달은 연결 완료 뒤로 지연**. `src/runtime/channels/index.mjs:369`, `src/runtime/channels/index.mjs:803`\n\n- **bind stat과 watch 설치 사이의 쓰기** — `setContext()`가 size를 잡은 뒤 watch 설치 전에 쓰인 bytes는 `startWatch()`의 즉시 flush가 읽습니다. Catch-up: **복구됨**. `src/runtime/channels/lib/output-forwarder.mjs:111`, `src/runtime/channels/lib/output-forwarder.mjs:665`\n\n- **부분 JSONL 라인** — newline 전 partial line은 커서를 전진하지 않아 다음 flush에서 다시 읽습니다. Catch-up: **복구됨, newline/write event까지 지연**. `src/runtime/channels/lib/output-forwarder.mjs:172`\n\nVerdict: 현재 설계는 대부분 backlog로 복구하지만, “이미 존재하는 새 transcript를 bind할 때 EOF로 시작하는 경로”는 activation-window assistant 출력이 조용히 누락될 수 있습니다.",
|
|
154
|
+
"card": {
|
|
155
|
+
"session": "sess_19992_1783071804242_1783071804475_3ef8d44b03c6f45b4f7121dd497302c5",
|
|
156
|
+
"provider": "openai-oauth",
|
|
157
|
+
"model": "gpt-5.5",
|
|
158
|
+
"wall_ms": 101993,
|
|
159
|
+
"turns": 9,
|
|
160
|
+
"tool_calls": 8,
|
|
161
|
+
"tools_per_turn": 0.9,
|
|
162
|
+
"total_tool_ms": 626,
|
|
163
|
+
"llm_stream_ms": 101048,
|
|
164
|
+
"cache_ratio": 0.8043708488508287,
|
|
165
|
+
"cached_tokens": 229376,
|
|
166
|
+
"prompt_tokens": 285162,
|
|
167
|
+
"uncached_tokens": 55786,
|
|
168
|
+
"output_tokens": 10026,
|
|
169
|
+
"cache_weighted_input_10": 78723.6,
|
|
170
|
+
"cache_weighted_input_25": 113130,
|
|
171
|
+
"prompt_growth": 34118,
|
|
172
|
+
"antipatterns": 2,
|
|
173
|
+
"issues": 16,
|
|
174
|
+
"issue_types": [
|
|
175
|
+
"cache",
|
|
176
|
+
"cache_break",
|
|
177
|
+
"cache_miss",
|
|
178
|
+
"readonly_stall",
|
|
179
|
+
"broad_tool_result",
|
|
180
|
+
"service_tier",
|
|
181
|
+
"missed_parallelism",
|
|
182
|
+
"tool_churn_cluster"
|
|
183
|
+
],
|
|
184
|
+
"read_fragmentation_paths": [],
|
|
185
|
+
"grep_sweep_count": 0
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"id": "r4-impl-usage-summary#2",
|
|
190
|
+
"agent": "worker",
|
|
191
|
+
"ok": true,
|
|
192
|
+
"ms": 41032,
|
|
193
|
+
"sessionId": "sess_28856_1783071807239_1783071807472_9662a783985ea41e8cda524d1e8343c8",
|
|
194
|
+
"output": "sessionId: sess_28856_1783071807239_1783071807472_9662a783985ea41e8cda524d1e8343c8\n요청 범위가 명확해서 바로 구현하고 검증하겠습니다.이미 관련 파일이 있어 동작 확인 후 필요한 보완만 적용하겠습니다.재영님, 완료되었습니다: `usage:today` 스크립트와 `scripts/usage-today.mjs`가 준비되어 검증까지 통과했습니다.\n\n- **Diff 요약**: `package.json`에 `usage:today` 추가, 새 스크립트가 `MIXDOG_DATA_DIR`/기본 경로의 `agent-trace.jsonl`을 오늘 00:00부터 집계합니다.\n- **출력**: 모델별 `calls/input/cached/output/costUsd`와 `GRAND TOTAL` 라인을 표로 출력합니다.\n- **검증**: `node --check scripts/usage-today.mjs`, `npm run usage:today` 성공. 현재 unrelated 변경으로 `src/runtime/channels/lib/*` 수정본도 남아 있습니다.",
|
|
195
|
+
"card": {
|
|
196
|
+
"session": "sess_28856_1783071807239_1783071807472_9662a783985ea41e8cda524d1e8343c8",
|
|
197
|
+
"provider": "openai-oauth",
|
|
198
|
+
"model": "gpt-5.5",
|
|
199
|
+
"wall_ms": 30543,
|
|
200
|
+
"turns": 4,
|
|
201
|
+
"tool_calls": 5,
|
|
202
|
+
"tools_per_turn": 1.3,
|
|
203
|
+
"total_tool_ms": 1540,
|
|
204
|
+
"llm_stream_ms": 28658,
|
|
205
|
+
"cache_ratio": 0.566224303929222,
|
|
206
|
+
"cached_tokens": 26112,
|
|
207
|
+
"prompt_tokens": 46116,
|
|
208
|
+
"uncached_tokens": 20004,
|
|
209
|
+
"output_tokens": 2462,
|
|
210
|
+
"cache_weighted_input_10": 22615.2,
|
|
211
|
+
"cache_weighted_input_25": 26532,
|
|
212
|
+
"prompt_growth": 5587,
|
|
213
|
+
"antipatterns": 0,
|
|
214
|
+
"issues": 6,
|
|
215
|
+
"issue_types": [
|
|
216
|
+
"cache",
|
|
217
|
+
"cache_break",
|
|
218
|
+
"service_tier"
|
|
219
|
+
],
|
|
220
|
+
"read_fragmentation_paths": [],
|
|
221
|
+
"grep_sweep_count": 0
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"id": "r4-explain-compact-engine#2",
|
|
226
|
+
"agent": "explore",
|
|
227
|
+
"ok": true,
|
|
228
|
+
"ms": 85368,
|
|
229
|
+
"sessionId": "sess_46952_1783071810232_1783071810466_f731a885e41218866e9fa5779b5419cc",
|
|
230
|
+
"output": "sessionId: sess_46952_1783071810232_1783071810466_f731a885e41218866e9fa5779b5419cc\n재영님, 요청하신 compaction subsystem 맵입니다.\n\n```text\n- Facade: `compact.mjs` preserves the old public surface and re-exports `semanticCompactMessages` / `recallFastTrackCompactMessages` from `compact/engine.mjs` (`src/runtime/agent/orchestrator/session/compact.mjs:1`, `:52`).\n- Main loop entry: pre-send compaction resolves policy, estimates tokens, and calls semantic or recall-fasttrack before provider send (`src/runtime/agent/orchestrator/session/loop.mjs:329`, `:351`, `:414`, `:441`).\n- Manual/auto-clear entry: `runSessionCompaction()` handles persisted sessions and is called by manager manual clear/compact flows (`src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:143`, `src/runtime/agent/orchestrator/session/manager.mjs:1849`, `:1950`).\n- Recall pipeline entry: loop recall-fasttrack hydrates Memory, drains cycle1, caps recall injection, then calls `recallFastTrackCompactMessages()` (`src/runtime/agent/orchestrator/session/loop/recall-fasttrack.mjs:25`, `:61`, `:109`, `:161`).\n- Auto policy: auto is disabled only by config/env; agents force semantic, otherwise type is normalized from env/config (`src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:89`, `:92`, `:39`, `:45`).\n- Fire condition: proactive compact fires when transcript estimate plus reserve reaches trigger; unknown estimates compact conservatively, reactive overflow forces it (`src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:170`, `:151`, `:173`).\n- Trigger budget: boundary comes from explicit/session context, trigger is boundary minus buffer unless explicit sub-boundary limit exists (`src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:94`, `:107`, `:113`, `:117`).\n- Target budget: post-compact target is a small share of boundary plus reserve, capped by boundary (`src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:163`, `:167`).\n- Semantic no-op: if sanitized input already fits and not forced, returns unchanged and intentionally skips redaction of preserved tail (`src/runtime/agent/orchestrator/session/compact/engine.mjs:284`, `:289`).\n- Semantic flow: effective budget → sanitize → redact → select window → provider summary → fit summary → emit system + summary + preserved tail (`src/runtime/agent/orchestrator/session/compact/engine.mjs:283`, `:312`, `:314`, `:367`, `:384`, `:392`).\n- Semantic tail: protected/system context is split out, prior summary is found, live messages exclude summaries (`src/runtime/agent/orchestrator/session/compact/engine.mjs:100`, `:102`, `:104`, `:110`).\n- User-tail policy: when live has user turns, keep newest `tailTurns` within `preserveRecentBudget`; newest oversized turn may be suffix-split (`src/runtime/agent/orchestrator/session/compact/engine.mjs:134`, `:141`, `:146`, `:151`).\n- No-user tail policy: otherwise choose newest valid non-tool cut points, never starting tail on a `tool` result (`src/runtime/agent/orchestrator/session/compact/engine.mjs:121`, `:124`, `:193`, `:200`).\n- Tail repair: selected tail is re-sanitized/reconciled so tool pairs remain provider-valid after cutting (`src/runtime/agent/orchestrator/session/compact/engine.mjs:246`, `:250`).\n- Mandatory budget: system + preserved tail is mandatory; if it plus summary room exceeds target, working budget is raised instead of failing (`src/runtime/agent/orchestrator/session/compact/engine.mjs:319`, `:328`).\n- Redaction hook: compaction redacts assistant tool-call argument values after fit no-op and before window/tail selection, so surviving system/tail are measured and emitted redacted (`src/runtime/agent/orchestrator/session/compact/engine.mjs:306`, `:312`, `:389`).\n- Redaction rules: sensitive keys/raw `key:value` values become `[redacted]`; only tool-call argument values are touched for preserved messages (`src/runtime/agent/orchestrator/session/compact/text-utils.mjs:12`, `:46`, `:121`, `:319`).\n- Recall no-op/redaction: recall-fasttrack has the same fits-budget no-op, then redacts before splitting protected/live context (`src/runtime/agent/orchestrator/session/compact/engine.mjs:625`, `:627`, `:644`, `:646`).\n- Recall tail: keeps newest user-anchored turns, drops oldest turns to cap, then truncates oldest surviving content while preserving newest message (`src/runtime/agent/orchestrator/session/compact/engine.mjs:449`, `:456`, `:601`, `:602`, `:609`).\n- Recall no-user handling: a no-user recent tail is valid and keeps assistant/tool structure, with pairing reconciled (`src/runtime/agent/orchestrator/session/compact/engine.mjs:613`, `:617`).\n- Recall summary: recall text plus prior summary are fitted into a recall summary message, capped separately by `recallTokenCap` (`src/runtime/agent/orchestrator/session/compact/engine.mjs:652`, `:666`, `:679`, `:684`).\n- Recall failure fallback: persisted-session runner falls back from recall-fasttrack to semantic once if semantic is enabled and provider exists (`src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:231`, `:237`, `:242`, `:245`).\n- Loop failure path: pre-send loop does not semantic-fallback recall failures; it records recall error and rethrows (`src/runtime/agent/orchestrator/session/loop.mjs:429`, `:437`).\n- Prune fallback: semantic/non-recall failures try one anchor-independent `pruneToolOutputsUnanchored`; recall failures skip this fallback (`src/runtime/agent/orchestrator/session/loop.mjs:500`, `:517`, `:527`; `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:322`, `:327`, `:330`).\n- Hard failure: if no compacted transcript is produced, loop records `overflow_failed` and throws context overflow; manager records `post_turn_failed`/`manual_failed` and returns error (`src/runtime/agent/orchestrator/session/loop.mjs:552`, `:618`; `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:348`, `:358`, `:375`).\n- Reactive overflow: provider context overflow gets one in-turn retry by marking next pre-send compact as reactive; second failure surfaces overflow (`src/runtime/agent/orchestrator/session/loop.mjs:982`, `:995`, `:1002`, `:1018`).\n- Crash fallback: stale `compacting`/`inProgress` stage is normalized to `interrupted` on ask/resume, while terminal failure stages remain durable (`src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:28`, `:36`, `src/runtime/agent/orchestrator/session/manager.mjs:1237`, `:1781`).\n```",
|
|
231
|
+
"card": {
|
|
232
|
+
"session": "sess_46952_1783071810232_1783071810466_f731a885e41218866e9fa5779b5419cc",
|
|
233
|
+
"provider": "openai-oauth",
|
|
234
|
+
"model": "gpt-5.5",
|
|
235
|
+
"wall_ms": 74868,
|
|
236
|
+
"turns": 9,
|
|
237
|
+
"tool_calls": 13,
|
|
238
|
+
"tools_per_turn": 1.4,
|
|
239
|
+
"total_tool_ms": 1507,
|
|
240
|
+
"llm_stream_ms": 73186,
|
|
241
|
+
"cache_ratio": 0.7317301744981538,
|
|
242
|
+
"cached_tokens": 156160,
|
|
243
|
+
"prompt_tokens": 213412,
|
|
244
|
+
"uncached_tokens": 57252,
|
|
245
|
+
"output_tokens": 4844,
|
|
246
|
+
"cache_weighted_input_10": 72868,
|
|
247
|
+
"cache_weighted_input_25": 96292,
|
|
248
|
+
"prompt_growth": 44849,
|
|
249
|
+
"antipatterns": 1,
|
|
250
|
+
"issues": 13,
|
|
251
|
+
"issue_types": [
|
|
252
|
+
"cache",
|
|
253
|
+
"cache_break",
|
|
254
|
+
"readonly_stall",
|
|
255
|
+
"service_tier",
|
|
256
|
+
"tool_churn_cluster"
|
|
257
|
+
],
|
|
258
|
+
"read_fragmentation_paths": [],
|
|
259
|
+
"grep_sweep_count": 0
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"id": "r4-debug-forwarding-gap#3",
|
|
264
|
+
"agent": "reviewer",
|
|
265
|
+
"ok": true,
|
|
266
|
+
"ms": 80245,
|
|
267
|
+
"sessionId": "sess_37472_1783071813242_1783071813487_2043b6b30432bce173056c74f698e430",
|
|
268
|
+
"output": "sessionId: sess_37472_1783071813242_1783071813487_2043b6b30432bce173056c74f698e430\n요청 범위가 좁아 바로 추적해서 누락/지연 구간과 catch-up 여부만 정리하겠습니다.핵심 경로는 확인했고, `forwardFinalText`의 종료 처리만 더 확인한 뒤 결과를 정리하겠습니다.조사 완료: 활성화 직후 첫 전달까지의 주요 신뢰성 갭은 “기존 파일을 EOF로 바인딩하는 경우”가 가장 위험합니다.\n\n- **영구 누락 가능**: `setContext()`는 `replayFromStart`도 아니고 persisted path가 같은 transcript도 아니면 커서를 현재 EOF로 둡니다. 활성화 후 바인딩 전 이미 써진 assistant 출력은 이후 `forwardNewText()`가 못 봅니다. Catch-up 복구 없음. `src/runtime/channels/lib/output-forwarder.mjs:111`\n\n- **pending→exists 폴링 중 생성 레이스**: `bindPersistedTranscriptIfAny()`는 `catchUpFromPersisted`만 넘기고 `catchUp`은 넘기지 않습니다. 그래서 pending transcript가 `rebindTranscriptContext()` poll 중 생성되면 `replayFromStart`가 꺼진 채 EOF 바인딩될 수 있습니다. Catch-up 복구 없음. `src/runtime/channels/index.mjs:625`, `src/runtime/channels/index.mjs:438`\n\n- **stale transcript 첫 inbound 레이스**: 활성화 직후 self session record가 아직 active로 안 보이면 기존 binding을 잠깐 유지하고 500ms만 steal poll 합니다. 실패 후 wrong/stale transcript에 바인딩되면 실제 self transcript의 첫 출력은 감시되지 않고, 나중에 steal해도 기본 EOF 바인딩이라 과거 출력 복구가 어렵습니다. Catch-up 부분적/불안정. `src/runtime/channels/index.mjs:1526`, `src/runtime/channels/index.mjs:1571`\n\n- **not-yet-created transcript watch gap**: `fs.watch()`는 없는 파일에 실패하고 닫히지만, re-arm poll이 파일 생성을 감지해 `startWatch()` 후 `forwardNewText()`를 호출합니다. 60초 내 생성이면 backlog 복구, 그 후는 다음 rebind 전까지 지연됩니다. `src/runtime/channels/index.mjs:357`, `src/runtime/channels/lib/output-forwarder.mjs:656`\n\n- **ownership/backend 준비 전 forward 시도**: bridge-state는 `start()` 초반에 쓰이지만 `forwardNewText()`는 `_isOwner()`가 false면 즉시 반환합니다. post-connect에서 다시 `forwardNewText()`/re-arm을 하므로 보통 지연만 발생하지만, 위 EOF 바인딩과 겹치면 복구되지 않습니다. `src/runtime/channels/index.mjs:1735`, `src/runtime/channels/lib/output-forwarder.mjs:351`, `src/runtime/channels/index.mjs:801`\n\n판정: bridge activation window는 re-arm으로 일부 지연은 회복하지만, “기존/방금 생성된 transcript를 EOF로 바인딩”하는 경로에서는 첫 assistant 출력이 조용히 유실될 수 있습니다.",
|
|
269
|
+
"card": {
|
|
270
|
+
"session": "sess_37472_1783071813242_1783071813487_2043b6b30432bce173056c74f698e430",
|
|
271
|
+
"provider": "openai-oauth",
|
|
272
|
+
"model": "gpt-5.5",
|
|
273
|
+
"wall_ms": 69745,
|
|
274
|
+
"turns": 6,
|
|
275
|
+
"tool_calls": 6,
|
|
276
|
+
"tools_per_turn": 1,
|
|
277
|
+
"total_tool_ms": 597,
|
|
278
|
+
"llm_stream_ms": 68848,
|
|
279
|
+
"cache_ratio": 0.7382912272306966,
|
|
280
|
+
"cached_tokens": 114176,
|
|
281
|
+
"prompt_tokens": 154649,
|
|
282
|
+
"uncached_tokens": 40473,
|
|
283
|
+
"output_tokens": 7167,
|
|
284
|
+
"cache_weighted_input_10": 51890.6,
|
|
285
|
+
"cache_weighted_input_25": 69017,
|
|
286
|
+
"prompt_growth": 29315,
|
|
287
|
+
"antipatterns": 1,
|
|
288
|
+
"issues": 11,
|
|
289
|
+
"issue_types": [
|
|
290
|
+
"cache",
|
|
291
|
+
"cache_break",
|
|
292
|
+
"broad_tool_result",
|
|
293
|
+
"service_tier",
|
|
294
|
+
"missed_parallelism",
|
|
295
|
+
"tool_churn_cluster"
|
|
296
|
+
],
|
|
297
|
+
"read_fragmentation_paths": [],
|
|
298
|
+
"grep_sweep_count": 0
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"id": "r4-impl-usage-summary#3",
|
|
303
|
+
"agent": "worker",
|
|
304
|
+
"ok": true,
|
|
305
|
+
"ms": 103592,
|
|
306
|
+
"sessionId": "sess_14324_1783071816242_1783071816480_fe9b76ef49ba5d1531b76b6b3e502379",
|
|
307
|
+
"output": "sessionId: sess_14324_1783071816242_1783071816480_fe9b76ef49ba5d1531b76b6b3e502379\n요청하신 범위 안에서 스크립트 추가와 검증까지 바로 진행하겠습니다.현재 스크립트와 npm 항목은 이미 존재해 보이므로, 변경 상태 확인 후 검증을 실행하겠습니다.완료했습니다, 재영님. 요청한 `usage:today` diff가 반영되어 있고 검증도 통과했습니다.\n\n- **Diff 요약**: `package.json`에 `usage:today` 추가, `scripts/usage-today.mjs` 신규 추가.\n- **동작**: `MIXDOG_DATA_DIR`/기본 data dir의 `history/agent-trace.jsonl`을 읽고 오늘 0시 이후 usage를 모델별/총합으로 집계합니다.\n- **검증**: `node --check scripts/usage-today.mjs`, `npm run usage:today` 실행 완료.\n- **참고**: 기존 변경으로 보이는 `src/runtime/channels/lib/event-queue.mjs`, `output-forwarder.mjs`는 건드리지 않았습니다.",
|
|
308
|
+
"card": {
|
|
309
|
+
"session": "sess_14324_1783071816242_1783071816480_fe9b76ef49ba5d1531b76b6b3e502379",
|
|
310
|
+
"provider": "openai-oauth",
|
|
311
|
+
"model": "gpt-5.5",
|
|
312
|
+
"wall_ms": 93085,
|
|
313
|
+
"turns": 13,
|
|
314
|
+
"tool_calls": 19,
|
|
315
|
+
"tools_per_turn": 1.5,
|
|
316
|
+
"total_tool_ms": 2404,
|
|
317
|
+
"llm_stream_ms": 90731,
|
|
318
|
+
"cache_ratio": 0.8224422879475375,
|
|
319
|
+
"cached_tokens": 248320,
|
|
320
|
+
"prompt_tokens": 301930,
|
|
321
|
+
"uncached_tokens": 53610,
|
|
322
|
+
"output_tokens": 8149,
|
|
323
|
+
"cache_weighted_input_10": 78442,
|
|
324
|
+
"cache_weighted_input_25": 115690,
|
|
325
|
+
"prompt_growth": 33174,
|
|
326
|
+
"antipatterns": 1,
|
|
327
|
+
"issues": 14,
|
|
328
|
+
"issue_types": [
|
|
329
|
+
"cache",
|
|
330
|
+
"cache_break",
|
|
331
|
+
"readonly_stall",
|
|
332
|
+
"service_tier",
|
|
333
|
+
"tool_churn_cluster"
|
|
334
|
+
],
|
|
335
|
+
"read_fragmentation_paths": [],
|
|
336
|
+
"grep_sweep_count": 0
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"id": "r4-explain-compact-engine#3",
|
|
341
|
+
"agent": "explore",
|
|
342
|
+
"ok": true,
|
|
343
|
+
"ms": 64160,
|
|
344
|
+
"sessionId": "sess_51644_1783071819240_1783071819469_8122cc9a92952472385145df79f774f1",
|
|
345
|
+
"output": "sessionId: sess_51644_1783071819240_1783071819469_8122cc9a92952472385145df79f774f1\nCompaction subsystem brief:\n\n- `compact.mjs` is the public facade; it re-exports `semanticCompactMessages` and `recallFastTrackCompactMessages` from `compact/engine.mjs` (`src/runtime/agent/orchestrator/session/compact.mjs:52-55`).\n\n- Main loop caller: after draining queued messages, `loop.mjs` resolves policy, estimates tokens, and calls recall-fasttrack or semantic compaction before provider send (`src/runtime/agent/orchestrator/session/loop.mjs:324-329`, `src/runtime/agent/orchestrator/session/loop.mjs:351-364`, `src/runtime/agent/orchestrator/session/loop.mjs:414-459`).\n\n- Manager/manual caller: `runSessionCompaction()` handles manual/auto session compaction and calls recall-fasttrack first for that type, otherwise semantic (`src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:143-180`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:207-224`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:280-305`).\n\n- Auto firing policy: auto must be enabled, a boundary must exist, trigger is boundary minus configured/default buffer, and type resolves to semantic or recall-fasttrack (`src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:89-148`).\n\n- Fire condition: compaction fires on reactive overflow, unknown token estimate, or `messageTokens + reserve >= triggerTokens`; target budget is compact target plus reserve, clamped to boundary (`src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:163-175`).\n\n- Semantic entry no-ops when sanitized transcript already fits unless forced; otherwise it redacts, selects a window, summarizes head, then returns `system + summary + tail` (`src/runtime/agent/orchestrator/session/compact/engine.mjs:278-314`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:367-392`).\n\n- Semantic windowing: protected system/reminder prefix is separated, previous summary is found, summaries are removed from live history, and preserved facts are extracted from the compacted head (`src/runtime/agent/orchestrator/session/compact/engine.mjs:100-111`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:258-267`).\n\n- Semantic tail with user turns keeps up to `tailTurns` newest turns within `preserveRecentBudget`; if newest turn is too large it keeps a fitting suffix or moves the forced cut forward (`src/runtime/agent/orchestrator/session/compact/engine.mjs:134-185`, `src/runtime/agent/orchestrator/session/compact/budget.mjs:274-288`).\n\n- Semantic tail without user turns chooses non-`tool` cut points, grows newest-to-oldest while fitting, and avoids starting on orphan tool results (`src/runtime/agent/orchestrator/session/compact/engine.mjs:121-128`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:193-232`).\n\n- Recall-fasttrack preserves structured recent turns: default newest 2 turns, default 8k cap, drops oldest turns first, then truncates oversized surviving content while keeping provider-valid tool pairs (`src/runtime/agent/orchestrator/session/compact/engine.mjs:445-468`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:593-619`).\n\n- Recall-fasttrack injects memory recall/prior summary as the synthetic summary and caps recall text separately when `recallTokenCap` is provided (`src/runtime/agent/orchestrator/session/compact/engine.mjs:646-690`).\n\n- Redaction hooks in only after no-op checks and before window selection, so preserved system/tail are measured and emitted redacted; no-op returns sanitized transcript unchanged (`src/runtime/agent/orchestrator/session/compact/engine.mjs:286-314`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:622-645`).\n\n- Redactor scope is assistant `toolCalls` argument values; it preserves structure/order and redacts sensitive keys or raw `key: value` secrets (`src/runtime/agent/orchestrator/session/compact/text-utils.mjs:217-230`, `src/runtime/agent/orchestrator/session/compact/text-utils.mjs:291-326`).\n\n- Semantic failure points include missing provider, empty/no compactable live window, prompt not fitting, empty provider summary, summary not fitting, or final result over budget (`src/runtime/agent/orchestrator/session/compact/engine.mjs:278-280`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:314-337`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:371-397`).\n\n- Budget fallback raises working budget to `mandatory(system+tail)+4000` instead of failing when preserved tail alone exceeds target (`src/runtime/agent/orchestrator/session/compact/constants.mjs:33-40`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:319-331`).\n\n- Prompt/summary fallback repairs malformed semantic output, shrinks prior/facts/head prompt, and can collapse huge heads into an omitted stub (`src/runtime/agent/orchestrator/session/compact/summary.mjs:199-282`, `src/runtime/agent/orchestrator/session/compact/summary.mjs:302-312`).\n\n- Loop fallback: semantic failures try anchor-independent tool-output prune; recall-fasttrack failures do not silently prune and escalate to overflow failure (`src/runtime/agent/orchestrator/session/loop.mjs:500-537`, `src/runtime/agent/orchestrator/session/loop.mjs:546-627`).\n\n- Manager fallback: recall-fasttrack failure may retry semantic if enabled/provider exists; non-recall failures may recover with unanchored prune, otherwise record `post_turn_failed` or `manual_failed` (`src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:231-279`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:322-397`).",
|
|
346
|
+
"card": {
|
|
347
|
+
"session": "sess_51644_1783071819240_1783071819469_8122cc9a92952472385145df79f774f1",
|
|
348
|
+
"provider": "openai-oauth",
|
|
349
|
+
"model": "gpt-5.5",
|
|
350
|
+
"wall_ms": 53671,
|
|
351
|
+
"turns": 8,
|
|
352
|
+
"tool_calls": 7,
|
|
353
|
+
"tools_per_turn": 0.9,
|
|
354
|
+
"total_tool_ms": 692,
|
|
355
|
+
"llm_stream_ms": 52681,
|
|
356
|
+
"cache_ratio": 0.6923888544891641,
|
|
357
|
+
"cached_tokens": 139776,
|
|
358
|
+
"prompt_tokens": 201875,
|
|
359
|
+
"uncached_tokens": 62099,
|
|
360
|
+
"output_tokens": 3818,
|
|
361
|
+
"cache_weighted_input_10": 76076.6,
|
|
362
|
+
"cache_weighted_input_25": 97043,
|
|
363
|
+
"prompt_growth": 50805,
|
|
364
|
+
"antipatterns": 1,
|
|
365
|
+
"issues": 14,
|
|
366
|
+
"issue_types": [
|
|
367
|
+
"cache",
|
|
368
|
+
"cache_break",
|
|
369
|
+
"broad_tool_result",
|
|
370
|
+
"service_tier",
|
|
371
|
+
"missed_parallelism",
|
|
372
|
+
"tool_churn_cluster"
|
|
373
|
+
],
|
|
374
|
+
"read_fragmentation_paths": [],
|
|
375
|
+
"grep_sweep_count": 0
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"id": "r4-debug-forwarding-gap#4",
|
|
380
|
+
"agent": "reviewer",
|
|
381
|
+
"ok": true,
|
|
382
|
+
"ms": 153621,
|
|
383
|
+
"sessionId": "sess_45940_1783071822232_1783071822453_4605b8338cff9ad5fb6f9e2d1424bc62",
|
|
384
|
+
"output": "sessionId: sess_45940_1783071822232_1783071822453_4605b8338cff9ad5fb6f9e2d1424bc62\nBridge activation is visible before forwarding is ready: `start()` sets `channelBridgeActive` and writes `bridge-state.json` before ownership refresh, backend connect, transcript bind, and watcher catch-up complete (`src/runtime/channels/index.mjs:1734`).\n\n**Findings by impact**\n\n1. **Silent drop: existing transcript bound at EOF** — if activation discovers an already-existing transcript but persisted cursor is missing/different, `setContext()` starts at `currentSize`, so assistant bytes already written before bind are skipped; backlog catch-up does **not** recover them (`index.mjs:625`, `index.mjs:441`, `lib/output-forwarder.mjs:117`).\n\n2. **Wrong/stale transcript on first inbound** — the first inbound can reuse a stale binding while the self session record is not yet published; the 500ms steal poll mitigates this, but if it misses, the real transcript is not watched; catch-up is **conditional** on a later rebind that does not reset to EOF (`index.mjs:1491`, `index.mjs:1571`, `index.mjs:1597`).\n\n3. **Missing transcript file / `fs.watch` gap** — `startWatch()` cannot watch a non-existent transcript and closes silently; the re-arm poll installs the watch and calls `forwardNewText()` when the file appears, so backlog is recovered **if** creation occurs within the re-arm path or a later trigger fires (`index.mjs:340`, `index.mjs:486`, `index.mjs:803`, `lib/output-forwarder.mjs:647`).\n\n4. **Ownership/connect gate delay** — before `bridgeRuntimeConnected` is true and ownership probes pass, `forwardNewText()` returns without reading, so output is delayed but not consumed; post-connect catch-up normally recovers it (`index.mjs:316`, `index.mjs:776`, `index.mjs:809`, `lib/output-forwarder.mjs:351`).\n\n5. **Watch debounce/stat race** — bytes written between `setContext()` stat and watch install are covered by the immediate scheduled flush; backlog catch-up recovers this, with only debounce delay (`lib/output-forwarder.mjs:665`, `lib/output-forwarder.mjs:703`).\n\nVerdict: activation is not fully lossless—owner and missing-file windows are mostly recoverable delays, but existing-transcript binding can silently skip pre-bind assistant output.",
|
|
385
|
+
"card": {
|
|
386
|
+
"session": "sess_45940_1783071822232_1783071822453_4605b8338cff9ad5fb6f9e2d1424bc62",
|
|
387
|
+
"provider": "openai-oauth",
|
|
388
|
+
"model": "gpt-5.5",
|
|
389
|
+
"wall_ms": 143145,
|
|
390
|
+
"turns": 7,
|
|
391
|
+
"tool_calls": 9,
|
|
392
|
+
"tools_per_turn": 1.3,
|
|
393
|
+
"total_tool_ms": 832,
|
|
394
|
+
"llm_stream_ms": 142197,
|
|
395
|
+
"cache_ratio": 0.754607928700648,
|
|
396
|
+
"cached_tokens": 130560,
|
|
397
|
+
"prompt_tokens": 173017,
|
|
398
|
+
"uncached_tokens": 42457,
|
|
399
|
+
"output_tokens": 15109,
|
|
400
|
+
"cache_weighted_input_10": 55513,
|
|
401
|
+
"cache_weighted_input_25": 75097,
|
|
402
|
+
"prompt_growth": 29492,
|
|
403
|
+
"antipatterns": 0,
|
|
404
|
+
"issues": 9,
|
|
405
|
+
"issue_types": [
|
|
406
|
+
"cache",
|
|
407
|
+
"cache_break",
|
|
408
|
+
"service_tier"
|
|
409
|
+
],
|
|
410
|
+
"read_fragmentation_paths": [],
|
|
411
|
+
"grep_sweep_count": 0
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"id": "r4-impl-usage-summary#4",
|
|
416
|
+
"agent": "worker",
|
|
417
|
+
"ok": true,
|
|
418
|
+
"ms": 60375,
|
|
419
|
+
"sessionId": "sess_43448_1783071848279_1783071848513_42ed6b818b66c016f007797b9f122702",
|
|
420
|
+
"output": "sessionId: sess_43448_1783071848279_1783071848513_42ed6b818b66c016f007797b9f122702\n요청 범위가 작고 구현 승인이 포함되어 있어 바로 반영하겠습니다.구현 대상은 이미 워킹트리에 반영된 상태라, 충돌 없이 검증만 진행하겠습니다.검증은 통과했고 실행 결과도 정상 출력되었습니다. diff 요약을 확인하겠습니다.완료했습니다. `usage:today` 스크립트와 `scripts/usage-today.mjs`가 워킹트리에 반영되어 있습니다.\n\n- **Diff 요약**: `package.json`에 `usage:today` 추가, 새 스크립트가 오늘 자정 이후 usage를 모델별/총합으로 집계합니다.\n\n- **검증**: `node --check scripts/usage-today.mjs` 통과, `npm run usage:today` 정상 실행.\n\n- **참고**: 기존 워킹트리에 `src/runtime/channels/lib/*` 수정이 있었고, 이번 범위에서는 건드리지 않았습니다.",
|
|
421
|
+
"card": {
|
|
422
|
+
"session": "sess_43448_1783071848279_1783071848513_42ed6b818b66c016f007797b9f122702",
|
|
423
|
+
"provider": "openai-oauth",
|
|
424
|
+
"model": "gpt-5.5",
|
|
425
|
+
"wall_ms": 49861,
|
|
426
|
+
"turns": 9,
|
|
427
|
+
"tool_calls": 8,
|
|
428
|
+
"tools_per_turn": 0.9,
|
|
429
|
+
"total_tool_ms": 2380,
|
|
430
|
+
"llm_stream_ms": 47157,
|
|
431
|
+
"cache_ratio": 0.8220209079483621,
|
|
432
|
+
"cached_tokens": 113152,
|
|
433
|
+
"prompt_tokens": 137651,
|
|
434
|
+
"uncached_tokens": 24499,
|
|
435
|
+
"output_tokens": 3615,
|
|
436
|
+
"cache_weighted_input_10": 35814.2,
|
|
437
|
+
"cache_weighted_input_25": 52787,
|
|
438
|
+
"prompt_growth": 10636,
|
|
439
|
+
"antipatterns": 1,
|
|
440
|
+
"issues": 13,
|
|
441
|
+
"issue_types": [
|
|
442
|
+
"cache",
|
|
443
|
+
"cache_break",
|
|
444
|
+
"service_tier",
|
|
445
|
+
"missed_parallelism",
|
|
446
|
+
"tool_churn_cluster"
|
|
447
|
+
],
|
|
448
|
+
"read_fragmentation_paths": [],
|
|
449
|
+
"grep_sweep_count": 0
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"id": "r4-explain-compact-engine#4",
|
|
454
|
+
"agent": "explore",
|
|
455
|
+
"ok": true,
|
|
456
|
+
"ms": 62277,
|
|
457
|
+
"sessionId": "sess_50916_1783071848974_1783071849207_bcf3defcfec3fb5606fe8a9ac6d2f118",
|
|
458
|
+
"output": "sessionId: sess_50916_1783071848974_1783071849207_bcf3defcfec3fb5606fe8a9ac6d2f118\n- **Entry points/callers:** `compact.mjs` re-exports `semanticCompactMessages` and `recallFastTrackCompactMessages` from `engine.mjs`; auto turns call them via `loop.mjs`, manual `/compact` via `compactSessionMessages`, and auto-clear via `runSessionCompaction`. `src/runtime/agent/orchestrator/session/compact.mjs:52`, `src/runtime/agent/orchestrator/session/loop.mjs:414`, `src/runtime/agent/orchestrator/session/loop.mjs:441`, `src/runtime/agent/orchestrator/session/manager.mjs:1849`, `src/runtime/agent/orchestrator/session/manager.mjs:1950`\n\n- **Fire decision:** pre-send auto compaction builds a policy, estimates transcript tokens, and fires when reactive overflow is pending or pressure reaches `triggerTokens`; otherwise it records only a pre-send check. `src/runtime/agent/orchestrator/session/loop.mjs:329`, `src/runtime/agent/orchestrator/session/loop.mjs:351`, `src/runtime/agent/orchestrator/session/loop.mjs:353`, `src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:170`\n\n- **Policy shape:** auto is disabled by config/env, boundary comes from context/boundary/auto-limit, trigger is explicit sub-boundary or boundary minus buffer, and target budget is capped to a small context share plus reserve. `src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:89`, `src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:92`, `src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:97`, `src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:117`, `src/runtime/agent/orchestrator/session/loop/compact-policy.mjs:163`\n\n- **Manual/session compaction:** `runSessionCompaction` forces manual mode, skips auto when disabled, exits below threshold unless forced, then chooses `recall-fasttrack` or `semantic`. `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:143`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:146`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:147`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:176`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:207`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:280`\n\n- **Semantic flow:** sanitize/tool-pair repair first, no-op if already within budget unless forced, redact before windowing, summarize head with provider, then emit `system + summary + tail`. `src/runtime/agent/orchestrator/session/compact/engine.mjs:284`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:289`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:312`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:314`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:367`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:392`\n\n- **Semantic tail:** live context is split from protected/system context and prior summary, then recent tail keeps user-anchored turns when possible or non-tool cutpoints when there is no user turn; tool-pair repair runs after the cut. `src/runtime/agent/orchestrator/session/compact/engine.mjs:100`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:235`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:240`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:250`\n\n- **Recall-fasttrack flow:** recall path ingests/dumps memory roots, optionally drains cycle1, caps recall injection to context share, then builds `system + recall summary + preserved structured tail`. `src/runtime/agent/orchestrator/session/loop/recall-fasttrack.mjs:61`, `src/runtime/agent/orchestrator/session/loop/recall-fasttrack.mjs:84`, `src/runtime/agent/orchestrator/session/loop/recall-fasttrack.mjs:103`, `src/runtime/agent/orchestrator/session/loop/recall-fasttrack.mjs:157`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:684`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:695`\n\n- **Recall tail:** recall preserves newest user-bounded turns, drops oldest turns until under cap, truncates the last surviving turn if needed, and allows no-user assistant/tool tails. `src/runtime/agent/orchestrator/session/compact/engine.mjs:593`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:601`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:602`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:610`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:613`\n\n- **Redaction hook:** preserved-tail/tool-call secret redaction happens only after no-op checks and before selection, using shape-preserving tool-call argument scrubbing; prompt-side summaries separately normalize/redact tool args. `src/runtime/agent/orchestrator/session/compact/engine.mjs:306`, `src/runtime/agent/orchestrator/session/compact/text-utils.mjs:219`, `src/runtime/agent/orchestrator/session/compact/text-utils.mjs:261`, `src/runtime/agent/orchestrator/session/compact/text-utils.mjs:319`, `src/runtime/agent/orchestrator/session/compact/summary.mjs:85`\n\n- **Fallbacks/failures:** semantic/recall raise on empty input, no compactable prior history, prompt/summary fit failure, provider empty response, or final budget overflow. `src/runtime/agent/orchestrator/session/compact/engine.mjs:255`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:316`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:336`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:372`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:386`, `src/runtime/agent/orchestrator/session/compact/engine.mjs:396`\n\n- **Recovery paths:** loop semantic failures may fall back to unanchored tool-output prune, recall failures do not; manual/session recall failures may degrade to semantic, then non-recall failures may prune, else compaction records failed state. `src/runtime/agent/orchestrator/session/loop.mjs:501`, `src/runtime/agent/orchestrator/session/loop.mjs:517`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:237`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:327`, `src/runtime/agent/orchestrator/session/manager/compaction-runner.mjs:348`",
|
|
459
|
+
"card": {
|
|
460
|
+
"session": "sess_50916_1783071848974_1783071849207_bcf3defcfec3fb5606fe8a9ac6d2f118",
|
|
461
|
+
"provider": "openai-oauth",
|
|
462
|
+
"model": "gpt-5.5",
|
|
463
|
+
"wall_ms": 51778,
|
|
464
|
+
"turns": 6,
|
|
465
|
+
"tool_calls": 5,
|
|
466
|
+
"tools_per_turn": 0.8,
|
|
467
|
+
"total_tool_ms": 711,
|
|
468
|
+
"llm_stream_ms": 50900,
|
|
469
|
+
"cache_ratio": 0.5558031859338635,
|
|
470
|
+
"cached_tokens": 67584,
|
|
471
|
+
"prompt_tokens": 121597,
|
|
472
|
+
"uncached_tokens": 54013,
|
|
473
|
+
"output_tokens": 3985,
|
|
474
|
+
"cache_weighted_input_10": 60771.4,
|
|
475
|
+
"cache_weighted_input_25": 70909,
|
|
476
|
+
"prompt_growth": 43153,
|
|
477
|
+
"antipatterns": 1,
|
|
478
|
+
"issues": 12,
|
|
479
|
+
"issue_types": [
|
|
480
|
+
"cache",
|
|
481
|
+
"cache_break",
|
|
482
|
+
"broad_tool_result",
|
|
483
|
+
"service_tier",
|
|
484
|
+
"missed_parallelism",
|
|
485
|
+
"tool_churn_cluster"
|
|
486
|
+
],
|
|
487
|
+
"read_fragmentation_paths": [],
|
|
488
|
+
"grep_sweep_count": 0
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
],
|
|
492
|
+
"task_complete": true,
|
|
493
|
+
"task_errors": [],
|
|
494
|
+
"score_complete": true,
|
|
495
|
+
"score_errors": [],
|
|
496
|
+
"group": {
|
|
497
|
+
"n": 12,
|
|
498
|
+
"wall_ms": 69490.8,
|
|
499
|
+
"turns": 7.8,
|
|
500
|
+
"tool_calls": 9.2,
|
|
501
|
+
"tools_per_turn": 1.2,
|
|
502
|
+
"total_tool_ms": 1274.6,
|
|
503
|
+
"llm_stream_ms": 67990.6,
|
|
504
|
+
"cache_ratio": 0.7,
|
|
505
|
+
"cached_tokens": 129749.3,
|
|
506
|
+
"prompt_tokens": 177951.7,
|
|
507
|
+
"uncached_tokens": 48202.3,
|
|
508
|
+
"output_tokens": 6089.6,
|
|
509
|
+
"cache_weighted_input_10": 61177.3,
|
|
510
|
+
"cache_weighted_input_25": 80639.7,
|
|
511
|
+
"prompt_growth": 32498.1,
|
|
512
|
+
"antipatterns": 0.8,
|
|
513
|
+
"issues": 12.2,
|
|
514
|
+
"grep_sweep_count": 0
|
|
515
|
+
},
|
|
516
|
+
"cards": [
|
|
517
|
+
{
|
|
518
|
+
"session": "sess_57728_1783071795209_1783071795448_71fa5e61e6ecb475570364df123b303f",
|
|
519
|
+
"provider": "openai-oauth",
|
|
520
|
+
"model": "gpt-5.5",
|
|
521
|
+
"wall_ms": 58666,
|
|
522
|
+
"turns": 6,
|
|
523
|
+
"tool_calls": 7,
|
|
524
|
+
"tools_per_turn": 1.2,
|
|
525
|
+
"total_tool_ms": 990,
|
|
526
|
+
"llm_stream_ms": 57685,
|
|
527
|
+
"cache_ratio": 0.6365751512331317,
|
|
528
|
+
"cached_tokens": 87552,
|
|
529
|
+
"prompt_tokens": 137536,
|
|
530
|
+
"uncached_tokens": 49984,
|
|
531
|
+
"output_tokens": 5282,
|
|
532
|
+
"cache_weighted_input_10": 58739.2,
|
|
533
|
+
"cache_weighted_input_25": 71872,
|
|
534
|
+
"prompt_growth": 29460,
|
|
535
|
+
"antipatterns": 1,
|
|
536
|
+
"issues": 11,
|
|
537
|
+
"issue_types": [
|
|
538
|
+
"cache",
|
|
539
|
+
"cache_break",
|
|
540
|
+
"cache_miss",
|
|
541
|
+
"broad_tool_result",
|
|
542
|
+
"service_tier",
|
|
543
|
+
"tool_churn_cluster"
|
|
544
|
+
],
|
|
545
|
+
"read_fragmentation_paths": [],
|
|
546
|
+
"grep_sweep_count": 0
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"session": "sess_51156_1783071798234_1783071798464_c166c30d76fae5a4ded44c6229496e24",
|
|
550
|
+
"provider": "openai-oauth",
|
|
551
|
+
"model": "gpt-5.5",
|
|
552
|
+
"wall_ms": 40249,
|
|
553
|
+
"turns": 7,
|
|
554
|
+
"tool_calls": 9,
|
|
555
|
+
"tools_per_turn": 1.3,
|
|
556
|
+
"total_tool_ms": 2252,
|
|
557
|
+
"llm_stream_ms": 37749,
|
|
558
|
+
"cache_ratio": 0.7021675140487021,
|
|
559
|
+
"cached_tokens": 62976,
|
|
560
|
+
"prompt_tokens": 89688,
|
|
561
|
+
"uncached_tokens": 26712,
|
|
562
|
+
"output_tokens": 3514,
|
|
563
|
+
"cache_weighted_input_10": 33009.6,
|
|
564
|
+
"cache_weighted_input_25": 42456,
|
|
565
|
+
"prompt_growth": 10977,
|
|
566
|
+
"antipatterns": 0,
|
|
567
|
+
"issues": 10,
|
|
568
|
+
"issue_types": [
|
|
569
|
+
"cache",
|
|
570
|
+
"cache_break",
|
|
571
|
+
"tool_error",
|
|
572
|
+
"service_tier"
|
|
573
|
+
],
|
|
574
|
+
"read_fragmentation_paths": [],
|
|
575
|
+
"grep_sweep_count": 0
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"session": "sess_59984_1783071801251_1783071801508_823ab26c20fd578146024f68d1733f23",
|
|
579
|
+
"provider": "openai-oauth",
|
|
580
|
+
"model": "gpt-5.5",
|
|
581
|
+
"wall_ms": 66286,
|
|
582
|
+
"turns": 9,
|
|
583
|
+
"tool_calls": 14,
|
|
584
|
+
"tools_per_turn": 1.6,
|
|
585
|
+
"total_tool_ms": 764,
|
|
586
|
+
"llm_stream_ms": 65047,
|
|
587
|
+
"cache_ratio": 0.6644304897227508,
|
|
588
|
+
"cached_tokens": 181248,
|
|
589
|
+
"prompt_tokens": 272787,
|
|
590
|
+
"uncached_tokens": 91539,
|
|
591
|
+
"output_tokens": 5104,
|
|
592
|
+
"cache_weighted_input_10": 109663.8,
|
|
593
|
+
"cache_weighted_input_25": 136851,
|
|
594
|
+
"prompt_growth": 68411,
|
|
595
|
+
"antipatterns": 1,
|
|
596
|
+
"issues": 17,
|
|
597
|
+
"issue_types": [
|
|
598
|
+
"cache",
|
|
599
|
+
"cache_break",
|
|
600
|
+
"cache_miss",
|
|
601
|
+
"readonly_stall",
|
|
602
|
+
"broad_tool_result",
|
|
603
|
+
"service_tier",
|
|
604
|
+
"tool_churn_cluster"
|
|
605
|
+
],
|
|
606
|
+
"read_fragmentation_paths": [],
|
|
607
|
+
"grep_sweep_count": 0
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"session": "sess_19992_1783071804242_1783071804475_3ef8d44b03c6f45b4f7121dd497302c5",
|
|
611
|
+
"provider": "openai-oauth",
|
|
612
|
+
"model": "gpt-5.5",
|
|
613
|
+
"wall_ms": 101993,
|
|
614
|
+
"turns": 9,
|
|
615
|
+
"tool_calls": 8,
|
|
616
|
+
"tools_per_turn": 0.9,
|
|
617
|
+
"total_tool_ms": 626,
|
|
618
|
+
"llm_stream_ms": 101048,
|
|
619
|
+
"cache_ratio": 0.8043708488508287,
|
|
620
|
+
"cached_tokens": 229376,
|
|
621
|
+
"prompt_tokens": 285162,
|
|
622
|
+
"uncached_tokens": 55786,
|
|
623
|
+
"output_tokens": 10026,
|
|
624
|
+
"cache_weighted_input_10": 78723.6,
|
|
625
|
+
"cache_weighted_input_25": 113130,
|
|
626
|
+
"prompt_growth": 34118,
|
|
627
|
+
"antipatterns": 2,
|
|
628
|
+
"issues": 16,
|
|
629
|
+
"issue_types": [
|
|
630
|
+
"cache",
|
|
631
|
+
"cache_break",
|
|
632
|
+
"cache_miss",
|
|
633
|
+
"readonly_stall",
|
|
634
|
+
"broad_tool_result",
|
|
635
|
+
"service_tier",
|
|
636
|
+
"missed_parallelism",
|
|
637
|
+
"tool_churn_cluster"
|
|
638
|
+
],
|
|
639
|
+
"read_fragmentation_paths": [],
|
|
640
|
+
"grep_sweep_count": 0
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"session": "sess_28856_1783071807239_1783071807472_9662a783985ea41e8cda524d1e8343c8",
|
|
644
|
+
"provider": "openai-oauth",
|
|
645
|
+
"model": "gpt-5.5",
|
|
646
|
+
"wall_ms": 30543,
|
|
647
|
+
"turns": 4,
|
|
648
|
+
"tool_calls": 5,
|
|
649
|
+
"tools_per_turn": 1.3,
|
|
650
|
+
"total_tool_ms": 1540,
|
|
651
|
+
"llm_stream_ms": 28658,
|
|
652
|
+
"cache_ratio": 0.566224303929222,
|
|
653
|
+
"cached_tokens": 26112,
|
|
654
|
+
"prompt_tokens": 46116,
|
|
655
|
+
"uncached_tokens": 20004,
|
|
656
|
+
"output_tokens": 2462,
|
|
657
|
+
"cache_weighted_input_10": 22615.2,
|
|
658
|
+
"cache_weighted_input_25": 26532,
|
|
659
|
+
"prompt_growth": 5587,
|
|
660
|
+
"antipatterns": 0,
|
|
661
|
+
"issues": 6,
|
|
662
|
+
"issue_types": [
|
|
663
|
+
"cache",
|
|
664
|
+
"cache_break",
|
|
665
|
+
"service_tier"
|
|
666
|
+
],
|
|
667
|
+
"read_fragmentation_paths": [],
|
|
668
|
+
"grep_sweep_count": 0
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"session": "sess_46952_1783071810232_1783071810466_f731a885e41218866e9fa5779b5419cc",
|
|
672
|
+
"provider": "openai-oauth",
|
|
673
|
+
"model": "gpt-5.5",
|
|
674
|
+
"wall_ms": 74868,
|
|
675
|
+
"turns": 9,
|
|
676
|
+
"tool_calls": 13,
|
|
677
|
+
"tools_per_turn": 1.4,
|
|
678
|
+
"total_tool_ms": 1507,
|
|
679
|
+
"llm_stream_ms": 73186,
|
|
680
|
+
"cache_ratio": 0.7317301744981538,
|
|
681
|
+
"cached_tokens": 156160,
|
|
682
|
+
"prompt_tokens": 213412,
|
|
683
|
+
"uncached_tokens": 57252,
|
|
684
|
+
"output_tokens": 4844,
|
|
685
|
+
"cache_weighted_input_10": 72868,
|
|
686
|
+
"cache_weighted_input_25": 96292,
|
|
687
|
+
"prompt_growth": 44849,
|
|
688
|
+
"antipatterns": 1,
|
|
689
|
+
"issues": 13,
|
|
690
|
+
"issue_types": [
|
|
691
|
+
"cache",
|
|
692
|
+
"cache_break",
|
|
693
|
+
"readonly_stall",
|
|
694
|
+
"service_tier",
|
|
695
|
+
"tool_churn_cluster"
|
|
696
|
+
],
|
|
697
|
+
"read_fragmentation_paths": [],
|
|
698
|
+
"grep_sweep_count": 0
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"session": "sess_37472_1783071813242_1783071813487_2043b6b30432bce173056c74f698e430",
|
|
702
|
+
"provider": "openai-oauth",
|
|
703
|
+
"model": "gpt-5.5",
|
|
704
|
+
"wall_ms": 69745,
|
|
705
|
+
"turns": 6,
|
|
706
|
+
"tool_calls": 6,
|
|
707
|
+
"tools_per_turn": 1,
|
|
708
|
+
"total_tool_ms": 597,
|
|
709
|
+
"llm_stream_ms": 68848,
|
|
710
|
+
"cache_ratio": 0.7382912272306966,
|
|
711
|
+
"cached_tokens": 114176,
|
|
712
|
+
"prompt_tokens": 154649,
|
|
713
|
+
"uncached_tokens": 40473,
|
|
714
|
+
"output_tokens": 7167,
|
|
715
|
+
"cache_weighted_input_10": 51890.6,
|
|
716
|
+
"cache_weighted_input_25": 69017,
|
|
717
|
+
"prompt_growth": 29315,
|
|
718
|
+
"antipatterns": 1,
|
|
719
|
+
"issues": 11,
|
|
720
|
+
"issue_types": [
|
|
721
|
+
"cache",
|
|
722
|
+
"cache_break",
|
|
723
|
+
"broad_tool_result",
|
|
724
|
+
"service_tier",
|
|
725
|
+
"missed_parallelism",
|
|
726
|
+
"tool_churn_cluster"
|
|
727
|
+
],
|
|
728
|
+
"read_fragmentation_paths": [],
|
|
729
|
+
"grep_sweep_count": 0
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
"session": "sess_14324_1783071816242_1783071816480_fe9b76ef49ba5d1531b76b6b3e502379",
|
|
733
|
+
"provider": "openai-oauth",
|
|
734
|
+
"model": "gpt-5.5",
|
|
735
|
+
"wall_ms": 93085,
|
|
736
|
+
"turns": 13,
|
|
737
|
+
"tool_calls": 19,
|
|
738
|
+
"tools_per_turn": 1.5,
|
|
739
|
+
"total_tool_ms": 2404,
|
|
740
|
+
"llm_stream_ms": 90731,
|
|
741
|
+
"cache_ratio": 0.8224422879475375,
|
|
742
|
+
"cached_tokens": 248320,
|
|
743
|
+
"prompt_tokens": 301930,
|
|
744
|
+
"uncached_tokens": 53610,
|
|
745
|
+
"output_tokens": 8149,
|
|
746
|
+
"cache_weighted_input_10": 78442,
|
|
747
|
+
"cache_weighted_input_25": 115690,
|
|
748
|
+
"prompt_growth": 33174,
|
|
749
|
+
"antipatterns": 1,
|
|
750
|
+
"issues": 14,
|
|
751
|
+
"issue_types": [
|
|
752
|
+
"cache",
|
|
753
|
+
"cache_break",
|
|
754
|
+
"readonly_stall",
|
|
755
|
+
"service_tier",
|
|
756
|
+
"tool_churn_cluster"
|
|
757
|
+
],
|
|
758
|
+
"read_fragmentation_paths": [],
|
|
759
|
+
"grep_sweep_count": 0
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"session": "sess_51644_1783071819240_1783071819469_8122cc9a92952472385145df79f774f1",
|
|
763
|
+
"provider": "openai-oauth",
|
|
764
|
+
"model": "gpt-5.5",
|
|
765
|
+
"wall_ms": 53671,
|
|
766
|
+
"turns": 8,
|
|
767
|
+
"tool_calls": 7,
|
|
768
|
+
"tools_per_turn": 0.9,
|
|
769
|
+
"total_tool_ms": 692,
|
|
770
|
+
"llm_stream_ms": 52681,
|
|
771
|
+
"cache_ratio": 0.6923888544891641,
|
|
772
|
+
"cached_tokens": 139776,
|
|
773
|
+
"prompt_tokens": 201875,
|
|
774
|
+
"uncached_tokens": 62099,
|
|
775
|
+
"output_tokens": 3818,
|
|
776
|
+
"cache_weighted_input_10": 76076.6,
|
|
777
|
+
"cache_weighted_input_25": 97043,
|
|
778
|
+
"prompt_growth": 50805,
|
|
779
|
+
"antipatterns": 1,
|
|
780
|
+
"issues": 14,
|
|
781
|
+
"issue_types": [
|
|
782
|
+
"cache",
|
|
783
|
+
"cache_break",
|
|
784
|
+
"broad_tool_result",
|
|
785
|
+
"service_tier",
|
|
786
|
+
"missed_parallelism",
|
|
787
|
+
"tool_churn_cluster"
|
|
788
|
+
],
|
|
789
|
+
"read_fragmentation_paths": [],
|
|
790
|
+
"grep_sweep_count": 0
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
"session": "sess_45940_1783071822232_1783071822453_4605b8338cff9ad5fb6f9e2d1424bc62",
|
|
794
|
+
"provider": "openai-oauth",
|
|
795
|
+
"model": "gpt-5.5",
|
|
796
|
+
"wall_ms": 143145,
|
|
797
|
+
"turns": 7,
|
|
798
|
+
"tool_calls": 9,
|
|
799
|
+
"tools_per_turn": 1.3,
|
|
800
|
+
"total_tool_ms": 832,
|
|
801
|
+
"llm_stream_ms": 142197,
|
|
802
|
+
"cache_ratio": 0.754607928700648,
|
|
803
|
+
"cached_tokens": 130560,
|
|
804
|
+
"prompt_tokens": 173017,
|
|
805
|
+
"uncached_tokens": 42457,
|
|
806
|
+
"output_tokens": 15109,
|
|
807
|
+
"cache_weighted_input_10": 55513,
|
|
808
|
+
"cache_weighted_input_25": 75097,
|
|
809
|
+
"prompt_growth": 29492,
|
|
810
|
+
"antipatterns": 0,
|
|
811
|
+
"issues": 9,
|
|
812
|
+
"issue_types": [
|
|
813
|
+
"cache",
|
|
814
|
+
"cache_break",
|
|
815
|
+
"service_tier"
|
|
816
|
+
],
|
|
817
|
+
"read_fragmentation_paths": [],
|
|
818
|
+
"grep_sweep_count": 0
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"session": "sess_43448_1783071848279_1783071848513_42ed6b818b66c016f007797b9f122702",
|
|
822
|
+
"provider": "openai-oauth",
|
|
823
|
+
"model": "gpt-5.5",
|
|
824
|
+
"wall_ms": 49861,
|
|
825
|
+
"turns": 9,
|
|
826
|
+
"tool_calls": 8,
|
|
827
|
+
"tools_per_turn": 0.9,
|
|
828
|
+
"total_tool_ms": 2380,
|
|
829
|
+
"llm_stream_ms": 47157,
|
|
830
|
+
"cache_ratio": 0.8220209079483621,
|
|
831
|
+
"cached_tokens": 113152,
|
|
832
|
+
"prompt_tokens": 137651,
|
|
833
|
+
"uncached_tokens": 24499,
|
|
834
|
+
"output_tokens": 3615,
|
|
835
|
+
"cache_weighted_input_10": 35814.2,
|
|
836
|
+
"cache_weighted_input_25": 52787,
|
|
837
|
+
"prompt_growth": 10636,
|
|
838
|
+
"antipatterns": 1,
|
|
839
|
+
"issues": 13,
|
|
840
|
+
"issue_types": [
|
|
841
|
+
"cache",
|
|
842
|
+
"cache_break",
|
|
843
|
+
"service_tier",
|
|
844
|
+
"missed_parallelism",
|
|
845
|
+
"tool_churn_cluster"
|
|
846
|
+
],
|
|
847
|
+
"read_fragmentation_paths": [],
|
|
848
|
+
"grep_sweep_count": 0
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"session": "sess_50916_1783071848974_1783071849207_bcf3defcfec3fb5606fe8a9ac6d2f118",
|
|
852
|
+
"provider": "openai-oauth",
|
|
853
|
+
"model": "gpt-5.5",
|
|
854
|
+
"wall_ms": 51778,
|
|
855
|
+
"turns": 6,
|
|
856
|
+
"tool_calls": 5,
|
|
857
|
+
"tools_per_turn": 0.8,
|
|
858
|
+
"total_tool_ms": 711,
|
|
859
|
+
"llm_stream_ms": 50900,
|
|
860
|
+
"cache_ratio": 0.5558031859338635,
|
|
861
|
+
"cached_tokens": 67584,
|
|
862
|
+
"prompt_tokens": 121597,
|
|
863
|
+
"uncached_tokens": 54013,
|
|
864
|
+
"output_tokens": 3985,
|
|
865
|
+
"cache_weighted_input_10": 60771.4,
|
|
866
|
+
"cache_weighted_input_25": 70909,
|
|
867
|
+
"prompt_growth": 43153,
|
|
868
|
+
"antipatterns": 1,
|
|
869
|
+
"issues": 12,
|
|
870
|
+
"issue_types": [
|
|
871
|
+
"cache",
|
|
872
|
+
"cache_break",
|
|
873
|
+
"broad_tool_result",
|
|
874
|
+
"service_tier",
|
|
875
|
+
"missed_parallelism",
|
|
876
|
+
"tool_churn_cluster"
|
|
877
|
+
],
|
|
878
|
+
"read_fragmentation_paths": [],
|
|
879
|
+
"grep_sweep_count": 0
|
|
880
|
+
}
|
|
881
|
+
]
|
|
882
|
+
}
|