{
  "schemaVersion": "1",
  "revision": "22ce5d34dbcb5a78",
  "id": "codex-imp-workflows-practice",
  "slug": "imp-workflows-practice",
  "title": "Narrow Imp agents and routing: practice drills",
  "summary": "Exercises covering Codex-versus-Imp selection, health checks, routing and execution modes, dash-prefix hooks, bounded marker packets, fleet management, evolution review, narrow Imp design, failure recovery, tests, and final handoff receipts.",
  "category": "Execution",
  "tags": [
    "imps",
    "routing",
    "isolation",
    "practice"
  ],
  "sources": [
    {
      "label": "Portable Codex workflow resources",
      "url": "https://lapis-fossil-vsbc.here.now/downloads/codex-power-user-workshop-2026-06-27.bundle"
    }
  ],
  "sourceUnits": [
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 1: Regular Codex Or Imp?",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 2: Check Health",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 3: Route Before Running",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 4: Run `imp-rg`",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 4A: Single-Dash Hook Route",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 4B: Double-Dash Fork Route",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 4C: Unknown Or Ambiguous Imp",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 5: Section 8 Marker Packet To Imp",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 6: Fleet Management",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 7: Inspect Evolution Suggestions",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 8: Design A New Imp",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 9: Failure Path Drill",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 10: Verify The Imp Project Safety Net",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Exercise 11: Final Handoff",
    "downloads/codex-power-user-workshop-2026-06-27.bundle!/exercises/09-imps.md#Exercises: 09. Imps/Final Check",
    "downloads/codex-power-user-workshop-2026-06-27.bundle"
  ],
  "collection": "codex",
  "categoryId": "execution",
  "wordCount": 1542,
  "url": "/topics/codex-imp-workflows-practice/",
  "markdownUrl": "/markdown/codex-imp-workflows-practice.md?raw=1&v=22ce5d34dbcb5a78",
  "jsonUrl": "/api/v1/documents/codex-imp-workflows-practice.json",
  "headings": [
    {
      "id": "exercise-1-regular-codex-or-imp",
      "text": "Exercise 1: Regular Codex Or Imp?",
      "level": 2
    },
    {
      "id": "exercise-2-check-health",
      "text": "Exercise 2: Check Health",
      "level": 2
    },
    {
      "id": "exercise-3-route-before-running",
      "text": "Exercise 3: Route Before Running",
      "level": 2
    },
    {
      "id": "exercise-4-run-imp-rg",
      "text": "Exercise 4: Run `imp-rg`",
      "level": 2
    },
    {
      "id": "exercise-4a-single-dash-hook-route",
      "text": "Exercise 4A: Single-Dash Hook Route",
      "level": 2
    },
    {
      "id": "exercise-4b-double-dash-fork-route",
      "text": "Exercise 4B: Double-Dash Fork Route",
      "level": 2
    },
    {
      "id": "exercise-4c-unknown-or-ambiguous-imp",
      "text": "Exercise 4C: Unknown Or Ambiguous Imp",
      "level": 2
    },
    {
      "id": "exercise-5-section-8-marker-packet-to-imp",
      "text": "Exercise 5: Section 8 Marker Packet To Imp",
      "level": 2
    },
    {
      "id": "exercise-6-fleet-management",
      "text": "Exercise 6: Fleet Management",
      "level": 2
    },
    {
      "id": "exercise-7-inspect-evolution-suggestions",
      "text": "Exercise 7: Inspect Evolution Suggestions",
      "level": 2
    },
    {
      "id": "exercise-8-design-a-new-imp",
      "text": "Exercise 8: Design A New Imp",
      "level": 2
    },
    {
      "id": "exercise-9-failure-path-drill",
      "text": "Exercise 9: Failure Path Drill",
      "level": 2
    },
    {
      "id": "exercise-10-verify-the-imp-project-safety-net",
      "text": "Exercise 10: Verify The Imp Project Safety Net",
      "level": 2
    },
    {
      "id": "exercise-11-final-handoff",
      "text": "Exercise 11: Final Handoff",
      "level": 2
    },
    {
      "id": "final-check",
      "text": "Final Check",
      "level": 2
    },
    {
      "id": "related-resources",
      "text": "Related resources",
      "level": 2
    }
  ],
  "markdown": "# Narrow Imp agents and routing: practice drills\n\nThese exercises practice routing narrow tool-shaped work to Imps.\n\n## Exercise 1: Regular Codex Or Imp?\n\nChoose `regular Codex` or `Imp`.\n\n| Task | Choice | Why |\n| --- | --- | --- |\n| Find every place checkout disabled state is computed. | | |\n| Decide which checkout architecture to use. | | |\n| Summarize current git dirty state. | | |\n| Implement saved payment methods. | | |\n| Query JSON for users by plan. | | |\n| Trim a video file. | | |\n| Explain product risk of auth/session rotation. | | |\n| Find GitHub examples of a file pattern. | | |\n\n## Exercise 2: Check Health\n\nRun:\n\n```bash\nimp -l\nimps list\nimps ps\nimps doctor\n```\n\nFill out:\n\n```markdown\n# Imp Health\n\n- roster visible? yes/no:\n- warm processes:\n- doctor status:\n- auth status:\n- command that failed:\n- next check:\n```\n\n## Exercise 3: Route Before Running\n\nRun:\n\n```bash\nimp --which \"what changed in git since yesterday?\"\nimp --which \"find the TODOs in src; then commit everything\"\nimp --which \"find examples of DESIGN.md created in the past 2 months\"\n```\n\nFill out:\n\n```markdown\n# Routing Notes\n\n- prompt:\n- chosen Imp:\n- compound route? yes/no:\n- split points:\n- would you run it? yes/no:\n- why:\n```\n\n## Exercise 4: Run `imp-rg`\n\nRun:\n\n```bash\nimp-rg --run \"find TODOs in src\"\n```\n\nQuiet mode:\n\n```bash\nimp-rg -q \"find TODOs in src\"\n```\n\nNo warm mode:\n\n```bash\nimp-rg --no-warm \"find TODOs in src\"\n```\n\nFill out:\n\n```markdown\n# imp-rg Notes\n\n- command:\n- files searched:\n- matches:\n- exact command evidence present? yes/no:\n- when to use `--run`:\n- when to use `-q`:\n- when to use `--no-warm`:\n```\n\n## Exercise 4A: Single-Dash Hook Route\n\nSubmit a foreground Imp prompt from Codex:\n\n```text\n-rg find TODOs in src\n```\n\nFill out:\n\n```markdown\n# Single-Dash Hook Notes\n\n- prompt:\n- resolved Imp:\n- executable path included? yes/no:\n- description included? yes/no:\n- task text preserved? yes/no:\n- cwd included? yes/no:\n- did the main prompt continue? yes/no:\n- did the main agent avoid rediscovering the Imp? yes/no:\n- command evidence returned:\n```\n\n## Exercise 4B: Double-Dash Fork Route\n\nSubmit a forked Imp prompt from Codex:\n\n```text\n--rg find TODOs in src\n```\n\nFill out:\n\n```markdown\n# Double-Dash Fork Notes\n\n- original prompt:\n- normalized fork prompt:\n- did current prompt block? yes/no:\n- workspace:\n- pane:\n- surface:\n- window:\n- read-screen command:\n- top command:\n- focus-pane command:\n- what output appeared in the fork:\n```\n\n## Exercise 4C: Unknown Or Ambiguous Imp\n\nTry an intentionally unclear route:\n\n```text\n-g find TODOs in src\n```\n\nFill out:\n\n```markdown\n# Ambiguous Route Notes\n\n- prompt:\n- blocked? yes/no:\n- suggested matches:\n- would you clarify, use `imp --which`, or create with `imp-create`?\n- corrected prompt:\n```\n\n## Exercise 5: Section 8 Marker Packet To Imp\n\nStart with a bounded marker packet.\n\n```markdown\n# Marker Packet\n\n- marker id:\n- marker label: Checkout button stayed disabled\n- marker note:\n- nearby evidence terms:\n  - acceptedTerms\n  - selectedShipping\n  - checkout disabled\n- privacy boundary:\n  - storage values exported? no\n  - request bodies exported? no\n  - response bodies exported? no\n```\n\nRoute:\n\n```bash\nimp --which \"find code paths related to acceptedTerms, selectedShipping, and checkout disabled\"\n```\n\nRun:\n\n```bash\nimp-rg --run \"Search for acceptedTerms, selectedShipping, and checkout disabled. Return file:line matches and exact rg commands used.\"\n```\n\nFill out:\n\n```markdown\n# Marker Packet Imp Run\n\n- marker id:\n- chosen Imp:\n- exact command:\n- file:line evidence:\n- what the Imp must not infer:\n- next regular Codex task:\n```\n\n## Exercise 6: Fleet Management\n\nRun:\n\n```bash\nimps ps\nimps stop imp-rg\nimps stop --all\nimps doctor\n```\n\nFill out:\n\n```markdown\n# Fleet Management\n\n- warm imps before:\n- stopped:\n- warm imps after:\n- doctor status:\n- when to stop a warm Imp:\n```\n\n## Exercise 7: Inspect Evolution Suggestions\n\nRun:\n\n```bash\nimps evolve\nimps evolve imp-rg\n```\n\nFill out:\n\n```markdown\n# Evolution Review\n\n- suggestion path:\n- suggested change:\n- safe? yes/no:\n- keeps one tool? yes/no:\n- keeps command evidence? yes/no:\n- accept, edit, or reject:\n- why:\n```\n\n## Exercise 8: Design A New Imp\n\nPick one CLI tool.\n\nExamples:\n\n```text\nsqlite3\nredis-cli\ninternal search tool\nproject-specific deploy CLI\n```\n\nFill out:\n\n```markdown\n# New Imp Design\n\n- name: imp-\n- tool:\n- sandbox mode:\n- why this is single-purpose:\n- what this Imp must never do:\n- first safe command:\n- first verification command:\n\n## Operating Rule\n\nRun <tool> via exec_command before any final answer. Do not answer from memory.\n\n## Command Map\n\n| User Intent | Exact Command |\n| --- | --- |\n| status | |\n| list | |\n| inspect | |\n| help | |\n\n## Worked Examples\n\n### Example 1\n\n1.\n2.\n3.\n\n### Example 2\n\n1.\n2.\n3.\n\n## Error Recovery\n\n| Error Text | Next Command |\n| --- | --- |\n| command not found | |\n| unknown flag | |\n| no results | |\n\n## Output Rules\n\n-\n-\n-\n```\n\nAnswer:\n\n```markdown\n# Narrowness Review\n\n- does this use exactly one tool? yes/no:\n- does it need broad repo reasoning? yes/no:\n- should it be regular Codex instead? yes/no:\n- what to split out:\n```\n\n## Exercise 9: Failure Path Drill\n\nChoose a recovery for each failure.\n\n| Failure | Recovery |\n| --- | --- |\n| router picks the wrong Imp | |\n| prompt is too broad for an Imp | |\n| Imp answers without showing a command | |\n| warm server appears stale | |\n| auth.json missing | |\n| compound route split wrong | |\n| evolution suggestion looks unsafe | |\n| marker packet lacks nearby evidence terms | |\n| package Imp wants to mutate a pnpm project | |\n| ffmpeg Imp would overwrite input | |\n\nRecovery options:\n\n```text\nrun `imp --which`\nuse an explicit route\nsplit into smaller tool tasks\nsend broad reasoning back to regular Codex\nstrengthen Operating rule\nadd Worked examples\nrun `imps ps`\nrun `imps stop <imp>`\nrun `imps doctor`\nrewrite compound prompt with `;` or `then`\ndismiss unsafe evolution suggestions\nsharpen marker packet\ninspect lockfiles\nrequire new output file and no overwrite\nrun read-only checks only\n```\n\nFill out one in detail:\n\n```markdown\n# Failure Recovery Detail\n\n- failure:\n- likely cause:\n- first command:\n- recovery:\n- how to know it worked:\n```\n\n## Exercise 10: Verify The Imp Project Safety Net\n\nFrom the Imp project checkout, run:\n\n```bash\nbun test\n```\n\nFill out:\n\n```markdown\n# Test Check\n\n- command: `bun test`\n- pass count:\n- fail count:\n- test files:\n- router covered? yes/no:\n- parse args covered? yes/no:\n- CLI smoke covered? yes/no:\n- hot reload covered? yes/no:\n- evolution covered? yes/no:\n- would you edit routing without this passing? yes/no:\n- why:\n```\n\nOptional focused checks:\n\n```bash\nbun test test/router.test.ts\nbun test test/parseargs.test.ts\nbun test test/cli-smoke.test.ts\n```\n\nHook route checks:\n\n```text\n-rg find TODOs in src\n--rg find TODOs in src\n```\n\nFill out:\n\n```markdown\n# Dash Route Check\n\n- can explain `-<imp>`? yes/no:\n- can explain `--<imp>`? yes/no:\n- can inspect a forked cmux session? yes/no:\n- can explain why direct `codex fork ... -- '-imp ...'` is used? yes/no:\n```\n\n## Exercise 11: Final Handoff\n\nWrite a final handoff file:\n\n```bash\nmkdir -p receipts\ncat > receipts/section9-final-handoff.md <<'EOF'\n# Section 9 Final Imp Handoff\n\n- source: Section 8 marker packet\n- DebugSession path:\n- marker id:\n- marker label:\n- marker note:\n- expected:\n- actual:\n- nearbyEventIds:\n- evidence terms:\n  -\n  -\n  -\n- privacy boundary:\n  - storage values exported?\n  - request bodies exported?\n  - response bodies exported?\n- target Imp:\n- why this target is single-purpose:\n- command to run:\n- required output:\n- command evidence to preserve:\n- what the Imp must not invent:\n- next handoff after Imp result:\nEOF\n\ntest -s receipts/section9-final-handoff.md && echo \"handoff:OK\"\n```\n\nFill out:\n\n```markdown\n# Final Handoff Review\n\n- handoff file:\n- target Imp:\n- command:\n- route checked with `imp --which`? yes/no:\n- marker packet bounded? yes/no:\n- expected output clear? yes/no:\n- command evidence required? yes/no:\n- privacy boundary explicit? yes/no:\n- ready to run? yes/no:\n```\n\n## Final Check\n\nRun or review:\n\n```bash\nimp -l\nimps list\nimps ps\nimps doctor\nimp --which \"find TODOs in src; then summarize git changes\"\nbun test\n```\n\nFill out:\n\n```markdown\n# Final Imps Check\n\n- can explain regular Codex vs Imp? yes/no:\n- can state the core sentence? yes/no:\n- can route before running? yes/no:\n- can explain compound routing? yes/no:\n- can run direct interactive mode? yes/no:\n- can run `--run`? yes/no:\n- can run `-q`? yes/no:\n- can explain warm mode? yes/no:\n- can stop warm imps? yes/no:\n- can explain isolation? yes/no:\n- can inspect evolution suggestions? yes/no:\n- can design a narrow Imp prompt? yes/no:\n- can hand a Section 8 marker packet to an Imp? yes/no:\n- can decide when to return to regular Codex? yes/no:\n```\n\n## Related resources\n\n- [Companion reference](https://lapis-fossil-vsbc.here.now/downloads/codex-power-user-workshop-2026-06-27.bundle)\n- [Resource directory and portable download](/topics/codex-resources/)"
}
