The Evolution of Coding Agent Workflows: From Cody, to Amp, to Pi
Looking back, the biggest shift in my workflow with AI didn’t come from the “latest model,” but from how I manage context, sessions, and agent roles.
This post summarizes that journey: from using Cody, transitioning to Amp, and finally settling on Pi as my primary coding agent. The common thread has been consistent: don’t let sessions get too long, be explicit with prompts, and delegate tasks to the right threads/agents.
Starting Point: Karpathy’s Video and Context Awareness #
Around February or March 2025, I watched a video by Andrej Karpathy that became my first turning point1. One thing that really stuck: long AI sessions easily turn into distractions. Initially, it feels productive because “everything is in one place,” but over time, the AI starts to hallucinate, especially once the context window is over 40% full2.
From there, I started becoming more disciplined:
- Never letting a single chat contain too many objectives.
- Resetting sessions frequently.
- Breaking down work into clear phases (planning, execution, exploration).
I also watched a video on tokenization3. For me, this was more of a technical foundation to understand how AI “reads” our input, rather than a primary trigger for my daily workflow.
The real shift came later when I started applying the concept of back pressure in prompting for coding tasks4. Essentially, don’t just tell the agent to “do it,” but force it to have a verification mechanism for its own work.
Practically, I build this back pressure into my “prompt contract”:
- For bug fixes, the agent must prove the bug is gone (via reproduction before/after, tests, or logs).
- For frontend tasks, the agent is given browser access to verify the UI directly.
- For backend tasks, the agent is given CLI access (like
psql,uv,node) so validation isn’t based on assumptions.
This pattern changed my perspective; AI isn’t just about implementation—it’s an agent with delivery accountability.
It goes back to the inner-loop concept; as devs, we do requirement gathering (planning), coding, and testing. But instead of doing it all “by hand,” the process is now assisted by an “agent.”
From Cody to Amp: The Right Transition #
I used Cody from Sourcegraph for quite a while. When Cody was sunset and succeeded by Amp, I happened to have 40 USD in credits, so I continued my exploration there. The initial decision was practical, but it led to a more fundamental workflow discovery.
Amp’s writing on Threads really resonated5. The concept is simple: threads as units of work, not just chat history.
In practice, it looks like this:
- Planning session → create a new thread.
- Execution session → move to a new thread.
- Exploration session → separate thread.
- If I need to go back to planning → create another new thread.
(Tip: In Amp, you can press double enter in the chat box to reference a previous thread, making the context handoff seamless).
This aligns with another Amp note that 200k tokens doesn’t mean you should use them all at once6. Just because it can hold a lot doesn’t mean it’s optimal for the AI—it might just “hallucinate” more accurately.
Subagents for Cognitive Role Splitting #
The concept of subagents I encountered while using Amp further clarified this workload division7. Essentially, subagents are just hyper-focused sessions that perform automatic handoff notes behind the scenes.
The principle remains the same: breaking down the cognitive load into smaller units to maintain quality. The roles are roughly divided as follows:
- Oracle (GPT): For planning, problem framing, or complex bug fixes.
- Librarian (Sonnet): For understanding the codebase on GitHub, creating summaries, or internal documentation.
What matters isn’t just “which model is smartest,” but whether the task fits the operating mode. When an agent’s role is clear, the output is more consistent, and my own cognitive load is reduced.
The Emerging Pattern #
Looking back at the journey from 2025 to now, the pattern is clear. There are three core principles I’ve unconsciously followed:
- Minimal Distraction: Each thread has only one goal.
- Accurate Continuity: Handoff notes ensure the next session knows exactly where we left off.
- Cognitive Ease: No single session is forced to hold “everything”—making it easier for both the agent and the human driver.
Performance isn’t just about the AI model; it’s about the composition:
right task × right agent × right thread length × right prompt contract
Clicking with Pi Coding Agent #
When the OpenClaw project gained momentum (late 2025 - early 2026), I got to know Pi Coding Agent because OpenClaw itself uses it as a foundation.
Reading Mario Zechner’s writing on Pi, many things felt like they “clicked” with the principles I learned from Andrej and Amp8. The philosophy is aligned: tooling should make us more context-aware, modular, and intentional.
That’s why Pi is no longer just an alternative, but my primary coding agent.
Why Pi? #
There are several reasons why Pi is now the benchmark for my workflow:
- Natural Thread-based Workflow: It doesn’t force us into one super-long session. I’ve learned to manage context better using the
/treefeature9. The subagents I mentioned earlier are essentially an automated form of this thread-based pattern. - Multi-session Workflow: Separating planning and execution is effortless without losing direction.
- Aligned with Explicit Prompting: It’s easy to maintain the output “contract” and scope per session.
My Default Workflow Today #
This is now my default habit when coding:
- One thread, one objective.
- If the objective changes, start a new thread immediately.
- The Handoff: Every time I switch threads, I write a short handoff note: minimal context, key decisions, and next steps.
- Explicit Prompts: Be clear about role, constraints, output format, and completion criteria.
To keep things organized beyond the chat, I store artifacts in a ./memory folder in the repo. You can see an example in the StitchDB repo10, which contains files for planning, bug fixing, and handoff notes. Usually, the agent writes the initial draft, and I review/correct it. Think of this folder as a collaborative space.
Furthermore, this ./memory folder makes it incredibly easy to switch coding agents. If I need a different perspective, I can just pass those notes to another agent like Amp or Gemini—which I still use alongside Pi.
Tools and models will keep changing. But my principles remain the same: work in focused sessions, keep context clean, and ensure results are verifiable.
It’s been fascinating to follow the development of coding AI agents. Learning this feels a lot like when I first learned game development in middle school—that same spark of curiosity and excitement is still there.