SECRA / ENGINEERING FIELD NOTES
Building Pi Station:
making AI work recoverable
What we built around a local model, what the measurements actually showed, and why memory, evidence and honest failure states mattered more than another prompt.
Based on implementation records and tests through October 11, 2026. These are dated findings, not a live service-status report.
A coding model can solve a difficult problem and still make a poor workstation. It can forget what it already changed, stop after a long response, spend another turn rediscovering the same files, or mistake a failed tool run for a clean result. The model’s intelligence is only one part of the system.
Pi Station grew out of trying to make that system more dependable. We combined a desktop workspace, a small coding crew, a permission-aware source-review pipeline, automatic task memory and a searchable reference library. Along the way, we compared model configurations, measured batching, and repaired failures that initially looked like context or GPU problems.
The most useful result was a clearer separation between what the model attempted, what a tool actually did, what evidence survived, and what remained unknown. This article records that work, including the improvements we measured and the claims our evidence does not support.
01 / THE WORKSPACE
One place to work, with visible responsibilities
The interface puts Pi Web next to agent activity in a restrained, dark desktop workspace. The goal was practical: keep the conversation visible while showing which role is active, waiting or finished. Discovery, the repository watchlist, scan queue, reports, history and training progress have their own views.
The coding crew has three roles. The lead edits and runs tools. The scout locates relevant files and patterns. The reviewer checks the resulting work. The helpers are bounded and read-only; the lead remains responsible for executing tests. A second role using the same underlying model is a useful division of labor, but it is not independent expert consensus.E01
We also made the activity view more literal. A heartbeat means a worker is alive. A file-read event means the tool returned source. Neither means that the model has understood every relevant path. The dashboard reports observable actions rather than presenting private reasoning as an explanation of progress.
Pi Coding Agent, Pi Web, Blackhole and llama.cpp are upstream foundations. Our work is the desktop integration, orchestration, workflow controls and custom extensions around them.
02 / MEMORY AND CONTINUATION
Remember completed work before asking for more work
Early sessions relied on a task-state document. That helped with handoffs, but it also created stale reminders and made an old next step look like a new instruction. We retired that interactive mechanism and replaced it with automatic, session-isolated task memory.E14, E21
The new journal records a proposed tool call before execution, then associates it with the actual result. If an interruption leaves the operation unresolved, recovery does not assume it never happened. It preserves the uncertainty and asks for verification before repeating a side effect. Completed milestones cite successful evidence IDs from the same session; they are still claims that can be checked, not automatic declarations of correctness.
Reusable project facts are separate from a session’s current goal. A plain “continue” retains the last substantive request, while a new task does not inherit an unrelated checkpoint. Recent context is bounded, and older evidence remains available through a retrieval tool. This bookkeeping adds no separate model-generation request; model-written milestones still use the ordinary session.
Output exhaustion received its own treatment. Interactive responses moved from 8,192 to 16,384 tokens. A response marked length can continue twice from the existing conversation and completed tool results. Truncated tool arguments do not execute. If the allowance is exhausted, the interface says so instead of silently appearing idle.E08, E14
These controls reduce avoidable repetition. They do not make memory perfect or force a model to continue after every normal stop. The saved tests covered 11 core memory cases and 16 real-SDK integration scenarios using a synthetic provider. That verifies specific mechanics, not a long-running reliability percentage.
03 / SOURCE REVIEW
Watch for changes, then investigate the change
The source-review workflow starts with discovery from HackerOne and Intigriti, while retaining manual repository entry. Paid source assets become review proposals. They do not become authorized jobs simply because an API returned a repository URL. Scope review and capability approval are separate decisions, tied to policy revisions.E04, E16, E20
New repositories receive a structural mapping pass. After that, the watcher checks approved branches for new commits every eight minutes. Unchanged heads do not trigger another security review. A change starts an investigation of the diff and affected code. Some analyzers need the wider approved snapshot for context; that does not make every polling cycle a whole-repository vulnerability scan.
The pipeline uses scout, analyst, validator and reporter stages. Static evidence can come from Semgrep, CodeQL, OSV Scanner, Gitleaks and ShellCheck when permitted and applicable. The model reads scoped source, examines changed behavior, challenges hypotheses and identifies what additional evidence is needed. Optional isolated tests use synthetic data and explicit assertions.E02, E04
A 24-category catalog organizes review questions across access control, business logic, trust boundaries, memory safety, parsing, dependencies and other areas. It is a review vocabulary with permission controls, not 24 complete vulnerability detectors. Application-specific invariants and deployment assumptions remain difficult, especially when framework dispatch or dynamic behavior is missing from the available context.
We removed numerical confidence as the sole report gate. A confidence score is displayed as an uncalibrated assessment. A new report needs a concrete, source-supported medium, high or critical lead that survives the relevant evidence checks and second review. Empty results and rejected hypotheses should not create a flood of polished reports.E02
Reports should explain both the finding and its limits
Report preparation combines a readable summary, root cause, prerequisites, severity and timestamps with real execution receipts where available. Receipts bind a test to its candidate, commit and harness hash. Reproduction steps, positive and negative controls, and CVSS reasoning are checked against the evidence rather than filled in from confident prose.E15
HTML and PDF exports make reports easier to review and share. Formatting saved evidence does not require another model call. Proposed HTTP reproduction commands are clearly separated from tests that actually ran. The workflow does not automatically contact production endpoints or submit reports to bounty platforms, and a synthetic demonstration does not establish production exploitability.
04 / FAILURE ANALYSIS
A parser failure is not a context problem
One recurring queue problem looked like stalled analysis: jobs returned to a retry state because some tools were incomplete. In a recorded case, the underlying evidence contained 126 parser warnings and 184 diagnostic ranges. More model context would not teach the same parser to accept the same syntax.E09
The repair retained bounded stderr, exit information, tool versions and affected locations. It classified failures so that recognized temporary problems could receive bounded retries, while unchanged parser, input or configuration failures stopped repeating automatically. Successful results could be reused only with matching source and permission provenance.
Coverage gaps stayed visible even if another analyzer succeeded. A review could still produce a useful lead from partial evidence, but incomplete work did not advance a clean reviewed baseline. That distinction prevents “the job ended” from becoming “the repository is safe.”
Other repairs addressed duplicate commit jobs, cancelled work reappearing as a retry, oversized assignments and progress lost at a context boundary. Smaller work units and incremental findings make partial work reusable. They do not turn heuristic affected-code selection into a complete call graph, or guarantee that relationships spanning multiple units will be recognized.E02, E18, E22
Retry the condition that can change. Preserve the evidence when it cannot.
05 / CAPACITY
Budget the whole request, not just the pasted source
The regular-review profiles provide 65,536 tokens per inference slot on one A40, or 131,072 on two A40s. The model context contains instructions, policy, tool definitions, history and generated output as well as source text. It is not a repository-sized input box.E07
The larger review profile reserves 8,192 output tokens, 8,192 rollover tokens and 2,048 safety tokens, leaving a 112,640-token prompt ceiling. The smaller profile leaves 47,104. Requests are checked using the serving tokenizer and actual per-slot capacity, so a stale client cannot safely assume a larger window than the server provides.
Two concurrent synthetic prompts of 109,104 tokens completed in the recorded activation check. That demonstrates the tested capacity case. It does not show that every long-context answer is correct, or that larger repositories receive complete analysis. Interactive sessions use a separate 16,384-token output cap; those settings should not be confused with the review-worker budget.E06, E08
06 / PERFORMANCE
One useful speedup, and one result that was almost flat
In a short synthetic evaluation test on one A40, two-question batching increased aggregate generated-token throughput from 10.03 to 19.70 tokens per second, approximately 1.96×. The evaluation coordinator could use two questions per GPU, with up to four questions in flight across two workers. The measured gain was aggregate throughput, not proof that each question finished twice as quickly.E05
The regular-serving measurements tell a different story. A single-request test moved from 31.13 to 31.27 tokens per second. Two concurrent requests moved from 46.35 to 46.68 in aggregate. Both sides already used two GPUs. Those small differences do not establish a meaningful speedup.E06
We kept the measurements separate because tool execution, source preparation, prompt processing and reasoning all contribute to total review time. A short decode benchmark cannot stand in for a full workload benchmark. We also did not run enough repeated trials to publish confidence intervals or a general speed claim.
07 / MODEL RESEARCH
The fine-tune did not earn a production swap
We explored a small provenance-oriented training pilot and a later 500-example fine-tune. The dataset preparation work tracked fixing revisions, retained license evidence, separated projects across training and test splits, and excluded oversized examples rather than silently truncating them. Forward and reverse patch variants were recognized as correlated examples, not independent discoveries.E23
The later comparison allocated 100 questions to each of three configurations, with an 8,192-token generated-output budget per answer. The run was stopped after 159 of the planned 300 answers were saved. The modified configuration had 100 saved answers, vanilla had 44, and the fine-tune had 15. Comparing those unmatched totals as a leaderboard would have been misleading.E05, E06
On the 15 questions all three answered, modified and vanilla each classified 15 correctly, while the fine-tune classified 14. On the 44 shared modified-versus-vanilla questions, the result was 42 versus 43. All paired answers ended normally, so output truncation did not explain those particular differences.
We retained the current production configuration. That is a conservative engineering decision, not proof that it is the smartest model. The samples are small and include related scenario variants. The modified path used Q8 llama.cpp with the Froggeric template, while the comparison paths used NF4 Transformers with their official template. This was a configuration comparison, not an isolated test of weights. Classification accuracy also says little by itself about explanation quality or real-world vulnerability discovery.
08 / RETRIEVAL
Give the model a reference shelf, not another unverified memory
The reference library offers a different way to improve access to technical information without changing model weights. Its latest verified release contains 259 documents, 5,789 chunks and 38 topics. A CPU-based SQLite FTS5 index with BM25 ranking supports status, search and paginated reads. Retrieved entries retain source links, revisions, hashes and license metadata.E10, E11, E12, E13
The collection grew from 146 documents to 189, then 215 and 259. Additions covered C/C++ language and build references, GCC and Clang, linking, debugging, sanitizers, test frameworks, documented Windows-driver interfaces and verification. Earlier material included Ghidra, Linux and Win32 APIs, YARA, runtime metadata and graphics/UI references. Forty-eight owned C++/assembly examples record target architecture and optimization settings.
In selected direct-query tests on the 189-document release, retrieval took approximately 0.9–3.1 milliseconds. That excludes the agent-tool subprocess and model response, so it is not an end-to-end latency claim. More documents also do not demonstrate better reasoning; retrieval quality needs its own evaluation.
The library distinguishes reference knowledge from evidence about a target. Documentation does not prove a tool is installed, an API is supported in a particular build, or a test succeeded. The Windows-driver additions deliberately use documented contracts rather than guessed replacement headers or undocumented offset tables. The publication package links to reference projects but does not redistribute the private corpus or third-party source material.
09 / PRACTICAL TOOLING
Capabilities need to be discoverable, not merely installed
Regular coding sessions have access to native GCC/G++ and Clang, Windows user-mode cross-compilation through MinGW-w64, and supporting tools such as CMake, Ninja, Make, GDB, clang-tidy, clang-format and ccache. Playwright and Chromium provide a route to browser automation and documentation checks.E17
One practical lesson was that installing a tool does not make the model use it. The session needs a clear description, a callable path, and an honest verification step. That is why the reference library exposes a status operation and the memory system records evidence instead of just saying a capability exists.
These general coding tools are separate from the permissions of an isolated source-review worker. Browser installation does not silently authorize live testing. MinGW producing a Windows binary does not validate it on Windows. Driver documentation is not a Windows Driver Kit installation.
10 / WHAT REMAINS OPEN
Measure the work that matters next
The next useful experiments are end-to-end review timing, repeated latency and throughput trials, retrieval relevance tests, and a completed paired model evaluation under a more closely matched serving setup. Memory should be tested over long sessions with real interruptions, not only short deterministic scenarios.
Our records do not establish a bug-bounty success rate, a payout forecast, exhaustive coverage of large repositories, calibrated confidence scores or zero-loss recovery. A heartbeat is not progress, a passing unit test is not deployment evidence, and a larger context is not unlimited memory.
Pi Station’s strongest improvement so far is that these distinctions now have places in the product: explicit state, recoverable work, traceable evidence and visible limits. That makes the workstation easier to inspect and improve, even when the model gets something wrong.

