Repository navigation
feat(site): add the organization token budget setting - #331
Conversation
The fork-token-budget experiment now reads a per-organization setting. The summary strategy, the default, keeps main's summary compaction with notes and chat_history. The token_budget strategy keeps the windows of #314, and its fallback picks a new window or a summary at the usable limit.
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15435aba7b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ools The new_context tool holds the fallback of the step that built it, so triggers and compaction follow one setting and a foreign new_context tool does not make a turn eligible. With the summary fallback, the compaction model override's trigger still applies.
…1-token-budget-setting-ui # Conflicts: # docs/fork/pstack-adapter.md
Merged the base branch after the chatd fixes on #330. @codex review |
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b5e50691e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f6e364b68
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…budget-setting-ui # Conflicts: # docs/fork/pstack-adapter.md
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d33f6b574e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…save after an edit
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a741b2281f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Merged as 9f99450 (squash, Gates on head 080b736:
Not exercised: the page on a running deployment. The section shows only with the |
Closes #321. The API and chatd half merged in #330.
What
A Context compaction section in AI Settings > Coder Agents for the organization token budget setting from #330.
summary) or "Token budget" (token_budget).new_window) or "Summarize the conversation" (summary). It is disabled unless the strategy is the token budget, and the stored value is kept.The section shows only with
fork-token-budgetand for a user who can read the organization's chat model configs, the same gate as the subagent limits section. Users without edit permission see it read only.How
site/src/api/forkTokenBudget.ts,site/src/api/queries/forkTokenBudget.ts,ForkTokenBudget.tsx,components/ForkTokenBudgetSettings.tsxwith stories, a test, and a fixture insite/src/testHelpers/forkTokenBudget.ts.ForkOrganizationAgentSettings.tsxrenders the subagent limits and the new section, so the existing hook line in the upstreamOrganizationAgentSettings.tsxnow names this wrapper. No new hook line.docs/fork/pstack-adapter.mdnames the section and adds the evidence line.How tested
pnpm test src/pages/AISettingsPage/CoderAgentsPage: 3 files, 25 tests pass.ForkTokenBudget.test.tsxhas 8 tests: a save oftoken_budgetwith thesummaryfallback and the cache update, an announced failed save, a kept draft on refetch, a refreshed unedited form, hidden with the experiment off, hidden and no request without read permission, read only for viewers (all radios disabled, no Save), and the fallback disabled undersummaryand enabled with the token budget.canEditcheck, the fallback test fails without the strategy check, and both hidden tests fail with the visibility gate forced on. Earlier, the draft test failed without the draft guard, and the failed-save test failed withoutrole="alert".vitest --project storybookonForkTokenBudgetSettings.stories.tsx(8 stories) andOrganizationAgentSettings.stories.tsx(2): pass.pnpm lint:typesand biome check and format on the touched files: pass.Not verified: the page in a running deployment.