← Latest papers
🤖 AI

Learning CLI Agents with Structured Action Credit under Selective Observation

This paper addresses the challenges of selective observation and sparse reward credit assignment in learning CLI agents by introducing the σ\sigma-Reveal inference-time mechanism, the Action Advantage Assignment (A3\mathrm{A}^3) reinforcement learning method, and the ShellOps dataset suite for verifiable evaluation.

Original authors: Haoyang Su, Ying Wen

Published 2026-05-11
📖 4 min read☕ Coffee break read

Original authors: Haoyang Su, Ying Wen

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

Imagine you are hiring a very smart but slightly blind assistant to manage a massive, chaotic library. This assistant can read books, move shelves, and write new notes, but they can only see a tiny corner of the library at any given time. Furthermore, you only tell them if they solved the entire puzzle at the very end, not if they picked up the right book in step one or wrote the right note in step two.

This is the challenge the paper tackles: teaching CLI Agents (computer programs that talk to a computer's command line) to work in complex file systems where they can't see everything and only get a "good job" or "fail" signal at the very end.

The authors propose a new way to train these agents using two main tricks: σ-Reveal and A3.

The Two Big Problems

  1. The "Blindfold" Problem (Selective Observation):
    The library (the computer's file system) has thousands of files. The agent can't read them all at once because it has a limited memory (token budget). If you show it the whole library, it gets overwhelmed. If you show it nothing, it's guessing.

    • The Paper's Solution (σ-Reveal): Think of this as a smart librarian who looks at the agent's specific question and pulls out only the relevant books and folders to show the agent before they start working. Instead of dumping the whole library on the desk, the librarian says, "Here are the 5 files you actually need to solve this. Ignore the rest." This helps the agent focus on the right evidence without getting lost.
  2. The "Black Box" Reward Problem (Credit Assignment):
    The agent takes many steps (turns) to solve a task. At the end, you say, "Success!" or "Fail." But which specific step made the difference? Did the agent find the right file in step 2? Did it type the wrong command in step 4?

    • The Paper's Solution (A3): This is a new way to give credit to the agent's actions. Instead of just saying "Good job overall," A3 breaks the score down into three layers:
      • The Episode Score: Did this whole attempt work better than other attempts at the same task?
      • The Turn Score: Did this specific command look like the commands that worked in other successful attempts? (The paper uses a special "fingerprint" called an AST to compare the structure of commands, like comparing the skeleton of a sentence rather than just the words).
      • The Tree Score: Did this specific path of actions lead to a better outcome than similar paths taken by other agents?
    • Analogy: Imagine a coach watching a soccer team. Instead of just saying "We won," the coach says, "Great pass in the 10th minute (Turn Score), that move was exactly like the one that scored last week (Structure Score), and choosing to attack the left side was the right strategy compared to the right side (Tree Score)." This helps the agent learn exactly what to repeat.

The New Playground: ShellOps

To test this, the authors built a new training ground called ShellOps.

  • Think of this as a gym for computer agents.
  • It contains 1,600+ tasks ranging from simple "find this file" to complex "edit these 20 files and give me a summary."
  • It's designed to be verifiable: The computer can automatically check if the agent actually did the right thing (e.g., did the file actually get edited correctly?), rather than just guessing if the answer sounds good.

What Happened When They Tried It?

The authors tested their new method (A3 + σ-Reveal) against other top-tier AI agents using a 14-billion-parameter model (a mid-sized but powerful brain).

  • The Results: Their method significantly outperformed the others.
    • On the hardest tasks (the "Hybrid" ones that require both finding info and editing files), their agent got about 24.6% correct, while the next best method only got 11.3%.
    • It was also cheaper and faster to train. Some other methods require a second "judge" AI to grade every step, which is slow and expensive. Their method does the grading mathematically using the structure of the code itself, keeping costs low.

The Bottom Line

The paper claims that by giving agents a focused view of the files they need (σ-Reveal) and a detailed report card on exactly which actions were good (A3), we can teach them to be much better at navigating and fixing computer file systems.

They didn't claim this works for medical diagnosis, self-driving cars, or creative writing. They specifically focused on command-line tasks: finding logs, editing code, aggregating data from spreadsheets, and fixing database entries. In that specific world, their new "smart librarian" and "detailed coach" approach made the agents significantly smarter and more reliable.

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 →