tune
ax:tune - what to change in the rig after one session
The user has asked to tune the rig. You read what one session actually did, name the changes to the agent's environment (hooks, checks, steering files, tools, access) that would make the next run cheaper or safer, and file every candidate in ax so it is triageable later. The session log is the primary source; ax is the ledger.
Steps
-
Call the Skill tool with
writing-for-agentsfor the writing style. -
Locate the session. Default is the current one: the id is
$CLAUDE_CODE_SESSION_IDand the log is~/.claude/projects/<cwd-slug>/<id>.jsonl. If the user names another session, take its key. Done when you hold a path that exists. -
Make it reviewable in ax, scoped. Run
ax ingest herein the background (the bareax ingestwalks every transcript on the machine). Watch its RSS; stop it at 4 GB and record that as a Tool economy finding against ax itself. Continue on the raw log while it runs. -
Build the ledger. Run
python3 -I scripts/turns.py <log>(add--fullto see each command). It prints one line per tool call withERR,DENY,RETRY,AGENT,BIGflags and a summary of calls, flags and tokens. When ax has the session, addax sessions show session:<id> --turns --jsonfor timings. Done when every flagged line has a cause you can state. -
Hunt candidates in these categories, each with evidence from the ledger (turn, tool calls spent, bytes or tokens wasted) and a fix that names a file.