The live run never tried to apply. The gate is why that is not the safety story
A job-search agent drafts one application and stops. Its restraint in one live run proves little. The refusal written in code, and the test that calls it directly, prove the point.
A useful job-search assistant distinguishes finding roles, judging fit and preparing a draft from submitting an application. A saved run can demonstrate what it found and prepared without implying that every role was suitable.
On 20 October 2026 a model was asked to find the best roles across three recorded job sources, explain each fit and prepare one application draft. It searched, fetched fourteen listings, scored twelve, drafted a cover letter for one role, checked the one-page resume PDF and recorded the opportunity as drafted. It never tried to mark anything applied. The persona, employers and URLs are synthetic, and nothing was submitted or sent.
That restraint is pleasant, and it is not what makes the system safe. In the scripted lane, a fixed plan does try applied, and the host answers approval_required while the ledger stays where it was.
The claim is that an agent which prepares work for a person should be allowed one stage on its own evidence, drafted, and that every later stage should be refused in code unless a human supplies a decision the model has no tool to create. The model's good behaviour in one run is an observation. The refusal is a guarantee.
The argument
- In the live lane the model chooses the next tool, the listing ids and thresholds, the draft target, and the explanation, and the drafter and reviewer are model calls whose output is not trusted directly. Parsing, scoring, rendering and the ledger are deterministic code.
- The agent may record
draftedonly when that listing already has a draft and a render result in the run; the pass or fail of the PDF checks is recorded as the reason, not required.FREE_STAGESholds one entry. - Anything later needs a
HumanDecisionloaded by a person at the command line. The model can name a decision id, but it cannot make one. - A refusal is data, not an exception. The model sees a typed refusal, so it can choose again, and the gate stays closed.
Who is allowed to decide
Only one component here is an agent. In the live lane, a PydanticAI model on the Codex-credit route chooses the next tool call from the results it has observed. The instructions describe a goal and eight tools, tell the model not to apply, and give no fixed sequence. Besides the live tool-choosing model, the live drafter and reviewer are model calls, and the scripted lane is a fixed FunctionModel stand-in rather than a kit owner.
The figure marks the split. Look for the single agent box and for where the run stops.
Inside the dashed box, build_agent wires the model to the tools, and the model chooses the next call. To the right of the dashed box, the figure lists the six kit owners: listings, acquisition, fit_scoring, revision_loop, rendered_docs, and stage_pipeline. To the left of the dashed box, the persona card names Meera Iyer, calls the dataset synthetic, and says nothing was sent. The orange card says the run stops at applied and later with approval_required; the blue approval.py card says FREE_STAGES is drafted, a HumanDecision comes through the CLI, and the model has no decision tool.
The gate's typed codes are approval_required, decision_mismatch, decision_needs_human, and bad_decision for an empty decision id, listing id, or stage. With no decision for a gated stage, the answer is approval_required. A decision for another listing or stage gives decision_mismatch. A decision whose actor is not a human is rejected at construction as decision_needs_human. record_stage takes a listing id, a stage, and an optional decision id, and looks that id up in the decisions a person loaded. An invented id finds nothing.
The deterministic parts include a good deal of judgement-shaped work, and none of it is the agent. The table separates the two.
| Step | Who decides |
|---|---|
| Which tool next, which listing ids, which listing to draft | The model |
| Parsing the three sources, fan-out and duplicates | Code |
| Robots gate, acquisition ladder, sanitising listing text | Code |
| Scoring against the rubric (a keyword rule in both lanes) | Code |
| Edits to a draft: applied only on an exact single match, then audited for grounding and constraints | Code, even when a model wrote the draft |
| PDF compile and checks | Code |
Any stage after drafted | A person |
The drafter and reviewer inside draft_application are also model calls in the live lane, and the README is plain that their output is never trusted directly. The scripted lane replaces all of it with a stand-in that makes zero model calls. That stand-in exists for regression tests and is not evidence of reasoning.
What the evidence shows
There are two kinds of evidence, and they answer different questions. The live run shows what the model did. The gate test shows what it cannot do.
The recorded live run chose eight tools: search, acquire, follow-ups, score, shortlist, draft, render, record. It showed some real judgement. After acquisition reported one expired listing and one unreachable one, it left both out of scoring. After the shortlist produced a single survivor, it drafted for that one. The README also records that a development run the same day made a different, valid choice, re-running the shortlist at a lower threshold. One run is not a variance measurement, and the README says so.
None of that touches the gate, because the live model never asked for applied. The next figure shows the part that holds regardless.
Follow it from the left. draft_application ends with a clean stop reason. render_and_check reports that the PDF checks passed. record_stage for drafted is recorded, and then record_stage for applied is refused. The drafted step also has a precondition: without a draft and a render in the run, the tool returns draft_and_render_required. Without headless Chrome, rendering refuses with engine_unavailable and nothing is recorded as drafted.
The gate is enforced before the ledger opens or changes. A refusal comes back to the model as a dictionary with a refused code, not as a raised exception, so the model can read it and choose again. It cannot choose its way through.
The honest limit is on the tests themselves. The README lists the two test cases as written, not run in that document. Read them as the specification of the guard. The live run and the earlier markdown trace agree on the end state, a ledger at drafted with approval pending and follow-ups drafted but not sent, and that is an observation about one model on one day.
The known limits shape what the model sees. The rule scorer credits a term whenever a profile fact mentions it, including a fact that says no such code was written. Scores land near the answer key's bands and not on them. Name variants across sources are not merged by the kit's listing key, so the application adds its own organisation check to keep roles at tracked employers off the shortlist. None of these loosens the gate.
The turn we ran
The scripted lane runs the whole journey with no model. It is a FunctionModel named scripted-plan@1, and its plan is fixed in code. Listing ids in the scripted plan are taken from earlier tool results, while shortlist is called with fixed min_score 60 and limit 3.
Read the nine numbered steps in order: search, acquire, score, shortlist, draft, render, record as drafted, record as applied, and propose follow-ups. The eighth is the plan deliberately reaching for the stage it should not get. After the run, the test reads the shortlisted listing and expects its stage to be drafted, with applied pending. It expects a clean stop reason, a passing PDF check and no model calls. The scripted test keeps trace rows refused with approval_required and expects that list of stages to be exactly ["applied"].
That one trace carries both facts. The happy path to drafted succeeds with evidence, and the attempt to go further fails. Neither depends on how creative a live model feels that day, which is why the scripted plan includes the attempt that the live run never made.
The one check to copy
Copy the gate test, not the job-search nouns. Call the stage recorder directly, with no model in the loop and no decision loaded.
def test_record_stage_applied_without_decision_is_refused(tmp_path: Path) -> None:
deps = build_deps("scripted", runtime_root=tmp_path, run_id="gate-test")
tools.search_listings(deps)
out = tools.record_stage(deps, "tg-2105", "applied")
assert out["refused"] == "approval_required"
assert deps.ledger.record("tg-2105") is NoneThe test builds fresh run state, runs only the search so listings exist, and then calls record_stage itself. That bypass is the point: it shows the refusal lives in the tool and does not rely on the model behaving. The listing id is the one the live run drafted, but the assertion is about the mechanism. Wire your own stage machine and free stages, and keep the shape. Later stages need a decision object created outside the agent, and a test should call the recorder without one and prove the refusal.
Pair it with the long scripted case when you add tools. The long case shows that drafted can succeed with evidence. The short test calls record_stage for applied with no decision loaded and asserts approval_required with no ledger record.
Close
"The model applies for you" is the easy description. The code supports a narrower one. The live agent chooses tools, listing subsets and a draft target. Owners return scored, cited and sanitised facts. Seams may draft under audit, and record_stage may write drafted once a draft and a PDF check exist. Everything that looks like sending stops at approval_required until a person supplies a decision through the command line. Follow-ups stay drafts, and the tool reports zero sent.
Extend it by adding owner-backed tools, each with a test for the happy path and a test for the refusal. Do not extend it by giving the model a shortcut past the gate, and do not count a polite live run as the reason it is safe.
How is this page?
Last updated on