Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,21 @@ the `Quests: ` line), and run it with consent. Codex then asks the user to
trust the hooks once through `/hooks`. It keeps the files' other settings and
prints what it changed.

## Check agent settings

[token-max](https://github.com/kixel-ai/token-max) reads the user's Claude
Code and Codex transcripts and recommends cheaper agent settings. Offer it, and
with consent run it once without installing anything:
`curl -LsSf https://max.kixel.ai/run.sh | sh`, or on native Windows
`irm https://max.kixel.ai/run.ps1 | iex`. Each downloads the latest release,
checks it against the release's checksums, and runs `token-max doctor`. Without
a terminal, as an agent runs it, it only prints its report and exits 1 when it
recommends a change; show the user the recommendations and apply none unasked.
On a terminal, it walks the user through each change and writes settings only
after a final yes.
`quest usage` and the records sender also need `token-max` on the `PATH`;
`cargo install --locked token-max` installs it, globally, so ask first.

## Opt into worktree hooks

Quest can create and reclaim Claude Code's worktrees, sharing one disk budget
Expand Down
2 changes: 1 addition & 1 deletion quest/m0/token-waste/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Cut agent token waste
# [S] Cut agent token waste

## Goal

Expand Down
43 changes: 0 additions & 43 deletions quest/m0/token-waste/token-max.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/cli/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ async function sendOnce(deps: SendDependencies, dir: string): Promise<Sent[]> {
const exported = deps.sessions(new Date(since));
if (exported === null)
throw new Error(
"token-max is not installed, so no record can be priced; install it with `cargo install --locked --git https://github.com/kixel-ai/token-max`",
"token-max is not installed, so no record can be priced; install it with `cargo install --locked token-max`",
);
const { kept } = fold(exported);
const byId = new Map(kept.flatMap((s) => (s.id === null ? [] : [[`${s.harness}\0${s.id}`, s] as const])));
Expand Down
2 changes: 1 addition & 1 deletion src/cli/usage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export interface UsageDependencies extends ClaimDependencies {

/** The install hint printed when token-max is missing. */
export const TOKEN_MAX_MISSING =
"token-max is not installed, so no session tokens or cost are reported; install it with `cargo install --locked --git https://github.com/kixel-ai/token-max`";
"token-max is not installed, so no session tokens or cost are reported; install it with `cargo install --locked token-max`";

/** The local date `days` before `now`, as `YYYY-MM-DD`. */
export function daysBefore(now: Date, days: number): string {
Expand Down