Commit 543edbe
committed
Revert query_wiki cap in skill compile agent
The QUERY_WIKI_MAX_CALLS=3 limit added in 2b94014 was over-engineered
defence:
- It was based on a theoretical worst-case bound (80 outer turns × 50
inner turns) from a perf review, not on observed misuse.
- There's no telemetry showing real compiles ever approach pathological
query_wiki usage.
- The prompt's "narrow follow-ups only" guidance plus the docstring
("nested LLM call, prefer direct reads") are already the right
primary control. Adding a structural hard-cap on top of that says
"we trust the agent to make 80 reasoning steps but not to count to
3", which is inconsistent.
- The cap had a real cost: a legitimately complex cross-document
intent that genuinely needed a 4th query_wiki got cut off and forced
back to direct reads, silently degrading skill quality.
Also fixes the docstring bug a reviewer flagged on 2b94014: the
docstring referenced the literal Python name `QUERY_WIKI_MAX_CALLS`
rather than the value, so the model saw a meaningless symbol. Removing
the cap removes the docstring claim too.
If runaway compiles ever show up in telemetry, prefer a logged warning
(observe-and-tune) over a silent block.1 parent 2b94014 commit 543edbe
1 file changed
Lines changed: 7 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | 106 | | |
114 | 107 | | |
115 | 108 | | |
116 | 109 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
124 | 117 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | 118 | | |
135 | 119 | | |
136 | 120 | | |
| |||
0 commit comments