First Agent Run

Conceptual

An annotated end-to-end run: plan, execution, verification and delivered artifacts.

This page walks through a single realistic run — diagnosing and fixing a failing service — and shows what the trace looks like at each stage.

The objective#

ts
const task = await pimsy.tasks.create({
  objective:
    class="tok-str">"The checkout service returns class="tok-num">500 on POST /orders for guest users. " +
    class="tok-str">"Find the cause, fix it, add a regression test and open a pull request.",
  capabilities: [class="tok-str">"code.execute", class="tok-str">"files.write", class="tok-str">"connector.github"],
  budget: { steps: class="tok-num">60, wallClockSeconds: class="tok-num">1800 },
  approvals: { required: [class="tok-str">"git.push", class="tok-str">"pull_request.open"] }
});

Generated plan#

plan.created
{
  class="tok-str">"steps": [
    { class="tok-str">"id": class="tok-str">"s1", class="tok-str">"title": class="tok-str">"Clone repository and inspect service layout", class="tok-str">"tool": class="tok-str">"github.clone" },
    { class="tok-str">"id": class="tok-str">"s2", class="tok-str">"title": class="tok-str">"Reproduce failure locally", class="tok-str">"depends_on": [class="tok-str">"s1"], class="tok-str">"tool": class="tok-str">"sandbox.exec" },
    { class="tok-str">"id": class="tok-str">"s3", class="tok-str">"title": class="tok-str">"Collect stack trace and correlate with recent commits", class="tok-str">"depends_on": [class="tok-str">"s2"] },
    { class="tok-str">"id": class="tok-str">"s4", class="tok-str">"title": class="tok-str">"Form and rank hypotheses", class="tok-str">"depends_on": [class="tok-str">"s3"] },
    { class="tok-str">"id": class="tok-str">"s5", class="tok-str">"title": class="tok-str">"Implement minimal fix", class="tok-str">"depends_on": [class="tok-str">"s4"], class="tok-str">"tool": class="tok-str">"files.write" },
    { class="tok-str">"id": class="tok-str">"s6", class="tok-str">"title": class="tok-str">"Add regression test", class="tok-str">"depends_on": [class="tok-str">"s5"] },
    { class="tok-str">"id": class="tok-str">"s7", class="tok-str">"title": class="tok-str">"Run full test suite", class="tok-str">"depends_on": [class="tok-str">"s6"], class="tok-str">"verify": class="tok-str">"tests_pass" },
    { class="tok-str">"id": class="tok-str">"s8", class="tok-str">"title": class="tok-str">"Open pull request", class="tok-str">"depends_on": [class="tok-str">"s7"], class="tok-str">"approval": class="tok-str">"required" }
  ]
}

Execution trace#

run_7c1a9d — trace
00:00:04  step.started        s1  Clone repository and inspect service layout
00:00:11  tool.called         github.clone            6.8s   ok
00:00:19  step.started        s2  Reproduce failure locally
00:00:52  tool.called         sandbox.exec            31.4s  exit=1
00:00:53  observation         500 InternalServerError reproduced (12/12 attempts)
00:01:02  step.started        s3  Collect stack trace and correlate commits
00:01:24  observation         NullReference in GuestCheckout.resolveTaxProfile
00:01:25  observation         introduced in 9f31c2a "inline tax profile lookup"
00:01:31  step.started        s4  Form and rank hypotheses
00:01:48  reasoning           3 hypotheses; H1 confidence 0.81
00:02:02  step.started        s5  Implement minimal fix
00:02:40  tool.called         files.write             0.3s   ok  (2 files)
00:02:44  step.started        s6  Add regression test
00:03:12  tool.called         files.write             0.2s   ok  (1 file)
00:03:15  step.started        s7  Run full test suite
00:05:38  tool.called         sandbox.exec            142s   exit=0
00:05:39  verification        tests_pass              PASS  (318 passed, 0 failed)
00:05:41  approval.requested  s8  pull_request.open
00:07:10  approval.granted    s8  by user_4812
00:07:19  tool.called         github.pull_request     2.1s   ok  #1284
00:07:20  task.completed      artifacts=3  confidence=high

Note step s8: the runtime paused rather than pushing. Approval gates are declared on the task and enforced by the policy engine, not negotiated by the model.

Result#

Root cause
resolveTaxProfile dereferenced a null guest profile introduced in 9f31c2a
Change
2 source files, 1 test file, 34 lines net
Verification
318 tests passed; regression test fails on the pre-fix commit
Artifacts
Patch, test file, pull request #1284
Confidence
High — failure reproduced and fix demonstrated against the reproduction

Last updated 2026-09-15