The Deska blog

Advent of Code With Agents: Cheating or Training?

Explore the ethics and technical benefits of using AI for Advent of Code With Agents while scaling your development skills through LLM orchestration.

· 12 min read

The annual December tradition of solving daily puzzles has entered a new era where Advent of Code With Agents is becoming a standard way for developers to test the limits of Large Language Models. Every year, thousands of programmers compete to solve algorithmic challenges that grow in complexity over twenty five days. While some purists argue that using automated agents defeats the purpose of the exercise, others view it as a critical training ground for mastering the next generation of software development workflows. This shift raises important questions about the role of the developer when the engine, not the human, is writing the specific lines of logic.

The Evolution of the Coding Challenge

Advent of Code serves as a benchmark for language proficiency and algorithmic thinking. In the past, developers used these puzzles to learn a new language like Rust or Zig. Today, the challenge is shifting toward effective orchestration. Using AI to solve puzzles is not a new phenomenon, but the transition from simple chat interfaces to autonomous agents represents a significant jump in capability.

Standard LLMs often struggle with the part two variations of these puzzles. These variations typically introduce a scale or a constraint that invalidates a brute force approach. Agents solve this by iterating. They can run the code, observe the error or the performance bottleneck, and refactor the solution without human intervention. This mirrors real world software engineering where the initial implementation is rarely the final one.

Is Using Agents Cheating?

The debate over the ethics of using AI in coding competitions depends entirely on your goals. There are three primary ways to participate in the event.

  • Competitive Leaderboard: If your goal is to appear on the official global leaderboard, using agents is generally frowned upon or explicitly restricted by the community spirit of the competition. The global points are meant to reward human speed and intuition.
  • Educational Growth: If you want to learn how a specific algorithm works, letting an agent do it entirely might hinder your progress. However, using an agent to explain a difficult geometric concept or a graph theory problem can be an incredible tutor.
  • Workflow Engineering: This is where Advent of Code With Agents shines. For many, the challenge is no longer the puzzle itself, but building a system that can solve the puzzle autonomously.

The creators of these puzzles often design them to be "LLM proof" by using idiosyncratic language or multi step logic that requires specific state management. Attempting to solve these with agents is a legitimate test of prompt engineering and agentic tool use.

Technical Architectures for Puzzle Solving

Solving complex puzzles requires more than a single prompt. It requires an environment where the agent has access to a runtime. Several tools have emerged to facilitate this type of work.

General purpose agents like Claude Code or OpenCode operate by having access to the file system and the terminal. They follow a loop: read the problem statement, write a script, run it against the sample input, verify the output, and then execute against the full input.

Managing these agents effectively requires a workspace that can handle multiple streams of data. For developers who want to experiment with these workflows, Deska provides an infinite canvas where you can run different agents in side by side panels. You can observe a terminal running Codex CLI in one panel while coding agents like Claude Code work in another. This visibility is crucial for debugging why an agent might be stuck in an infinite recursion or why its heuristic for a pathfinding puzzle is failing.

Benchmarking Different Agents

Not all agents are created equal when it comes to algorithmic logic. While some excel at boilerplate, others are better at mathematical optimization.

  1. Claude Code: High reasoning capabilities. It is particularly good at identifying the underlying pattern in a puzzle, such as recognizing when a problem is a hidden version of the Chinese Remainder Theorem.
  2. Codex CLI: Extremely fast for small utility scripts. It works well for part one of most puzzles but may require human guidance for the memory intense part two.
  3. OpenCode: A strong open source contender that allows for deep customization of the underlying model.

When using Deska, you can run these agents within terminals directly on your local machine. Because Deska is local-first, your inputs and the agent scripts stay on your own hardware. This is a significant advantage for those who want to keep their experimental solve scripts organized in a private directory without relying on cloud based IDEs.

The Role of Human Oversight

Even the most advanced agents often fail at the infamous "Day 25" or the complex 3D grid problems. This is where the developer becomes the architect. Instead of writing code, you provide the strategy. You might tell the agent to use a BFS instead of a DFS, or suggest a specific way to parse the input file.

Using the Ask Deska feature, you can interact with your workspace via voice or chat to manage these sessions. You might say "open a new terminal and start the OpenCode agent for the day 12 challenge" while you are still reading the problem description. This level of voice command integration allows for a fluid transition between conceptualizing the solution and executing it.

If you have to step away from your computer while an agent is crunching a particularly difficult optimization problem, the Deska mobile app allows you to monitor the progress. You can check the output of the panels through a secure relay that does not require opening ports on your router. If you see the agent has finished or moved in the wrong direction, you can intervene from your phone.

Strategy for Success with Agents

To successfully complete the month using agents, follow a structured approach:

  • Input Sanitization: Agents often struggle with weirdly formatted raw text. Use a dedicated panel for notes to keep your parsed data clean.
  • Unit Testing: Instruct the agent to always write a test case for the provided example before running the large input. This saves API costs and prevents long wait times for incorrect logic.
  • Resource Monitoring: Algorithmic puzzles can easily consume all available RAM if an agent writes an unoptimized loop. Keep an eye on your system performance.
  • Iterative Prompting: If an agent fails, do not just restart. Explain what went wrong in the agent threads so it can learn from the terminal output.

Comparison of Solver Layouts

FeatureStandard TerminalWeb Based IDEDeska Workspace
Multi Agent SupportSequential onlyLimited by tabsSide by side panels
AI IntegrationPlugin basedBuilt inNative agent support
Data PrivacyLocalCloud storageLocal-first
VisualizationText onlyIntegratedInfinite canvas

Frequently Asked Questions

Can I solve Advent of Code with agents for free?

Yes, you can use various open source models with agents like OpenCode. If you use a tool like Deska, the workspace itself is free. You only need to provide your own API keys for the models you choose, or use a managed subscription if you prefer not to handle keys. Many developers use the free tier credits from different LLM providers to get through the first half of the month.

How do agents handle large puzzle inputs?

Agents typically read the input from a file rather than having it pasted into the prompt. This avoids hitting token limits for the context window. In a workspace like Deska, you can use code-git-files to manage these input files effectively. The agent can then write a Python or Node.js script that reads the local file, which is much more efficient than processing the data directly in the chat.

What is the best AI agent for coding puzzles?

As of late 2024, Claude Code and tools based on the Claude 3.5 Sonnet model are widely considered the gold standard for reasoning and logic puzzles. They tend to have fewer hallucinations regarding mathematical constraints compared to other models. However, the "best" tool often depends on your specific workflow and whether you prefer an autonomous agent or a collaborative chat assistant.

Start Your Agentic Journey

Advent of Code With Agents is more than just a shortcut. It is a way to practice the skills that will be mandatory for the next decade of software engineering. By learning to manage agents, debug AI generated logic, and maintain a high level architectural view of a project, you are preparing for a future where the developer is a conductor rather than just a writer.

To build your own command center for this year's challenges, download Deska for your platform and start experimenting with side by side agents on an infinite canvas.

💡 Ideas+🐛 BugsSuggest a feature or report a bug