Learning path map
Detailed content
🎚️ Right model, make your quota go further
The ROTEAMENTO.md: four model levels in Claude Code, Codex, and Ollama, and four rules for using less quota without losing quality.
Each call uses up your subscription quota, the usage limit for a given period. It isn’t pay-per-use like the API.
Always using the strongest model exhausts your quota too soon and holds up the day's work.
Quota, subscription, API, per-call usage.
The ROTEAMENTO.md table: when to use each level and which model corresponds to it in Claude Code, Codex, and Ollama (local, free).
With the table at hand, you choose the model for the task, not out of habit.
Model tier, effort, local model, Ollama.
Rule 1: triage, formatting, and checks go to the smallest model; you move up a level only when it gets something wrong.
Most everyday tasks fit into the lower levels, leaving quota available for the hard ones.
Smallest fix that works, escalate, triage.
Rule 3: a review by another model, such as Codex through the bridge in Recipe R1, catches errors the same model misses.
A model tends to agree with itself; a second opinion breaks that blind spot.
Second opinion, codex-exec bridge, blind spot.
Rules 2 and 4: use an agent team only when the work outweighs the cost of assembling the team, and an agent inside another agent carries the project instructions.
A team for a small task only multiplies consumption; a lean folder or --bare mode makes simple bridges lighter.
Cost of assembling the team, lean folder, --bare.
Check the model names with claude --help and codex --help and update the ROTEAMENTO.md table.
Models get renamed and replaced; an outdated table tells the agent to request a model that no longer exists.
--help, model name, live table.
👥 Three-role team
Recipe R2: a planner, an executor, and a reviewer, each using the model they need, running in a single Claude Code session.
Three Claude Code subagents: the planner (strong) plans, the executor (medium) does the work, and the reviewer (light) checks it.
Each role uses the model it needs, and your quota goes further than with one powerful model doing everything.
Subagent, role, planner, executor, reviewer.
The three files in .claude/agents/, with each role’s name, description, model, tools, and instructions.
By reading the files, you can see what each role can do: the planner and reviewer only read, while the executor makes changes (N3).
Role file, model:, tools, N3.
Open claude in the folder and ask the team to create saudacao.txt with the phrase "Hello, INEMA community".
It’s the easiest way to see the three roles work in sequence, with the reviewer closing with APPROVED.
Interactive session, test, APPROVED.
The same request in a single command, using claude -p and ending with the reviewer’s response.
Without a screen, the team can be called by script; the kit’s test cost the equivalent of ~US$ 0,73 in API usage, which counts against your subscription quota.
-p, headless execution, cat saudacao.txt, quota.
Switch the task: Sônia summarizes the ERP CSV while the reviewer checks the totals; Clara lists available time slots while the reviewer checks that no busy slots appear.
The team is only worthwhile when it solves your real work, with a check you understand.
Real task, verification, totals, occupied time.
Edit the model: line for a role (haiku, sonnet, opus, or inherit), and copy a file from .claude/agents/ to create a new role.
The team adapts to your case without programming: just edit the text.
model:, inherit, new role, description.
🧵 Background team
Recipe R4: multiple sessions with claude --bg, each with a name, mode, and model, monitored by observar.mjs.
The official version of what mod videos called "Threads": sessions that work independently in the background.
It’s a documented command: it won’t break in the next update like the improvised thread in the videos.
Session, background, id, via the official route.
Open claude in the folder once and switch the option "No, exit" to "Yes, I trust this folder".
Without this, --bg returns Workspace not trusted and no session starts.
Trusted folder, trust warning, Workspace not trusted.
Two command lines: a reviewer in plan mode that only reads, and an executor on sonnet that creates resumo.md.
Name, mode, and model per session apply to POLICY and ROUTING; and Claude refuses -p together with --bg.
--bg, --permission-mode plan, --model, --name.
observar.mjs shows the ID, type, name, status, and age of each session in this folder (or all sessions, with --todas).
In the background, no one sees a session stall; the status column shows working, idle, done, blocked, or failed.
observar.mjs, state, blocked, --todas.
Three commands with the table ID: claude logs reads the screen, claude attach joins the session, and claude stop stops it.
You unblock a blocked item, read a done response, and stop a session that's only burning quota.
logs, attach, stop, /painel.
Each session writes to a file, and a lead session (or the R2 team) consolidates and checks everything at the end.
Each session uses quota: start with R2 and only launch parallel sessions when the work justifies it.
Per-session file, lead session, consolidate, quota.
🎯 Long-running agent with verification
Recipe R6: a goal with command → output criteria, verificar.mjs as the judge, and human checkpoints written into the goal itself.
For tasks that take hours, the agent loses details and declares "done" early; R6 only accepts completion when the criteria prove it.
An error discovered only during use costs more than an automatic check at each step.
Goal, criteria, exit codes 0 and 1, human gate.
One list line per criterion, with the command and expected text in backticks, separated by an arrow.
A good criterion is yes or no, and impossible to pass without doing the work; “make it good” isn’t a criterion.
Verifiable criterion, expected text, example goal.
Run verificar.mjs on the sample goal, which checks Clara’s calendar connection, Sônia’s total, and doctor.
The script doesn’t call a model or use up quota: you test the judge before handing the goal to the agent.
verificar.mjs, OK, count, exit code 0.
Change an expected value in a copy of the goal and see the line turn to FAIL, with exit code 1, as proven in CHANGELOG 0.2.0.
A judge that never rejects anything is no good; you confirm that it catches the error.
Goal copy, FAILURE, expected, output 1.
The R6 /goal request: complete the goal, run the verifier after each step, and stop only when everything is OK or at a human checkpoint.
Works in Claude Code and Codex because the same script acts as the judge for both.
/goal, a do-verify-fix loop, long-running execution.
Stop phrases written in the goal for spending, sending, deleting, and publishing, and one entry in FALHAS.md or LIMITES.md for every problem.
An agent that pursues OK for hours can't decide on its own what is irreversible.
Human gate, POLITICA cap, FALHAS.md, LIMITES.md.