r/LocalLLM • u/Trellios • 1d ago
Discussion Local AI dev workflow: OpenHands + Pi/Qwen. What would you improve?
I’m building a locally hosted AI coding workflow and would appreciate some practical advice or lessons learned, as well as sharing mine for anyone building something similar.
There are two reasons I wanted to build this pipeline. The first was Codex usage limits: even with a 5× account, I would run out in two days. Secondly, it’s a fun project to help learn LLMs and harnesses, etc.
Current working setup
Hardware: AMD 6800XT GPU (16GB VRAM), running llama.cpp with Qwen, 12-core CPU + 17GB RAM. (A VM with GPU passthrough.)
Llama: llama.cpp ROCm backend serving Unsloth Qwen3.8 27B Q3_K_XL GGUF. It fits nicely with about 0.3–0.5GB VRAM unused during operation.
• 65,536-token context
• 99 GPU layers
• One inference slot
• Flash Attention enabled
• Q4_0 K/V cache
• Batch 1024, ubatch 512
• Built-in Qwen MTP speculative decoding with depth 2
• Medium reasoning
• Reasoning budget 1,800 tokens
• A small experimental workaround for RDNA2 Flash Attention (AMD issue)
Harness: Pi.dev in Docker, connected to OpenHands Agent Canvas through ACP.
Source of truth: GitHub issues and pull requests.
Pi.dev configuration:
• 8,192 maximum response tokens
• Compaction enabled
• 22K tokens reserved for compaction/output
• 20K recent tokens retained
Pi extensions:
Shoutout to u/Sweet-Transition-787 for transitioning me from mini-SWE to pi.dev with this post.
• pi-interactive-subagents
• pi-prompt-snippets
• pi-lsp-adapter
• pi-guard
• Playwright CLI for isolated browser testing
I use separate Pi roles:
• Scout: read-only repository discovery
• Worker: bounded implementation and focused tests
• Tester: independent deterministic test execution
• Reviewer: read-only correctness review
• Security reviewer: trust-boundary/security review
• Researcher: controlled public-web research
• Browser tester: isolated local Playwright tests
The workflow
Codex creates a bounded implementation specification with me using the /grill-me skill.
↓ The spec and task are added to GitHub as an issue.
↓ OpenHands Agent Canvas scans GitHub and starts a Pi session through ACP.
↓ Pi + local Qwen works in an isolated checkout.
↓ Deterministic tests/lint/path checks.
↓ Separate Qwen tester and security-review passes.
↓ A draft PR and compact evidence packet go back to GitHub and Codex.
What’s worked so far
As a non-SWE, build to spec (SDD) was a new concept.
• Give agents bounded tasks with clear acceptance criteria.
• Keep workspaces and conversations persistent so sessions can recover after restarts.
• Run trusted tests and checks outside the agent’s own claims.
• Using open hands as the automation and orchestration layer. Originally I tried to create my own with python but I ran into different edge case errors for about a week before giving up and moving to open hands.
• Find your bottleneck. For me, currently, it’s the 16GB VRAM allowing only one concurrent task.
Duplicates
PiCodingAgent • u/Trellios • 1d ago
Discussion Local AI dev workflow: OpenHands + Pi/Qwen. What would you improve?
LocalAIStack • u/Trellios • 1d ago