Leveraging AI as a "Context-Aware" Troubleshooter
8th October 2026

Modern engineering isn’t short of logs, alerts or dashboards. It’s short of time.

When something breaks in production, the clock starts ticking. Error logs surface. Monitoring tools light up. Slack channels fill with theories. The real challenge isn’t writing the fix, it’s tracing the invisible thread between data, infrastructure and code.

This is where augmentation matters.

In this instalment of our Augmented Engineer series, we explore how AI acted as a context-aware troubleshooter, not replacing the engineer, but accelerating diagnosis, reducing cognitive load and surfacing insights that would otherwise take far longer to uncover.

What follows isn’t about auto-generated magic. It’s about using AI to perform intelligent cross-file reasoning across logs, database records and source code to identify the root cause faster and propose safe, practical remediation paths.

What we did

What makes this fix interesting isn't just the shell script, it's how we got there. Instead of manually parsing through AWS CloudWatch logs and cross referencing them with our Python files, we used an AI agent to perform a "full stack" audit of the problem.

Screenshot 2026-09-14 091450.png

1. Identifying the "Invisible" Mismatch

AI excels at spotting what’s not there. When we fed the error logs to the assistant, it didn't just say "the data is wrong." It performed a cross-file analysis:

  • The DB Scan: It recognized the string "New document to review" was present in DynamoDB.
  • The Code Audit: It simultaneously scanned our Pydantic Enum definition (DocumentUploadReviewReference) and flagged that this specific string was missing from the class.

2. Proposing the Two-Path Strategy

Rather than forcing a single solution, the AI presented us with a strategic fork in the road:

  1. The Code Fix: Update the Enum to include the new value (ideal if the data is "correct" and the code is "old").
  2. The Data Fix: Clean the database to match the code (ideal if the data is "stale" or "dirty").

3. Generating the "Glue" Script

Once we decided to clean the data, the AI acted as a digital translator. On the surface, these commands seem straightforward, but the reality is far more "syntax-heavy."

The AI generated a precise script that:

  • Extracted the specific ID and Version keys required for the update.
  • Mapped the invalid string to a safe default ("General error").

Constructing a robust one-liner that bridges several different tools, piping an AWS DynamoDB scan into jq for deep object filtering, and then feeding those results into a while/read loop to execute an update-item is a minefield for typos.

The challenge isn't just knowing the command; it’s the mental overhead of looking up specific parameters, mapping JSON keys to attribute values, and ensuring the shell is escaped. What usually takes a developer 20 minutes of documentation diving and trial and error, the AI synthesizes instantly.

Why this matters

The real story here isn’t the shell script.

It’s the reduction in mental overhead.

Debugging complex systems often means jumping between CloudWatch logs, database records, code definitions, documentation and command-line syntax. Each context switch costs time and focus. AI, used well, acts as connective tissue between those layers.

In this case, the engineer still made the decision. The engineer chose the strategy. The engineer validated the output.

AI simply compressed the path between problem and clarity. That’s augmented engineering in practice.

It’s not about automating responsibility. It’s about reducing friction in high-cognitive-load tasks so engineers can spend more time on architecture, design and problem-solving, and less time wrestling with syntax and cross-referencing.

As systems grow more distributed and data-driven, this kind of contextual assistance becomes increasingly valuable. The differentiator won’t be who has access to AI. It will be who integrates it thoughtfully into their workflows.

And that’s the core theme of this series.

The augmented engineer isn’t replaced. They’re amplified.

Let’s create something remarkable together

Get In Touch