PTENES
Skip to content
TRACK 3

⚙️ Route and execute

With the bridges connected, you still need to decide who does the work and how to prove it’s finished. Choose the right model to make the most of your quota, build a team of three roles, launch background sessions, and let an agent work for hours until verification passes.

4
Modules
24
Topics
~2h20
Duration
Medium
Level
0 of 240%
super top executor smaller start here 🧭 planner 🛠️ executor 🔍 reviewer verify 4/4 OK right model · team working in parallel · proven done

Learning path map

Detailed content

3.1~35 min

🎚️ 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.

0 of 60%
What it is:

Each call uses up your subscription quota, the usage limit for a given period. It isn’t pay-per-use like the API.

Why learn:

Always using the strongest model exhausts your quota too soon and holds up the day's work.

Key concepts:

Quota, subscription, API, per-call usage.

What it is:

The ROTEAMENTO.md table: when to use each level and which model corresponds to it in Claude Code, Codex, and Ollama (local, free).

Why learn:

With the table at hand, you choose the model for the task, not out of habit.

Key concepts:

Model tier, effort, local model, Ollama.

What it is:

Rule 1: triage, formatting, and checks go to the smallest model; you move up a level only when it gets something wrong.

Why learn:

Most everyday tasks fit into the lower levels, leaving quota available for the hard ones.

Key concepts:

Smallest fix that works, escalate, triage.

What it is:

Rule 3: a review by another model, such as Codex through the bridge in Recipe R1, catches errors the same model misses.

Why learn:

A model tends to agree with itself; a second opinion breaks that blind spot.

Key concepts:

Second opinion, codex-exec bridge, blind spot.

What it is:

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.

Why learn:

A team for a small task only multiplies consumption; a lean folder or --bare mode makes simple bridges lighter.

Key concepts:

Cost of assembling the team, lean folder, --bare.

What it is:

Check the model names with claude --help and codex --help and update the ROTEAMENTO.md table.

Why learn:

Models get renamed and replaced; an outdated table tells the agent to request a model that no longer exists.

Key concepts:

--help, model name, live table.

View Full
3.2~35 min

👥 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.

0 of 60%
What it is:

Three Claude Code subagents: the planner (strong) plans, the executor (medium) does the work, and the reviewer (light) checks it.

Why learn:

Each role uses the model it needs, and your quota goes further than with one powerful model doing everything.

Key concepts:

Subagent, role, planner, executor, reviewer.

What it is:

The three files in .claude/agents/, with each role’s name, description, model, tools, and instructions.

Why learn:

By reading the files, you can see what each role can do: the planner and reviewer only read, while the executor makes changes (N3).

Key concepts:

Role file, model:, tools, N3.

What it is:

Open claude in the folder and ask the team to create saudacao.txt with the phrase "Hello, INEMA community".

Why learn:

It’s the easiest way to see the three roles work in sequence, with the reviewer closing with APPROVED.

Key concepts:

Interactive session, test, APPROVED.

What it is:

The same request in a single command, using claude -p and ending with the reviewer’s response.

Why learn:

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.

Key concepts:

-p, headless execution, cat saudacao.txt, quota.

What it is:

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.

Why learn:

The team is only worthwhile when it solves your real work, with a check you understand.

Key concepts:

Real task, verification, totals, occupied time.

What it is:

Edit the model: line for a role (haiku, sonnet, opus, or inherit), and copy a file from .claude/agents/ to create a new role.

Why learn:

The team adapts to your case without programming: just edit the text.

Key concepts:

model:, inherit, new role, description.

View Full
3.3~35 min

🧵 Background team

Recipe R4: multiple sessions with claude --bg, each with a name, mode, and model, monitored by observar.mjs.

0 of 60%
What it is:

The official version of what mod videos called "Threads": sessions that work independently in the background.

Why learn:

It’s a documented command: it won’t break in the next update like the improvised thread in the videos.

Key concepts:

Session, background, id, via the official route.

What it is:

Open claude in the folder once and switch the option "No, exit" to "Yes, I trust this folder".

Why learn:

Without this, --bg returns Workspace not trusted and no session starts.

Key concepts:

Trusted folder, trust warning, Workspace not trusted.

What it is:

Two command lines: a reviewer in plan mode that only reads, and an executor on sonnet that creates resumo.md.

Why learn:

Name, mode, and model per session apply to POLICY and ROUTING; and Claude refuses -p together with --bg.

Key concepts:

--bg, --permission-mode plan, --model, --name.

What it is:

observar.mjs shows the ID, type, name, status, and age of each session in this folder (or all sessions, with --todas).

Why learn:

In the background, no one sees a session stall; the status column shows working, idle, done, blocked, or failed.

Key concepts:

observar.mjs, state, blocked, --todas.

What it is:

Three commands with the table ID: claude logs reads the screen, claude attach joins the session, and claude stop stops it.

Why learn:

You unblock a blocked item, read a done response, and stop a session that's only burning quota.

Key concepts:

logs, attach, stop, /painel.

What it is:

Each session writes to a file, and a lead session (or the R2 team) consolidates and checks everything at the end.

Why learn:

Each session uses quota: start with R2 and only launch parallel sessions when the work justifies it.

Key concepts:

Per-session file, lead session, consolidate, quota.

View Full
3.4~35 min

🎯 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.

0 of 60%
What it is:

For tasks that take hours, the agent loses details and declares "done" early; R6 only accepts completion when the criteria prove it.

Why learn:

An error discovered only during use costs more than an automatic check at each step.

Key concepts:

Goal, criteria, exit codes 0 and 1, human gate.

What it is:

One list line per criterion, with the command and expected text in backticks, separated by an arrow.

Why learn:

A good criterion is yes or no, and impossible to pass without doing the work; “make it good” isn’t a criterion.

Key concepts:

Verifiable criterion, expected text, example goal.

What it is:

Run verificar.mjs on the sample goal, which checks Clara’s calendar connection, Sônia’s total, and doctor.

Why learn:

The script doesn’t call a model or use up quota: you test the judge before handing the goal to the agent.

Key concepts:

verificar.mjs, OK, count, exit code 0.

What it is:

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.

Why learn:

A judge that never rejects anything is no good; you confirm that it catches the error.

Key concepts:

Goal copy, FAILURE, expected, output 1.

What it is:

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.

Why learn:

Works in Claude Code and Codex because the same script acts as the judge for both.

Key concepts:

/goal, a do-verify-fix loop, long-running execution.

What it is:

Stop phrases written in the goal for spending, sending, deleting, and publishing, and one entry in FALHAS.md or LIMITES.md for every problem.

Why learn:

An agent that pursues OK for hours can't decide on its own what is irreversible.

Key concepts:

Human gate, POLITICA cap, FALHAS.md, LIMITES.md.

View Full
← Previous track: Connect Next learning path: Govern and learn →