Skip to content
Pi · gpt-4infraDevOps5 files · +257 −68

Wrap pi-mono coding agent in Docker, Makefile and a ppi CLI launcher

Session from combust-labs_pi-mono-docker on Hugging Face by rgruchalski · Apache-2.0 · condensed by Coders Talk

48msession
2interventions
GOAL

Build out Docker/Makefile tooling around the pi-mono coding agent image, then iterate on a ppi launcher script (version handling, paths) via a series of feature branches merged into main.

  1. Prompt · +0
    Summarize current the project
  2. Agent did · +0m
    Explored the repo (Dockerfile, pi CLI script, .git, .pi sessions) and produced a project overview table.
  3. Prompt · +3m
    Add a Makefile with a build-docker target that reads the version from the Dockerfile and runs docker build -t localhost/pi-mono:<version> .
  4. Agent did · +3m
    Iteratively built out Makefile targets (build-docker, install-ppi, hf-push-sessions), added README.md and ppi launcher script, restructured Dockerfile into container/Containerfile, added GIT_REPO build arg, committing and merging each change into main via feature branches with model-credited commit messages.
  5. Fail · +31m
    Docker build failed: 'fatal: repository . does not exist' when cloning via the GIT_REPO build arg.
  6. Agent did · +31m
    Fixed the GIT_REPO default URL and quoted it in the Containerfile to resolve the clone failure.
  7. Intervention · +39m
    After many repeated 'could not find edits' failures trying to swap the hardcoded version string in ppi, the developer told the agent to just use bash sed instead of the edit tool.
    Why: The edit tool kept failing on non-unique/whitespace-mismatched text; sed was the fast, obvious fix and I said so directly instead of watching more failed attempts.
  8. Intervention · +47m
    After the agent again got stuck on ambiguous edit matches while updating path variables in ppi, the developer fixed the file by hand and told the agent to reload it.
    Why: The agent was looping on 'found 2 occurrences' errors, so I just made the change myself and had it re-read the file rather than keep debugging the edit tool.
  9. Outcome · +48m
    Final commit 76d2c56 on main updates ppi to use a base directory variable for paths and version handling; working tree clean.
VERDICT

Next time I'd give the agent the full Containerfile/ppi layout upfront and tell it to use sed/grep for simple string replacements instead of the fragile edit-with-exact-match tool, since that tool repeatedly failed on non-unique or whitespace-sensitive matches. Stepping in to hand-edit ppi myself and telling it to just reload, and telling it to use sed directly, were what actually got things unstuck rather than letting it retry the same edit approach.

I tried this · 0

Discussion · 0

How Builds work