Horizon LabsHorizon Labs
Back to Insights
6 May 2026Updated 13 May 20266 min read

AI-Powered Code Generation: What It Can and Can't Do

AI-Powered Code Generation: What It Can and Can't Do for Your Engineering Team

AI code generation tools like GitHub Copilot, Claude Code, and Cursor are reshaping how development teams write software. These tools promise faster coding, fewer bugs, and reduced boilerplate — but they also introduce new risks and dependencies that engineering leaders need to understand.

Here's an honest assessment of what AI coding tools deliver, where they fall short, and how to adopt them safely in your engineering team.

What AI Code Generation Actually Does Well

AI coding assistants excel at automating repetitive programming tasks and providing intelligent suggestions based on context. They're particularly effective for boilerplate code, common patterns, and translating clear requirements into working code.

Boilerplate and Template Generation

Tools like Copilot shine when generating standard code patterns — API endpoints, database models, test scaffolding, and configuration files. Instead of copying from Stack Overflow or previous projects, developers can describe what they need and get syntactically correct code that follows established conventions.

For example, asking for "a REST API endpoint that handles user authentication" produces well-structured code with proper error handling, validation, and response formatting.

Code Completion and Context Awareness

Modern AI assistants understand your codebase context. They can suggest function names that match your naming conventions, complete complex data transformations, and even generate appropriate error messages that fit your application's style.

Cursor, in particular, excels at understanding file relationships and suggesting code that integrates well with existing modules and dependencies.

Documentation and Comment Generation

AI tools are surprisingly good at generating meaningful comments, docstrings, and README documentation. They can explain complex algorithms, document API endpoints, and create usage examples that actually make sense.

Where AI Code Generation Falls Short

Despite impressive capabilities, AI coding tools have significant limitations that can impact code quality, security, and team dynamics if not properly managed.

Complex Business Logic and Architecture Decisions

AI assistants struggle with high-level architectural decisions and complex business logic. They can't understand your company's specific requirements, performance constraints, or technical debt considerations.

When building data infrastructure or implementing complex AI features, human expertise remains essential for making strategic technical decisions that AI tools cannot contextualise.

Security and Vulnerability Risks

AI-generated code often contains security vulnerabilities. Training data includes millions of lines of insecure code, and AI models can reproduce these patterns without understanding the security implications.

Common issues include:

  • SQL injection vulnerabilities in database queries
  • Improper input validation and sanitisation
  • Hardcoded credentials or API keys
  • Insecure authentication and session management

Code Quality and Maintainability Issues

While AI can generate working code quickly, it doesn't always produce maintainable code. Generated code may lack proper error handling, include unnecessary dependencies, or follow patterns that create technical debt.

AI tools also struggle with refactoring existing code safely — they might suggest changes that break existing functionality or introduce subtle bugs that only surface in production.

Balancing Benefits and Risks

Australian software teams are finding that AI coding tools can significantly accelerate initial development, but success requires understanding both the advantages and limitations. Industry reports suggest that teams typically see faster initial code generation, but may experience longer debugging cycles when AI-generated code contains subtle errors.

The key is establishing processes that maximise the productivity benefits while minimising the quality and security risks. Teams that adopt AI coding tools without proper guardrails often find themselves spending more time fixing issues than they saved during initial development.

Consider these trade-offs when evaluating AI coding tools:

  • Faster boilerplate generation vs increased code review overhead
  • Helpful learning patterns for junior developers vs potential reduction in deep code understanding
  • Quick test case generation vs tests that may miss critical edge cases
  • Accelerated prototyping vs potential accumulation of technical debt

Security Considerations for AI Coding Tools

Security should be your primary concern when adopting AI code generation. These tools process your entire codebase, potentially exposing sensitive information to external services.

Data Privacy and IP Protection

Most AI coding assistants send code snippets to external servers for processing. This raises concerns about intellectual property protection and compliance with Australian privacy regulations.

Consider whether your organisation can accept:

  • Code snippets being processed by third-party services
  • Potential exposure of proprietary algorithms or business logic
  • Compliance implications for regulated industries like fintech or healthcare

Supply Chain Security

AI-generated code can introduce dependencies that create supply chain vulnerabilities. The tools might suggest packages with known security issues or generate code that relies on unmaintained libraries.

Establish security scanning processes that specifically check AI-generated code for vulnerable dependencies and security anti-patterns.

Smart Adoption Patterns for Engineering Teams

Successful AI coding tool adoption requires clear guidelines, proper training, and robust review processes. Here are patterns we've seen work well with our AI engineering clients.

Start with Low-Risk Use Cases

Begin with test code, documentation, and simple utility functions. These areas benefit from AI assistance while minimising the risk of introducing critical bugs or security vulnerabilities.

Avoid using AI generation for authentication systems, payment processing, or other security-critical components until your team has developed strong AI code review practices.

Establish Code Review Standards

AI-generated code needs more thorough review than human-written code. Train your team to:

  • Question AI suggestions rather than accepting them blindly
  • Test AI-generated code more rigorously
  • Look specifically for security vulnerabilities and performance issues
  • Verify that generated code follows your architectural patterns

Create AI Usage Guidelines

Develop clear policies around when and how to use AI coding tools. Consider:

  • Which types of code can be AI-generated
  • Required review processes for different risk levels
  • Data privacy requirements for your industry
  • Integration with existing development workflows

Integration with Modern Development Practices

AI coding tools work best when integrated thoughtfully with existing development practices. They complement application modernisation efforts by accelerating routine tasks while human developers focus on architectural decisions and complex problem-solving.

For teams building AI-powered applications, these tools can speed up the development of supporting infrastructure and integration code, allowing more time for the challenging work of AI product strategy and model implementation.

Making the Decision

AI code generation tools can deliver real productivity benefits for Australian engineering teams, but success requires careful adoption with proper guardrails. Focus on use cases where the benefits clearly outweigh the risks, and invest in training and processes that maintain code quality and security standards.

Remember that AI coding assistants are tools to augment human developers, not replace them. The most successful implementations use AI to handle routine tasks while preserving human oversight for complex decisions, security considerations, and architectural choices.

If you're evaluating AI coding tools for your engineering team and want expert guidance on safe adoption patterns, get in touch to discuss your specific requirements and challenges.

For more insights on AI adoption and engineering best practices, explore our insights on digital transformation and AI implementation.

Share

Horizon Labs

Melbourne AI & digital engineering consultancy.

AI Code Generation: What It Can and Can't Do