Public: anyone can read this; the crew can change it.
Crew runs on a forge admin's org repos use the forge's model account (every child made for an org fails its first run today) #11128
Check · Review · Land · Live done — Landed and live in production.
A funded child's org now reaches the parent's lent credit once an admin has granted the org a model budget. I couldn't confirm point 4: I haven't seen glint-agency's runs, and nothing is proven live. The new test passes with `test/model-grant.test.ts`, as does `tsc`, and `scripts/gate.ts` printed nothing when run.
shipped production is serving it deploy 28b4394
A funded child's org now reaches the parent's lent credit once an admin has granted the org a model budget. I couldn't confirm point 4: I haven't seen glint-agency's runs, and nothing is proven live. The new test passes with test/model-grant.test.ts, as does tsc, and scripts/gate.ts printed nothing when run.
The bug found.
- A run on an org repo only gets past the "no model account" check through the org's explicit model grant.
- It then used the forge's own credentials. A child has none of its own, so the run had nothing to call the model with.
- The parent's lent credit was used only when the run picked the forge's own account, not when it came in on an org's grant.
credentialEnvinsrc/crew/runner.tsnow uses the lent credit for both cases. That fits trevato's note that glint-agency still shows $0 of its $50 spent.
Where this differs from the issue.
- Not what point 1 asks: an org whose Owners include a forge admin does not use the forge's account automatically. I first built that, then reversed it in
b25bcee66: Owners membership belongs to the org's owners, so it must not reach the forge's credential. An admin grants the org instead. - Point 2: the refusal reads "the account
<org>has no model grant; an admin can grant one at /settings/accounts/<org>". I pointed it at the existing grant page rather than/admin/accounts/<org>, and I did not check that it renders as a link. - Point 3:
test/model-grant.test.tscovers an org with and without a grant.
What I chose not to do. I did not make the spawn grant the org a model budget automatically, so a new child's first crew run still needs an admin to set one. The issue says every child made for an org hits this on its first run. That would be a policy change, so I left it for you to decide.
To try it.
- As an admin on glint-agency, open
/settings/accounts/glint-agencyand set the Model budget. - That child must be running an image that includes this fix.
- Start a crew run on
agency; the forge list should then show spend against the $50.
I couldn't check from this sandbox that glint-agency's image has the fix or what its newest run says.
🤖 Generated with Claude Code
Approved. Org grants now work on the page, the API and the terminal (the TUI model-grant screen already accepts an org name). A granted org on a funded child reaches the parent lent credit, and the refusal names the fix. Tests cover both paths, the how-to is in docs/features/org-model-grant.md, and README is untouched. The preview answers 200. I did not exercise the org page there: it needs an admin session.
Two things I would do next:
- Make the spawn of a child for an org grant it a starting model budget, or say in the spawn flow that an admin must set one. Today every new org child still fails its first run until an admin visits /settings/accounts/<org>, which is the symptom in the title.
- Render the path in the refusal as a link wherever the run log is shown, and put one line of words on the org page saying what the Model budget is for, since an org page that used to show only ceilings now leads with it.
A funded child's org now reaches the parent's lent credit once an admin has granted the org a model budget. I couldn't confirm point 4: I haven't seen glint-agency's runs, and nothing is proven live. The new test passes with
test/model-grant.test.ts, as doestsc, andscripts/gate.tsprinted nothing when run.The bug found.
credentialEnvinsrc/crew/runner.tsnow uses the lent credit for both cases. That fits trevato's note that glint-agency still shows $0 of its $50 spent.Where this differs from the issue.
b25bcee66: Owners membership belongs to the org's owners, so it must not reach the forge's credential. An admin grants the org instead.<org>has no model grant; an admin can grant one at /settings/accounts/<org>". I pointed it at the existing grant page rather than/admin/accounts/<org>, and I did not check that it renders as a link.test/model-grant.test.tscovers an org with and without a grant.What I chose not to do. I did not make the spawn grant the org a model budget automatically, so a new child's first crew run still needs an admin to set one. The issue says every child made for an org hits this on its first run. That would be a policy change, so I left it for you to decide.
To try it.
/settings/accounts/glint-agencyand set the Model budget.agency; the forge list should then show spend against the $50.I couldn't check from this sandbox that glint-agency's image has the fix or what its newest run says.
🤖 Generated with Claude Code
Closes #10991