Alembic
reduce noisy shell output before your coding agent burns context on it
Before & After •
Why Alembic •
Install •
First Benchmark •
Levels •
Flags •
Effort •
Presets •
Usage •
Benchmarks •

Alembic is a skill-first, local noise-reduction tool for Codex and Claude. It takes test floods, CI logs, MCP chatter, stack traces, diffs, watch output, Docker logs, and Kubernetes logs, then compresses them into the smallest artifact that still answers the question you asked.
Why Alembic
Most agent loops do not fail because the model is weak. They fail because the model is forced to read too much noise.
Alembic exists to fix that:
- reduce passing-test floods to the one line that matters
- collapse CI logs into the failing job, step, command, and reason
- turn giant MCP JSON payloads into the rows you actually asked for
- shrink watch-mode churn so repeated checks stop burning context
- benchmark the savings on your own repo instead of asking you to trust a screenshot
Why this matters:
- less output to read means less context wasted
- smaller answers are usually faster to process in tight loops
- noisy logs stop hiding the real failure
- benchmark mode gives you a direct proof of value on your own workflows
Before And After
Alembic is useful when raw output is much larger than the decision you need to make.
Tests
Before:
[... 180 passing test lines omitted ...]
FAIL src/auth/session.test.ts > rejects expired token
AssertionError: expected 401 to equal 403
[... stack trace omitted ...]
After:
FAIL src/auth/session.test.ts > rejects expired token
Why this helps: the agent keeps the failing test and loses the flood.
GitHub Actions
Before:
[... 400 setup, cache, install, and cleanup lines omitted ...]
build Run pnpm test 2026-04-11T15:10:04.000Z pnpm test
build Run pnpm test 2026-04-11T15:10:07.000Z FAIL src/auth/session.test.ts > rejects expired token
build Run pnpm test 2026-04-11T15:10:07.100Z AssertionError: expected 401 to equal 403
build Run pnpm test 2026-04-11T15:10:08.000Z Error: Process completed with exit code 1.
After:
FAIL Job: build
Step: Run pnpm test
Command: pnpm test
Reason: FAIL src/auth/session.test.ts > rejects expired token
Exit: 1
Why this helps: it turns a whole workflow log into the single failing step and reason.
MCP Tool Response Data
MCP tool calls return large JSON payloads full of wrapper fields. Alembic auto-detects JSON responses and compacts them to a readable list.
Before (raw response from an MCP tool call):
{"issues":[{"id":"PAYMENTS-17","title":"TypeError: Cannot read properties of undefined (reading 'id')","level":"error","status":"unresolved","count":"137","userCount":29,"firstSeen":"2026-04-01T09:00:00.000Z","lastSeen":"2026-04-10T14:22:00.000Z","culprit":"payments/checkout.tsx in submitPayment","project":{"slug":"web-app"}},{"id":"API-42","title":"TimeoutError: upstream request exceeded 30s","level":"warning","status":"regressed","count":"54","userCount":7,"firstSeen":"2026-04-08T10:15:00.000Z","lastSeen":"2026-04-10T13:57:00.000Z","culprit":"api/routes/orders.ts in createOrder","project":{"slug":"backend-api"}}]}
After:
[unresolved]
PAYMENTS-17 | TypeError: Cannot read properties of undefined (reading 'id') | error | 137 events
[regressed]
API-42 | TimeoutError: upstream request exceeded 30s | warning | 54 events
Why this helps: wrapper fields, IDs, timestamps, and metadata disappear. The rows you asked for stay.
MCP Error Logs
Before:
[... session setup omitted ...]
[MCP] tool=list_issues server=sentry request_id=abc123
[MCP] error=permission_denied project=web-app endpoint=issues
[MCP] retry attempt 1/3
[MCP] retry attempt 2/3 error=timeout
After:
MCP FAIL list_issues
Server: sentry
Target: project=web-app endpoint=issues
Reason: [MCP] error=permission_denied project=web-app endpoint=issues
Next: [MCP] retry attempt 1/3
Why this helps: the failing tool, target, and reason are preserved. Retry chatter disappears.
Docker
Before:
[... image pull and layer cache lines omitted ...]
Step 7/10 : RUN pnpm build
---> Running in 123456789abc
src/server.ts:12:3 error TS2304: Cannot find name 'window'.
The command '/bin/sh -c pnpm build' returned a non-zero code: 2
[... cleanup omitted ...]
After:
DOCKER FAIL unknown service
Step: Step 7/10 : RUN pnpm build
Command: pnpm build
Reason: src/server.ts:12:3 error TS2304: Cannot find name 'window'.