Foyn
Lab

Coding agents

Agent Harness & Vault

Coding sessions start from a phone at any hour, work from instructions and memory kept in git, and return each change as a pull request.

Memory in the repo

  • Where it is

    Built-in memoryOutside git, in each tool's own store

    In the repoIn git, next to the code it is about

  • A new lesson

    Built-in memorySaved without a diff

    In the repoA diff in the pull request with the work

  • Who reads it

    Built-in memoryThe tool that wrote it

    In the repoClaude Code and Cursor, from the same files

The built-in memory of Claude Code and Cursor is switched off. What the agents keep between sessions is in Markdown files in the repo.

Sessions side by side

Every prompt goes to one orchestrator, which continues a session or starts a new one. The path from prompt to deploy is drawn in the homelab article.

Under the hood

Agents
Claude Code and Cursor on a Raspberry Pi 5, as systemd services
Every session
Loads AGENTS.md and .agents/memory/MEMORY.md; longer instructions and each stack's context/ when the task needs them
Worktrees
wt.sh starts one, wt-pr.sh opens the pull request, wt-clean.sh removes merged worktrees and worktrees 7 days old with no open pull request
Merge
CI runs the checks for each stack the pull request touches, squash-merges when they pass and deploys only those stacks
Timers
Bridge check every 5 min, repo sync every 15 min
Routines
Pi maintenance on Saturday, codebase alignment on Sunday, an article on agentic engineering on Monday