{
  "$type": "site.standard.document",
  "content": "---\ntitle: \"The road to COMP4020: managing the strategic token reserve\"\ndescription: \"How to provision and manage AI token budgets for a class of agentic coding\n  students.\"\ntags: [comp4020]\n---\n\n:::tip\n\nThis post is part of a series I'm writing as I develop\n[COMP4020: Agentic Coding Studio](/blog/2025/12/19/comp4020-rapid-prototyping-for-the-web/).\nSee [all posts in the series](/blog/tag/comp4020/).\n\n:::\n\n:::info\n\n**Update:** the platform question is now settled---we're running on Anthropic's\nClaude API. See\n[Anthropic comes to the party](/blog/2026/04/02/anthropic-comes-to-the-party/).\nThe implementation design---proxy architecture, quota enforcement, and full\ntraffic logging---is now detailed in the follow-up,\n[token management by proxy](/blog/2026/04/22/comp4020-token-management-by-proxy/).\n\n:::\n\nThere's an oil crisis going on; you might have\n[heard about it](https://theconversation.com/the-iran-war-has-triggered-a-fuel-price-rise-what-does-this-mean-for-australian-consumers-277605).\nAustralia (and I presume other countries too) are having to\n[draw upon their strategic oil reserves](https://lighthouse.mq.edu.au/article/2026/march-2026/could-australia-run-out-of-petrol).\n\nAs I mentioned in my [sharp tools](/blog/2026/02/17/comp4020-sharp-tools/) post,\nI want my students to have a proper token allocation. Not necessarily\n[Jensen-level](https://www.cnbc.com/2026/03/20/nvidia-ai-agents-tokens-human-workers-engineer-jobs-unemployment-jensen-huang.html),\nbut enough that they can use CLI coding agents in anger without having to stop\nall the time to wait for their token budget to reset. This is our Strategic\nToken Reserve, and we want to ensure it's used equitably for all students.\n\nMy preferred option for doing this is just to have a big pool of tokens and\nmanage their use myself through the usual enterprise controls that the platforms\noffer. Then, I can write tooling to manage it in a way that supports student\nlearning in the Agentic Coding Studio. Some things I'd want to be able to do\nwith this tool are:\n\n- creating an API token to students as they enrol (and revoking if they drop out\n  for whatever reason)\n- setting (ideally platform-enforced) student token allocations (per course, per\n  week, etc.) and reset periods\n- reporting on actual token use: with breakdowns by student, studio crit group,\n  and across the whole class, including stats on how often limits were being\n  hit, etc.\n\nI say \"ideally\" because the current state of the\n[Admin API](https://docs.anthropic.com/en/docs/administration/administration-api)\ndoesn't quite get us there. The platform offers monthly spend caps per workspace\nand per-minute rate limits, but nothing like \"500k tokens per week per\nstudent\"---and even the spend caps can only be configured through the Console,\nnot via the API. The usage reporting side is solid, and you can create\nworkspaces and manage members programmatically, so the read side of this problem\nis well covered. But the quota enforcement logic---polling usage, tracking\ncumulative consumption per student per period, disabling and re-enabling API\nkeys when limits are hit---will need to live in our tooling. More infrastructure\non our side than I'd like, but not a dealbreaker.\n\nSecret scanning (catching tokens accidentally committed and pushed to GitLab) is\nhandled separately via a GitLab push hook.\n\nI have a few open questions, too:\n\n- what should the limit be?\n- how often should it reset?\n- if students don't hit their allocation in one time period, should those extra\n  tokens carry over?\n- should students be allowed to use their allocation outside of class work? my\n  gut feel is no, but that'll be hard to enforce\n- what happens if a student runs out of tokens? especially if their quota won't\n  reset until after their assignment deadline?\n\nAt a university-level, my colleague Alex Potanin and I would like to have\nvisibility on the same info across all the courses that are using these AI tools\n(and there are a few at ANU, with more to come). Some sort of dashboard that we\ncan look at in our DEFCON-style bunker deep beneath the ANU[^bunker] as we train\nour students in this brave new world of agentic coding.\n\n## A (hypothetical) CLI tool for the job\n\nThis CLI tool doesn't exist yet (although I plan to build it soon) but it might\nlook like this:\n\n```\n$ token-manager --help\nUsage: token-manager <command> [options]\n\nManage AI token allocations for a class of students.\n\nCommands:\n  sync     Sync enrolled students from a CSV or enrolment export.\n           Provisions new students and revokes dropped ones.\n  quota    View or set token allocations and reset periods.\n  usage    Report on token consumption with breakdowns by\n           student, group, or class.\n\nOptions:\n  --config <path>   Path to config file [default: ./token-manager.toml]\n  --course <id>     Course identifier (e.g. COMP4020-2026-S2)\n  -h, --help        Show this help message\n  -V, --version     Show version\n\nExamples:\n  token-manager sync --source enrolments.csv\n  token-manager quota set --limit 500k --reset-period 7d\n  token-manager quota set --limit 500k --reset-period 7d --carry-over\n  token-manager usage --group \"studio-a\" --since 2026-03-01\n  token-manager usage --format csv > usage-report.csv\n```\n\nAnd I'll almost certainly not call it `token-manager`; some names I'm kicking\naround are `goosey` (because the similar tool that I wrote several years ago to\nmanage large classes of GitLab submissions is called `lucy`). But that's\ntbc---stay tuned.\n\n[^bunker]:\n    Note to readers and avid watchers of Senate Estimates: there is no such\n    bunker.\n",
  "createdAt": "2026-05-13T23:14:38.299Z",
  "description": "How to provision and manage AI token budgets for a class of agentic coding students.",
  "path": "/blog/2026/03/27/managing-the-strategic-token-reserve",
  "publishedAt": "2026-03-27T00:00:00.000Z",
  "site": "at://did:plc:tevykrhi4kibtsipzci76d76/site.standard.publication/self",
  "tags": [
    "comp4020"
  ],
  "textContent": "How to provision and manage AI token budgets for a class of agentic coding students.",
  "title": "The road to COMP4020: managing the strategic token reserve"
}