← Latest papers
🤖 AI

Towards Structured, State-Aware, and Execution-Grounded Reasoning for Software Engineering Agents

This position paper argues that advancing Software Engineering agents requires transitioning from reactive designs to structured, state-aware, and execution-grounded reasoning to effectively handle long-horizon tasks and maintain coherent understanding across evolving evidence.

Original authors: Tse-Hsun, Chen

Published 2026-02-05
📖 5 min read🧠 Deep dive

Original authors: Tse-Hsun, Chen

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Idea: From "Forgetful Chatbots" to "Organized Engineers"

Imagine you are hiring a very smart assistant to fix a complex machine, like a car engine. Currently, the "Software Engineering Agents" (AI bots that write code) act like a forgetful chat partner.

How they work now (The "Reactive" Problem):
Every time you ask them a question or they run a test, they only look at the very last thing you said and the immediate history of the chat. They don't have a notebook where they write down their plan, their guesses, or what they learned.

  • The Analogy: It's like trying to solve a mystery by reading a new page of a book every day, but every time you turn the page, the previous pages disappear. If the story gets long, the detective (the AI) forgets who the villain was, what clues they found yesterday, or why they made a specific guess. They might solve a problem, then immediately undo their own work because they forgot they already fixed it.

The Author's Proposal (The "Structured" Solution):
Tse-Hsun (Peter) Chen argues that to fix this, we need to stop treating these AI agents like simple chatbots and start treating them like human engineers with a structured mental model.

He suggests three main upgrades:

1. Explicit Structure (The "Blueprint")

Instead of just chatting, the agent should keep a formal "blueprint" or "map" of its thoughts.

  • The Analogy: Imagine a detective who doesn't just talk out loud but keeps a physical evidence board. On this board, they pin up:
    • Hypotheses: "I think the brake line is broken."
    • Invariants: "The engine must always stay cool."
    • Dependencies: "If I fix the brakes, I must check the tires next."
    • State: "Current status: Waiting for test results."
    • Why it helps: When the agent gets new info, it doesn't have to re-read the whole conversation. It just updates the specific pin on the board. This keeps the logic clear and prevents the agent from getting confused.

2. State-Awareness (The "Living Memory")

The agent needs to remember its current understanding as a living thing that changes, not just a list of past words.

  • The Analogy: Think of a video game character. In a bad game, every time the character moves, the game forgets they are holding a key and they have to find it again. In a good game, the character has a "State" (Inventory: Key, Map, Health: 80%).
  • The Paper's Claim: Current AI agents lose their "Inventory." They forget their assumptions. Chen says the agent needs a persistent "State" that holds its current beliefs. If a new test proves a belief wrong, the agent should update that specific belief in its "Inventory" rather than panicking and restarting the whole game from level one.

3. Execution-Grounded Reasoning (The "Real-World Feedback Loop")

When the agent tries to run code, it gets feedback (like an error message or a test result). Currently, the AI treats this feedback as just another sentence in a chat.

  • The Analogy: Imagine a chef tasting a soup.
    • Current AI: The chef tastes the soup, hears "It's too salty," and then immediately forgets why they added salt in the first place. They might just add sugar randomly.
    • Proposed AI: The chef has a recipe card (the structure). They see the "Too Salty" feedback and immediately cross out the step where they added too much salt. They update their mental model of the dish: "Okay, the soup is salty, so I need to add water, not sugar."
  • The Paper's Claim: The agent needs to connect the "feedback" (the error message) directly to the specific "hypothesis" (the guess) that caused it. This stops the agent from guessing blindly and helps it learn exactly where it went wrong.

Why Does This Matter?

The paper argues that as software tasks get longer and more complex, the current "chat-only" style of AI breaks down. It leads to:

  • Inconsistency: Doing the same thing twice and getting different results.
  • Forgetting: Solving a bug, then accidentally re-introducing it because the AI forgot it was already fixed.
  • Wasted Time: Restarting the whole process from scratch when a small error happens, instead of just fixing that one step.

The Roadmap

Chen isn't saying we have a perfect solution yet. He is proposing a roadmap. He wants researchers to build AI agents that:

  1. Stop relying only on conversation history.
  2. Start using structured memory (like a database of hypotheses and states).
  3. Treat execution feedback (test results) as data that updates their internal model, not just text to read.

In short: We need to move AI agents from being "reactive chatbots" that forget everything after a few turns, to "structured engineers" that keep a running, organized mental model of the project, allowing them to solve complex, long-term problems without losing their place.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →