Give a session a standing method, and stop cutting turns off at six Three things, from one transcript that read a package for twenty steps and eighty thousand tokens and then said `Stopped after 6 rounds of tool calls without an answer`. **The ceiling was six.** It is a backstop against a model that loops forever, not a budget, and six is a number real work passes. It is a hundred now, in both lanes. A reader stops a turn with escape at any time, and that is the control that should decide when enough is enough. **Reaching it threw the work away.** The last round is now asked without tools and with one instruction: answer with what you have, and say what is unfinished. The model has one thing left it can do, which is report. Ending on "stopped" discarded every read that made the turn long in the first place. **A session had no standing context.** A skill can now set `auto: true`, and its body goes in front of the first prompt rather than waiting to be asked for. A session told to work a backlog needs the method before its first decision, and a method it has to think to ask for is one it will not ask for. First prompt only: after that it is in the transcript, and paying again each turn buys nothing. `superdelegate` is that skill, and it replaces `delegating-work`. It carries the lane choice, and the opinionated part: read the board before touching it, treat blocked as not workable, one child per surface so two children cannot edit the same files, route straightforward engineering to Devin and conceptual work to opencode on Ox Alpha, and find the width rather than picking it — start near four, look at load, memory, account status and rate limits, climb while they are clean, and hold at the last clean width at the first sign of a limit. A session in an OpenAgents directory is also told which repository is which: `openagents.com` is the Phoenix web application and API, `openagents` is the monorepo whose CLI lives in `packages/openagents-cli`. Both were being worked out from scratch, repeatedly, by sessions with no way to know. Keyed on the path, so a directory that is not one of them gets nothing rather than a guess. Tracked as #22. 392 tests pass.
Give a session a standing method, and stop cutting turns off at six
Deploy story
What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.
Not deployed through the forge lane
No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.
Changed files
-
deleted
packages/openagents-cli/skills/delegating-work/SKILL.md -
added
packages/openagents-cli/skills/superdelegate/SKILL.md -
modified
packages/openagents-cli/src/cli.ts -
modified
packages/openagents-cli/src/coder-ollama.ts -
modified
packages/openagents-cli/src/coder-session.ts -
modified
packages/openagents-cli/src/coder-skills.ts -
modified
packages/openagents-cli/src/coder-thread.ts -
modified
packages/openagents-cli/test/coder-ollama.test.ts -
modified
packages/openagents-cli/test/coder-skills.test.ts
Diff
9 files changed, +309 -150
packages/openagents-cli/skills/delegating-work/SKILL.md deleted -112
@@ -1,112 +0,0 @@
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 86 |
|
|
| 87 |
|
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| 99 |
|
|
| 100 |
|
|
| 101 |
|
|
| 102 |
|
|
| 103 |
|
|
| 104 |
|
|
| 105 |
|
|
| 106 |
|
|
| 107 |
|
|
| 108 |
|
|
| 109 |
|
|
| 110 |
|
|
| 111 |
|
|
| 112 |
|
packages/openagents-cli/skills/superdelegate/SKILL.md added +105
@@ -0,0 +1,105 @@
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 86 |
|
|
| 87 |
|
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| 99 |
|
|
| 100 |
|
|
| 101 |
|
|
| 102 |
|
|
| 103 |
|
|
| 104 |
|
|
| 105 |
|
packages/openagents-cli/src/cli.ts modified +3 -2
@@ -39,7 +39,7 @@ import { delegateTool, openagentsTool, shellTool, skillTool } from "./coder-tool
| 39 | 39 |
|
| 40 | 40 |
|
| 41 | 41 |
|
| 42 |
|
|
| 42 |
|
|
| 43 | 43 |
|
| 44 | 44 |
|
| 45 | 45 |
|
@@ -1767,11 +1767,13 @@ const coderCommand = Command.make(
| 1767 | 1767 |
|
| 1768 | 1768 |
|
| 1769 | 1769 |
|
| 1770 |
|
|
| 1770 | 1771 |
|
| 1771 | 1772 |
|
| 1772 | 1773 |
|
| 1773 | 1774 |
|
| 1774 | 1775 |
|
| 1776 |
|
|
| 1775 | 1777 |
|
| 1776 | 1778 |
|
| 1777 | 1779 |
|
@@ -1781,7 +1783,6 @@ const coderCommand = Command.make(
| 1781 | 1783 |
|
| 1782 | 1784 |
|
| 1783 | 1785 |
|
| 1784 |
|
|
| 1785 | 1786 |
|
| 1786 | 1787 |
|
| 1787 | 1788 |
|
packages/openagents-cli/src/coder-ollama.ts modified +23 -12
@@ -20,13 +20,16 @@ import type { CoderTool } from "./coder-tools.js";
| 20 | 20 |
|
| 21 | 21 |
|
| 22 | 22 |
|
| 23 |
|
|
| 23 |
|
|
| 24 | 24 |
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 28 | 31 |
|
| 29 |
|
|
| 32 |
|
|
| 30 | 33 |
|
| 31 | 34 |
|
| 32 | 35 |
|
@@ -225,6 +228,20 @@ export class OllamaReplySource implements ReplySource {
| 225 | 228 |
|
| 226 | 229 |
|
| 227 | 230 |
|
| 231 |
|
|
| 232 |
|
|
| 233 |
|
|
| 234 |
|
|
| 235 |
|
|
| 236 |
|
|
| 237 |
|
|
| 238 |
|
|
| 239 |
|
|
| 240 |
|
|
| 241 |
|
|
| 242 |
|
|
| 243 |
|
|
| 244 |
|
|
| 228 | 245 |
|
| 229 | 246 |
|
| 230 | 247 |
|
@@ -232,7 +249,7 @@ export class OllamaReplySource implements ReplySource {
| 232 | 249 |
|
| 233 | 250 |
|
| 234 | 251 |
|
| 235 |
|
|
| 252 |
|
|
| 236 | 253 |
|
| 237 | 254 |
|
| 238 | 255 |
|
@@ -306,12 +323,6 @@ export class OllamaReplySource implements ReplySource {
| 306 | 323 |
|
| 307 | 324 |
|
| 308 | 325 |
|
| 309 |
|
|
| 310 |
|
|
| 311 |
|
|
| 312 |
|
|
| 313 |
|
|
| 314 |
|
|
| 315 | 326 |
|
| 316 | 327 |
|
| 317 | 328 |
|
packages/openagents-cli/src/coder-session.ts modified +17 -1
@@ -311,6 +311,15 @@ export class CoderSession {
| 311 | 311 |
|
| 312 | 312 |
|
| 313 | 313 |
|
| 314 |
|
|
| 315 |
|
|
| 316 |
|
|
| 317 |
|
|
| 318 |
|
|
| 319 |
|
|
| 320 |
|
|
| 321 |
|
|
| 322 |
|
|
| 314 | 323 |
|
| 315 | 324 |
|
| 316 | 325 |
|
@@ -491,7 +500,14 @@ export class CoderSession {
| 491 | 500 |
|
| 492 | 501 |
|
| 493 | 502 |
|
| 494 |
|
|
| 503 |
|
|
| 504 |
|
|
| 505 |
|
|
| 506 |
|
|
| 507 |
|
|
| 508 |
|
|
| 509 |
|
|
| 510 |
|
|
| 495 | 511 |
|
| 496 | 512 |
|
| 497 | 513 |
|
packages/openagents-cli/src/coder-skills.ts modified +79 -4
@@ -51,6 +51,18 @@ const BODY_LIMIT = 32_000;
| 51 | 51 |
|
| 52 | 52 |
|
| 53 | 53 |
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 54 | 66 |
|
| 55 | 67 |
|
| 56 | 68 |
|
@@ -67,15 +79,20 @@ export interface CoderSkill {
| 67 | 79 |
|
| 68 | 80 |
|
| 69 | 81 |
|
| 70 |
|
|
| 82 |
|
|
| 71 | 83 |
|
| 72 | 84 |
|
| 73 | 85 |
|
| 74 | 86 |
|
| 75 |
|
|
| 87 |
|
|
| 76 | 88 |
|
| 77 | 89 |
|
| 78 | 90 |
|
| 91 |
|
|
| 92 |
|
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
| 79 | 96 |
|
| 80 | 97 |
|
| 81 | 98 |
|
@@ -145,13 +162,19 @@ export function discoverSkills(
| 145 | 162 |
|
| 146 | 163 |
|
| 147 | 164 |
|
| 148 |
|
|
| 165 |
|
|
| 149 | 166 |
|
| 150 | 167 |
|
| 151 | 168 |
|
| 152 | 169 |
|
| 153 | 170 |
|
| 154 |
|
|
| 171 |
|
|
| 172 |
|
|
| 173 |
|
|
| 174 |
|
|
| 175 |
|
|
| 176 |
|
|
| 177 |
|
|
| 155 | 178 |
|
| 156 | 179 |
|
| 157 | 180 |
|
@@ -264,3 +287,55 @@ export function loadSkillSelection(
| 264 | 287 |
|
| 265 | 288 |
|
| 266 | 289 |
|
| 290 |
|
|
| 291 |
|
|
| 292 |
|
|
| 293 |
|
|
| 294 |
|
|
| 295 |
|
|
| 296 |
|
|
| 297 |
|
|
| 298 |
|
|
| 299 |
|
|
| 300 |
|
|
| 301 |
|
|
| 302 |
|
|
| 303 |
|
|
| 304 |
|
|
| 305 |
|
|
| 306 |
|
|
| 307 |
|
|
| 308 |
|
|
| 309 |
|
|
| 310 |
|
|
| 311 |
|
|
| 312 |
|
|
| 313 |
|
|
| 314 |
|
|
| 315 |
|
|
| 316 |
|
|
| 317 |
|
|
| 318 |
|
|
| 319 |
|
|
| 320 |
|
|
| 321 |
|
|
| 322 |
|
|
| 323 |
|
|
| 324 |
|
|
| 325 |
|
|
| 326 |
|
|
| 327 |
|
|
| 328 |
|
|
| 329 |
|
|
| 330 |
|
|
| 331 |
|
|
| 332 |
|
|
| 333 |
|
|
| 334 |
|
|
| 335 |
|
|
| 336 |
|
|
| 337 |
|
|
| 338 |
|
|
| 339 |
|
|
| 340 |
|
|
| 341 |
|
packages/openagents-cli/src/coder-thread.ts modified +24 -10
@@ -69,12 +69,15 @@ import type { CoderTool } from "./coder-tools.js";
| 69 | 69 |
|
| 70 | 70 |
|
| 71 | 71 |
|
| 72 |
|
|
| 72 |
|
|
| 73 | 73 |
|
| 74 |
|
|
| 75 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 76 | 79 |
|
| 77 |
|
|
| 80 |
|
|
| 78 | 81 |
|
| 79 | 82 |
|
| 80 | 83 |
|
@@ -223,6 +226,8 @@ export class ThreadReplySource implements ReplySource {
| 223 | 226 |
|
| 224 | 227 |
|
| 225 | 228 |
|
| 229 |
|
|
| 230 |
|
|
| 226 | 231 |
|
| 227 | 232 |
|
| 228 | 233 |
|
@@ -309,6 +314,9 @@ export class ThreadReplySource implements ReplySource {
| 309 | 314 |
|
| 310 | 315 |
|
| 311 | 316 |
|
| 317 |
|
|
| 318 |
|
|
| 319 |
|
|
| 312 | 320 |
|
| 313 | 321 |
|
| 314 | 322 |
|
@@ -329,11 +337,17 @@ export class ThreadReplySource implements ReplySource {
| 329 | 337 |
|
| 330 | 338 |
|
| 331 | 339 |
|
| 332 |
|
|
| 333 |
|
|
| 334 |
|
|
| 335 |
|
|
| 336 |
|
|
| 340 |
|
|
| 341 |
|
|
| 342 |
|
|
| 343 |
|
|
| 344 |
|
|
| 345 |
|
|
| 346 |
|
|
| 347 |
|
|
| 348 |
|
|
| 349 |
|
|
| 350 |
|
|
| 337 | 351 |
|
| 338 | 352 |
|
| 339 | 353 |
|
@@ -434,7 +448,7 @@ export class ThreadReplySource implements ReplySource {
| 434 | 448 |
|
| 435 | 449 |
|
| 436 | 450 |
|
| 437 |
|
|
| 451 |
|
|
| 438 | 452 |
|
| 439 | 453 |
|
| 440 | 454 |
|
packages/openagents-cli/test/coder-ollama.test.ts modified +17 -8
@@ -200,18 +200,27 @@ describe("an ollama turn that calls a tool", () => {
| 200 | 200 |
|
| 201 | 201 |
|
| 202 | 202 |
|
| 203 |
|
|
| 204 |
|
|
| 203 |
|
|
| 204 |
|
|
| 205 |
|
|
| 206 |
|
|
| 207 |
|
|
| 205 | 208 |
|
| 206 | 209 |
|
| 207 | 210 |
|
| 208 |
|
|
| 211 |
|
|
| 209 | 212 |
|
| 210 |
|
|
| 211 |
|
|
| 212 |
|
|
| 213 |
|
|
| 214 |
|
|
| 213 |
|
|
| 214 |
|
|
| 215 |
|
|
| 216 |
|
|
| 217 |
|
|
| 218 |
|
|
| 219 |
|
|
| 220 |
|
|
| 221 |
|
|
| 222 |
|
|
| 223 |
|
|
| 215 | 224 |
|
| 216 | 225 |
|
| 217 | 226 |
|
packages/openagents-cli/test/coder-skills.test.ts modified +41 -1
@@ -3,7 +3,7 @@ import { tmpdir } from "node:os";
| 3 | 3 |
|
| 4 | 4 |
|
| 5 | 5 |
|
| 6 |
|
|
| 6 |
|
|
| 7 | 7 |
|
| 8 | 8 |
|
| 9 | 9 |
|
@@ -262,3 +262,43 @@ describe("the skills the CLI ships with", () => {
| 262 | 262 |
|
| 263 | 263 |
|
| 264 | 264 |
|
| 265 |
|
|
| 266 |
|
|
| 267 |
|
|
| 268 |
|
|
| 269 |
|
|
| 270 |
|
|
| 271 |
|
|
| 272 |
|
|
| 273 |
|
|
| 274 |
|
|
| 275 |
|
|
| 276 |
|
|
| 277 |
|
|
| 278 |
|
|
| 279 |
|
|
| 280 |
|
|
| 281 |
|
|
| 282 |
|
|
| 283 |
|
|
| 284 |
|
|
| 285 |
|
|
| 286 |
|
|
| 287 |
|
|
| 288 |
|
|
| 289 |
|
|
| 290 |
|
|
| 291 |
|
|
| 292 |
|
|
| 293 |
|
|
| 294 |
|
|
| 295 |
|
|
| 296 |
|
|
| 297 |
|
|
| 298 |
|
|
| 299 |
|
|
| 300 |
|
|
| 301 |
|
|
| 302 |
|
|
| 303 |
|
|
| 304 |
|