Introducing the NEW VS Code Extension for Optibot - now live.

Release

New Feature: Optibot Now Finds Dead Code and Code Quality Issues

Summary

Optibot, our senior engineering agent, has expanded its capabilities. Beyond catching functional bugs and security flaws, it now identifies structural issues and maintenance risks specifically targeting the bloat often introduced by AI code assistants.

New Features

  • Dead Code Detection: Automatically identifies and flags unused variables, unreachable functions, and orphaned components to keep the codebase lean.
  • AI Quality Guard: Detects "AI bloat" redundant logic and unnecessary complexity common in LLM-generated code and suggests simplified alternatives.
  • Critical Quality Insights: Flags architectural and maintainability issues that lead to technical debt before they reach production.

The Problem

AI coding tools (like Copilot or Cursor) are fantastic at generating code, but they are often terrible at cleaning up after themselves. They frequently leave behind unused variables, unreachable logic paths, and "zombie" functions that look correct but are never actually called. We call this AI Bloat.

Under the Hood

  • Refined Analysis Engine: Improved logic to better differentiate between necessary complexity and genuine code bloat.
  • Scanning Efficiency: Optimized performance to ensure quality checks don't increase PR review latency.

See it in action

In a recent internal audit, Optibot flagged a getPatternColor function. The function contained a switch statement for pattern types (streak, high_collaboration) that didn't actually exist in the TypeScript definition.

Because the union type for ActivityPattern didn't include these keys, this code was literally impossible to reach—it was just sitting there adding weight to the bundle size and confusing developers.

Interactive Explanations

We know that sometimes "dead code" is there for a reason (e.g., a future feature). That's why Optibot is conversational. You can ask it why a change is necessary.

When Optibot flagged the issue above, we asked it to explain the reasoning. It explained that removing unused code reduces cognitive load and prevents future confusion.

What is Optibot?

Optibot is a workforce of specialized agents that live directly in your PRs to handle code reviews, security, compliance and more. They review code alongside your human engineers, catching logic errors, security vulnerabilities, and typos instantly so your team can focus on complex architecture.