Use when a claude or codex CLI update may have changed its prompt or busy-line text, when Corral misses a waiting/working state for a built-in provider, or when waitingPatterns or workingPatterns need changing. Recaptures real screens into fixtures instead of guessing regexes.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Recapture Agent Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adamleblanc-recapture-agent-patterns)
---
name: recapture-agent-patterns
description: Use when a claude or codex CLI update may have changed its prompt or busy-line text, when Corral misses a waiting/working state for a built-in provider, or when waitingPatterns or workingPatterns need changing. Recaptures real screens into fixtures instead of guessing regexes.
---
# Recapturing agent screen patterns
The fallback `waitingPatterns` / `workingPatterns` for the built-in providers live in `BUILTIN_PROVIDERS` in
`src/config/providers.ts`. They must match real screens saved in `test/unit/fixtures/`, checked by
`test/unit/config/waitingPatterns.test.ts`. Never write a pattern from memory.
1. Record the CLI versions: `claude --version` and `codex --version`.
2. Ask the author to launch a real Claude session and a real Codex session from Corral (the CLIs must be
authenticated; you can't do this part for them).
3. Ask them to trigger each screen you need: a permission prompt (e.g. "run `ls`"), Claude's folder-trust prompt
(a new folder), and a busy turn for working patterns.
4. Capture the agent pane while the screen is up: `tmux capture-pane -p -t <session>:<window>.<pane>`. The author
may paste the output to you. Save only the relevant lines to `test/unit/fixtures/claude-prompt.txt`,
`claude-trust.txt`, `codex-prompt.txt` (or a new descriptive file such as `codex-working.txt`).
5. Run `npx vitest run test/unit/config/waitingPatterns.test.ts`. A failure means the CLI reworded its screen.
6. Adjust the patterns in `src/config/providers.ts` until the fixture tests pass. Keep them narrow: the
"idle screens do not match" test must stay green; add idle/negative cases if the new text is generic.
7. Add a test case for any new fixture file in `test/unit/config/waitingPatterns.test.ts`, and update the
version comment at the top of that file.
8. Update the version note ("checked against claude X and codex-cli Y") in `docs/how-it-works.md`, Known
limitations, and the "provider fallback patterns" date/versions in `docs/manual-test.md`.
9. Run `npm run typecheck && npm test`, then commit as `fix: update <provider> fallback patterns for <version>`.