# Agents that write production-quality code

URL: https://getunblocked.com/outcomes/mergeable-code

Without context, agents generate implementations that break patterns, miss dependencies, and fail tests. Unblocked gives them architectural decisions and conventions so the first draft actually fits.

---

**Tag:** Outcome

## The Problem

Without context, agents generate implementations that break patterns, miss dependencies, and fail tests.

Unblocked gives them the architectural decisions and conventions behind your system so the first draft actually fits.

**Without Unblocked:**
- Broke backwards compatibility
- 12 compilation failures
- Cascading module breaks
- Result: FAILED

**With Unblocked:**
- Backwards compatibility preserved
- Tests pass across modules
- Matches team patterns
- Result: PASSED

## The Experiment

We ran the same engineering task twice: once with Unblocked and once without it, using the same coding agent, codebase, and prompt.

**Task:** Add adaptive thinking mode with backwards compatibility for budget_token.

**Without Unblocked plan:**
- Auto-detect adaptive mode for 4.6 models
- Convert ReasoningEffort to auto-switch
- Add custom serializers for null handling
- Add unit tests for thinking mode

**Without Unblocked results:**
- Broke backwards compat (auto-detect, no opt-in)
- 12 compilation failures across modules
- Cascading Bedrock module breaks
- Batch provider API redesigned 3 times
- Unnecessary custom serializers added

**With Unblocked plan:**
- Opt-in via useAdaptiveThinking: Boolean
- Model-aware config (supportsAdaptive flag)
- All modules: direct API, Bedrock, batch
- 19 unit tests + API integration tests
- Nullable fields via kotlinx defaults

**With Unblocked results:**
- Opt-in preserves all existing behavior
- Caught batch provider gap in plan review
- No custom serializers needed (simpler)
- Extension functions match team patterns

## Quality Scorecard

Four criteria any engineer expects:

| Criterion | Without Unblocked | With Unblocked |
|-----------|-------------------|----------------|
| Validation & Integration Tests | 2.5/10 — Unit tests only, bugs in 2 of 3 modules would ship undetected | 9/10 — 19 unit tests + API integration tests across all 3 modules |
| Doesn't Break Existing Implementation | 2/10 — Auto-detect silently changed behavior for all budget_token callers | 9/10 — Opt-in default preserves all existing behavior |
| DRY Code, High Quality Bar | 3.5/10 — Added custom serializers the team doesn't use | 9/10 — Used kotlinx defaults and existing serialization patterns |
| Respects Our Conventions | 2/10 — Factory method pattern foreign to codebase, 12 compilation failures | 9/10 — Extension functions match existing team patterns |

## Related Outcomes

- Reduce rework: <https://getunblocked.com/outcomes/reduce-rework>
- Save tokens: <https://getunblocked.com/outcomes/save-tokens>

## Get Started

- Start a free trial: <https://getunblocked.com/dashboard/get-started>
- MCP setup: <https://getunblocked.com/unblocked-mcp>
- Pricing: <https://getunblocked.com/pricing>
