bots-garden/mini-mepublic Fork
⑂ 483fde8
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

🛟 Updated.

k33g committed 2026-09-30T13:38:53+02:00 Browse files
483fde8 parent: cb42032
added .tickets/issues/0056-blog-post-idea-how-to-query-a-decision-model-fro.yaml +13 -0
new file mode 100644
@@ -0,0 +1,13 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 56
3+title: "Blog post idea: how to query a decision model from a coding agent (skill?)"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-09-30T06:50:30.091Z
9+updatedAt: 2026-09-30T06:50:30.091Z
10+labels: []
11+body: ""
12+tasks: []
13+comments: []
new file mode 100644
@@ -0,0 +1,13 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 56
3+title: "Blog post idea: how to query a decision model from a coding agent (skill?)"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-09-30T06:50:30.091Z
9+updatedAt: 2026-09-30T06:50:30.091Z
10+labels: []
11+body: ""
12+tasks: []
13+comments: []
added .tickets/issues/0057-watchdog-kills-the-turn-while-a-tool-runs.yaml +110 -0
new file mode 100644
@@ -0,0 +1,110 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 57
3+title: Watchdog kills the turn while a tool runs or a permission is pending
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-09-30T11:38:05.000Z
9+updatedAt: 2026-09-30T11:38:05.000Z
10+labels:
11+ - kind::bug
12+ - priority::medium
13+related:
14+ - 53
15+body: |
16+ Symptom: "Error: Internal error: generation timed out (stalled)" in an
17+ editor (ACP), after a write_file whose permission dialog stayed open; the
18+ session records "[write_file rejected by the user]" although the user
19+ rejected nothing (session 20260930-072059-d23b9ad5, Gemma 4 26B on DMR).
20+
21+ Cause: the watchdog (internal/engine/progress.go) keeps counting while a
22+ tool runs. Tools get the watchdog's context (genCtx) and nothing pauses it
23+ in WrapTool, so anything longer than watchdogTimeout kills the turn:
24+ - a permission dialog answered slowly (ACP and window mode);
25+ - a legitimately long tool: bash's budget is 30 s, the default
26+ watchdogTimeout is 20 s (30 s in agent.dmr.yaml).
27+
28+ Reproduced 2026-09-30 with a fake OpenAI server + scripted ACP client,
29+ watchdogTimeout 3s: permission answered after 1 s -> OK; after 6 s -> the
30+ exact error, file not written; bash "sleep 6" -> same. Identical on the
31+ v0.2.3 and v0.2.4 binaries: not a regression of 0.2.4 (ticket 53 does not
32+ touch this path).
33+
34+ Workaround: raise watchdogTimeout in the config, or choose "Allow <tool>
35+ for this session".
36+
37+ Do NOT simply pause the watchdog during tools: today it is the only bound
38+ for lsp requests (tool ctx, no timeout of their own) and stdio MCP calls
39+ (unbounded unless the server has a timeout in the config). Own bounds:
40+ bash 30 s + 2 s WaitDelay, fetch_content 30 s, MCP over HTTP 30 s.
41+ The model <-> tools loop is bounded by maxTurns and the loop detector, not
42+ by the watchdog, so no endless-loop risk from this change.
43+
44+ Proposed design:
45+ 1. While a tool runs, replace the watchdog by a tool budget: new config key
46+ toolTimeout (default ~2 min), applied in WrapTool on a context that is a
47+ child of the TURN's context (Stop still cancels) but not of the watchdog.
48+ A tool over budget answers the model with a text error, like bash's
49+ "[error: … timeout exceeded]"; the turn goes on.
50+ 2. Do not count the permission wait (user's thinking time) in either
51+ budget. Optional: a very large cap (e.g. 30 min) for an editor that
52+ never answers.
53+ 3. When the tool returns, re-arm the watchdog with pl.expect() (the next
54+ model call gets firstTokenTimeout).
55+tasks:
56+ - id: 1
57+ title: "Failing test first: a tool that sleeps longer than watchdogTimeout must not stall the turn"
58+ state: open
59+ priority: none
60+ author:
61+ name: k33g
62+ email: ph.charriere@gmail.com
63+ createdAt: 2026-09-30T11:38:05.000Z
64+ updatedAt: 2026-09-30T11:38:05.000Z
65+ - id: 2
66+ title: "toolTimeout config key (default, validation, YAML comments in agent.*.yaml and config.samples)"
67+ state: open
68+ priority: none
69+ author:
70+ name: k33g
71+ email: ph.charriere@gmail.com
72+ createdAt: 2026-09-30T11:38:05.000Z
73+ updatedAt: 2026-09-30T11:38:05.000Z
74+ - id: 3
75+ title: "WrapTool: tool budget on a turn-child context, watchdog re-armed after the tool"
76+ state: open
77+ priority: none
78+ author:
79+ name: k33g
80+ email: ph.charriere@gmail.com
81+ createdAt: 2026-09-30T11:38:05.000Z
82+ updatedAt: 2026-09-30T11:38:05.000Z
83+ - id: 4
84+ title: "Exclude the permission wait (ACP and window sinks) from both budgets; decide on a cap"
85+ state: open
86+ priority: none
87+ author:
88+ name: k33g
89+ email: ph.charriere@gmail.com
90+ createdAt: 2026-09-30T11:38:05.000Z
91+ updatedAt: 2026-09-30T11:38:05.000Z
92+ - id: 5
93+ title: "ACP end-to-end check: permission answered after 2x watchdogTimeout -> file written"
94+ state: open
95+ priority: none
96+ author:
97+ name: k33g
98+ email: ph.charriere@gmail.com
99+ createdAt: 2026-09-30T11:38:05.000Z
100+ updatedAt: 2026-09-30T11:38:05.000Z
101+ - id: 6
102+ title: "Docs EN+FR: configuration reference (watchdogTimeout vs toolTimeout), explanation"
103+ state: open
104+ priority: none
105+ author:
106+ name: k33g
107+ email: ph.charriere@gmail.com
108+ createdAt: 2026-09-30T11:38:05.000Z
109+ updatedAt: 2026-09-30T11:38:05.000Z
110+comments: []
new file mode 100644
@@ -0,0 +1,110 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 57
3+title: Watchdog kills the turn while a tool runs or a permission is pending
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-09-30T11:38:05.000Z
9+updatedAt: 2026-09-30T11:38:05.000Z
10+labels:
11+ - kind::bug
12+ - priority::medium
13+related:
14+ - 53
15+body: |
16+ Symptom: "Error: Internal error: generation timed out (stalled)" in an
17+ editor (ACP), after a write_file whose permission dialog stayed open; the
18+ session records "[write_file rejected by the user]" although the user
19+ rejected nothing (session 20260930-072059-d23b9ad5, Gemma 4 26B on DMR).
20+
21+ Cause: the watchdog (internal/engine/progress.go) keeps counting while a
22+ tool runs. Tools get the watchdog's context (genCtx) and nothing pauses it
23+ in WrapTool, so anything longer than watchdogTimeout kills the turn:
24+ - a permission dialog answered slowly (ACP and window mode);
25+ - a legitimately long tool: bash's budget is 30 s, the default
26+ watchdogTimeout is 20 s (30 s in agent.dmr.yaml).
27+
28+ Reproduced 2026-09-30 with a fake OpenAI server + scripted ACP client,
29+ watchdogTimeout 3s: permission answered after 1 s -> OK; after 6 s -> the
30+ exact error, file not written; bash "sleep 6" -> same. Identical on the
31+ v0.2.3 and v0.2.4 binaries: not a regression of 0.2.4 (ticket 53 does not
32+ touch this path).
33+
34+ Workaround: raise watchdogTimeout in the config, or choose "Allow <tool>
35+ for this session".
36+
37+ Do NOT simply pause the watchdog during tools: today it is the only bound
38+ for lsp requests (tool ctx, no timeout of their own) and stdio MCP calls
39+ (unbounded unless the server has a timeout in the config). Own bounds:
40+ bash 30 s + 2 s WaitDelay, fetch_content 30 s, MCP over HTTP 30 s.
41+ The model <-> tools loop is bounded by maxTurns and the loop detector, not
42+ by the watchdog, so no endless-loop risk from this change.
43+
44+ Proposed design:
45+ 1. While a tool runs, replace the watchdog by a tool budget: new config key
46+ toolTimeout (default ~2 min), applied in WrapTool on a context that is a
47+ child of the TURN's context (Stop still cancels) but not of the watchdog.
48+ A tool over budget answers the model with a text error, like bash's
49+ "[error: … timeout exceeded]"; the turn goes on.
50+ 2. Do not count the permission wait (user's thinking time) in either
51+ budget. Optional: a very large cap (e.g. 30 min) for an editor that
52+ never answers.
53+ 3. When the tool returns, re-arm the watchdog with pl.expect() (the next
54+ model call gets firstTokenTimeout).
55+tasks:
56+ - id: 1
57+ title: "Failing test first: a tool that sleeps longer than watchdogTimeout must not stall the turn"
58+ state: open
59+ priority: none
60+ author:
61+ name: k33g
62+ email: ph.charriere@gmail.com
63+ createdAt: 2026-09-30T11:38:05.000Z
64+ updatedAt: 2026-09-30T11:38:05.000Z
65+ - id: 2
66+ title: "toolTimeout config key (default, validation, YAML comments in agent.*.yaml and config.samples)"
67+ state: open
68+ priority: none
69+ author:
70+ name: k33g
71+ email: ph.charriere@gmail.com
72+ createdAt: 2026-09-30T11:38:05.000Z
73+ updatedAt: 2026-09-30T11:38:05.000Z
74+ - id: 3
75+ title: "WrapTool: tool budget on a turn-child context, watchdog re-armed after the tool"
76+ state: open
77+ priority: none
78+ author:
79+ name: k33g
80+ email: ph.charriere@gmail.com
81+ createdAt: 2026-09-30T11:38:05.000Z
82+ updatedAt: 2026-09-30T11:38:05.000Z
83+ - id: 4
84+ title: "Exclude the permission wait (ACP and window sinks) from both budgets; decide on a cap"
85+ state: open
86+ priority: none
87+ author:
88+ name: k33g
89+ email: ph.charriere@gmail.com
90+ createdAt: 2026-09-30T11:38:05.000Z
91+ updatedAt: 2026-09-30T11:38:05.000Z
92+ - id: 5
93+ title: "ACP end-to-end check: permission answered after 2x watchdogTimeout -> file written"
94+ state: open
95+ priority: none
96+ author:
97+ name: k33g
98+ email: ph.charriere@gmail.com
99+ createdAt: 2026-09-30T11:38:05.000Z
100+ updatedAt: 2026-09-30T11:38:05.000Z
101+ - id: 6
102+ title: "Docs EN+FR: configuration reference (watchdogTimeout vs toolTimeout), explanation"
103+ state: open
104+ priority: none
105+ author:
106+ name: k33g
107+ email: ph.charriere@gmail.com
108+ createdAt: 2026-09-30T11:38:05.000Z
109+ updatedAt: 2026-09-30T11:38:05.000Z
110+comments: []