Run children on free models, and refresh a grant that outlived its session Four children came back together with `grant_expired`, and the first sign of it was four failed children rather than anything about the grant. A thread grant lives 3,600 seconds — `thread_grant_ttl_seconds` — and the console mints one at startup and never again. A session open longer than an hour dispatches onto a credential minted at breakfast. Two changes, and the first one is the one that matters. **Children default to a free model with no grant at all.** The harness's own catalog costs nothing and needs no credential from us, so `buildDelegation` now picks the first of `opencode/big-pickle`, then the Gemini flash models, resolved against what `opencode models` actually lists. A name that goes away falls through to the next rather than failing a fan-out, and a listing that cannot be read says nothing rather than guessing. **The grant is the fallback, and it refreshes.** Where it is still used, the child gateway mints another when the proxy refuses one as expired and sends the same request again, once — a second expiry on a grant minted moments ago is a refusal about something else, and retrying forever would hide it. A caller with no way to mint another gets the refusal as before. Worth recording against the intent: `ox-alpha` cannot be reached without a grant. The server maps it to `stealth/ox-alpha` through its own provider, and the harness lists no stealth or openrouter route among its 101 models, so the proxy is the only path to it and the proxy is what requires the grant. `opencode/big-pickle` is the harness's own stealth entry and is what the preference list reaches first; whether it is the same model is not something this repository can assert. 415 tests pass.
Run children on free models, and refresh a grant that outlived its session
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
-
modified
docs/assure-repo/false-green-candidates.v1.json -
modified
docs/assure-repo/surface-inventory.v1.json -
modified
packages/openagents-cli/src/cli.ts -
modified
packages/openagents-cli/src/coder-child-gateway.ts -
modified
packages/openagents-cli/src/coder-delegate.ts -
added
packages/openagents-cli/test/coder-child-gateway-grant.test.ts
Diff
6 files changed, +239 -10
docs/assure-repo/false-green-candidates.v1.json modified +1 -1
@@ -4,7 +4,7 @@
| 4 | 4 |
|
| 5 | 5 |
|
| 6 | 6 |
|
| 7 |
|
|
| 7 |
|
|
| 8 | 8 |
|
| 9 | 9 |
|
| 10 | 10 |
|
docs/assure-repo/surface-inventory.v1.json modified +2 -2
@@ -1,7 +1,7 @@
| 1 | 1 |
|
| 2 | 2 |
|
| 3 | 3 |
|
| 4 |
|
|
| 4 |
|
|
| 5 | 5 |
|
| 6 | 6 |
|
| 7 | 7 |
|
packages/openagents-cli/src/cli.ts modified +50 -2
@@ -19,7 +19,13 @@ import type { ChildGrant } from "./coder-child-gateway.js";
| 19 | 19 |
|
| 20 | 20 |
|
| 21 | 21 |
|
| 22 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 23 | 29 |
|
| 24 | 30 |
|
| 25 | 31 |
|
@@ -1577,6 +1583,8 @@ async function buildDelegation(options: {
| 1577 | 1583 |
|
| 1578 | 1584 |
|
| 1579 | 1585 |
|
| 1586 |
|
|
| 1587 |
|
|
| 1580 | 1588 |
|
| 1581 | 1589 |
|
| 1582 | 1590 |
|
@@ -1604,12 +1612,39 @@ async function buildDelegation(options: {
| 1604 | 1612 |
|
| 1605 | 1613 |
|
| 1606 | 1614 |
|
| 1615 |
|
|
| 1616 |
|
|
| 1617 |
|
|
| 1618 |
|
|
| 1619 |
|
|
| 1620 |
|
|
| 1621 |
|
|
| 1622 |
|
|
| 1623 |
|
|
| 1624 |
|
|
| 1625 |
|
|
| 1626 |
|
|
| 1627 |
|
|
| 1628 |
|
|
| 1629 |
|
|
| 1630 |
|
|
| 1631 |
|
|
| 1632 |
|
|
| 1633 |
|
|
| 1634 |
|
|
| 1635 |
|
|
| 1636 |
|
|
| 1637 |
|
|
| 1638 |
|
|
| 1639 |
|
|
| 1640 |
|
|
| 1641 |
|
|
| 1607 | 1642 |
|
| 1608 | 1643 |
|
| 1609 | 1644 |
|
| 1610 | 1645 |
|
| 1611 | 1646 |
|
| 1612 |
|
|
| 1647 |
|
|
| 1613 | 1648 |
|
| 1614 | 1649 |
|
| 1615 | 1650 |
|
@@ -1794,6 +1829,19 @@ const coderCommand = Command.make(
| 1794 | 1829 |
|
| 1795 | 1830 |
|
| 1796 | 1831 |
|
| 1832 |
|
|
| 1833 |
|
|
| 1834 |
|
|
| 1835 |
|
|
| 1836 |
|
|
| 1837 |
|
|
| 1838 |
|
|
| 1839 |
|
|
| 1840 |
|
|
| 1841 |
|
|
| 1842 |
|
|
| 1843 |
|
|
| 1844 |
|
|
| 1797 | 1845 |
|
| 1798 | 1846 |
|
| 1799 | 1847 |
|
packages/openagents-cli/src/coder-child-gateway.ts modified +42 -5
@@ -152,12 +152,43 @@ export const CHILD_PROVIDER = "openagents";
| 152 | 152 |
|
| 153 | 153 |
|
| 154 | 154 |
|
| 155 |
|
|
| 155 |
|
|
| 156 |
|
|
| 157 |
|
|
| 158 |
|
|
| 159 |
|
|
| 160 |
|
|
| 161 |
|
|
| 162 |
|
|
| 163 |
|
|
| 164 |
|
|
| 165 |
|
|
| 166 |
|
|
| 167 |
|
|
| 168 |
|
|
| 169 |
|
|
| 170 |
|
|
| 171 |
|
|
| 172 |
|
|
| 156 | 173 |
|
| 157 | 174 |
|
| 158 | 175 |
|
| 159 | 176 |
|
| 160 |
|
|
| 177 |
|
|
| 178 |
|
|
| 179 |
|
|
| 180 |
|
|
| 181 |
|
|
| 182 |
|
|
| 183 |
|
|
| 184 |
|
|
| 185 |
|
|
| 186 |
|
|
| 187 |
|
|
| 188 |
|
|
| 189 |
|
|
| 190 |
|
|
| 191 |
|
|
| 161 | 192 |
|
| 162 | 193 |
|
| 163 | 194 |
|
@@ -185,7 +216,9 @@ async function forward(
| 185 | 216 |
|
| 186 | 217 |
|
| 187 | 218 |
|
| 188 |
|
|
| 219 |
|
|
| 220 |
|
|
| 221 |
|
|
| 189 | 222 |
|
| 190 | 223 |
|
| 191 | 224 |
|
@@ -232,6 +265,9 @@ async function forward(
| 232 | 265 |
|
| 233 | 266 |
|
| 234 | 267 |
|
| 268 |
|
|
| 269 |
|
|
| 270 |
|
|
| 235 | 271 |
|
| 236 | 272 |
|
| 237 | 273 |
|
@@ -243,7 +279,7 @@ async function forward(
| 243 | 279 |
|
| 244 | 280 |
|
| 245 | 281 |
|
| 246 |
|
|
| 282 |
|
|
| 247 | 283 |
|
| 248 | 284 |
|
| 249 | 285 |
|
packages/openagents-cli/src/coder-delegate.ts modified +44
@@ -492,6 +492,50 @@ export class DevinHarness implements DelegateHarness {
| 492 | 492 |
|
| 493 | 493 |
|
| 494 | 494 |
|
| 495 |
|
|
| 496 |
|
|
| 497 |
|
|
| 498 |
|
|
| 499 |
|
|
| 500 |
|
|
| 501 |
|
|
| 502 |
|
|
| 503 |
|
|
| 504 |
|
|
| 505 |
|
|
| 506 |
|
|
| 507 |
|
|
| 508 |
|
|
| 509 |
|
|
| 510 |
|
|
| 511 |
|
|
| 512 |
|
|
| 513 |
|
|
| 514 |
|
|
| 515 |
|
|
| 516 |
|
|
| 517 |
|
|
| 518 |
|
|
| 519 |
|
|
| 520 |
|
|
| 521 |
|
|
| 522 |
|
|
| 523 |
|
|
| 524 |
|
|
| 525 |
|
|
| 526 |
|
|
| 527 |
|
|
| 528 |
|
|
| 529 |
|
|
| 530 |
|
|
| 531 |
|
|
| 532 |
|
|
| 533 |
|
|
| 534 |
|
|
| 535 |
|
|
| 536 |
|
|
| 537 |
|
|
| 538 |
|
|
| 495 | 539 |
|
| 496 | 540 |
|
| 497 | 541 |
|
packages/openagents-cli/test/coder-child-gateway-grant.test.ts added +100
@@ -0,0 +1,100 @@
| 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 |
|