A file-based harness for running long-horizon coding-agent research sessions.
SOAR Harness was built during the SOAR 2026 LLM inference optimization competition, but SGLang is only the application case. The reusable artifact is the harness layer: Markdown contracts, project memory, skills, hooks, and small Python utilities that keep coding agents constrained, auditable, and resumable across many sessions.
This repository is best read as a working research artifact, not a packaged Python framework. It shows how to structure a real multi-session coding-agent project so that experiments can be resumed, reviewed, and trusted after the original chat context is gone.
| Layer | What it does | Files to inspect |
|---|---|---|
| Entry contract | Defines hard rules, role boundaries, and startup navigation | CLAUDE.md |
| Skills | Turns repeated workflows into explicit agent procedures | .claude/skills/ |
| Memory | Stores active tasks, current config, experiment history, and retrospectives | _lcy_work/memory/ |
| Evidence chain | Captures raw command outputs and validates report claims | capture.py, validate_report.py |
| Runtime guardrails | Tracks GPU locks, server processes, cleanup, and worktree isolation | runtime.py, worktree.py |
task_board.md
-> experiment session
-> capture.py raw logs + runs/<exp>/report.md
-> /report
-> experiment_history.md
-> coordinator /review
-> retro/, current_config.md, task_board.md
-> next experiment
The goal is not to make one agent "smarter" in a single prompt. The goal is to make many agent sessions behave like a disciplined engineering process:
CLAUDE.md stays small and points to memory,
protocol, and operations files instead of becoming a long manual./report; coordinator sessions absorb cross-run lessons with /review.CLAUDE.md is the session entry point. It keeps only the hard rules and file
navigation needed at startup: role boundaries, GPU/process safety, evidence
requirements, report/review discipline, and pointers into _lcy_work/memory/.
.claude/skills/ defines the repeatable agent workflows:
report: closes one experiment by completing report.md, updating
experiment_history.md, marking the task as ready for review, and running
report validation.review: used by the coordinator to absorb completed experiments, update
retro/ knowledge, revise current_config.md, and keep task_board.md
focused on active work.spec-worktree: provisions and finalizes isolated SGLang worktrees for risky
source-code experiments.submit: turns a validated experiment configuration into a competition
submission package._lcy_work/memory/ is the shared state layer. The most important files are:
task_board.md: the active queue, priorities, current assumptions, and
rejected directions.current_config.md: the current best known configuration and hardware facts.experiment_history.md: one-line index of completed runs and links to
reports.harness.md: the collaboration contract between human, experiment session,
and coordinator session.coordinator_protocol.md: the automatic dispatch loop and sub-agent contract.retro/: distilled lessons grouped by use case instead of by date.design_rationale.md: why the harness is structured this way and which
heavier designs were rejected.The harness uses code for the constraints that should not rely only on prompts:
_lcy_work/infrastructure/capture.py stores full stdout/stderr and metadata
for benchmark/eval commands, while showing only a short tail to the agent._lcy_work/infrastructure/validate_report.py checks report structure, raw
evidence, metric consistency, and the correctness threshold._lcy_work/infrastructure/coordinator/runtime.py manages GPU locks, runtime
state, server launch, PID/PGID registration, and owned-process cleanup._lcy_work/infrastructure/coordinator/worktree.py creates, binds, finalizes,
and releases experiment worktrees..claude/hooks/require_capture.sh blocks direct benchmark/eval commands that
are not wrapped by capture.py.| Session | Role | Closure |
|---|---|---|
| Experiment | Executes one scoped task, edits code, runs eval/speed/profiling, writes report.md | /report |
| Coordinator | Reads completed reports, updates memory, prunes or creates tasks | /review |
| Deep research | Reads papers/code and writes design notes or candidate directions | Handoff doc, no experiment claim |
| Automatic coordinator | Dispatches experiment agents and handles completion events | coordinator_protocol.md loop |
The human sets high-level direction, decides when to stop, and reviews strategic tradeoffs. The harness stores state, enforces workflow, and preserves evidence. The coding agent reads the scoped context, edits code, runs experiments, writes reports, and hands results back to the coordinator.
This separation is what lets the project run across many sessions without turning the task board into a chat log or losing the reason why a direction was accepted, rejected, or deferred.
.
├── CLAUDE.md # agent entry rules and navigation
├── .claude/
│ ├── hooks/ # prompt-time guardrails
│ └── skills/ # report/review/worktree/submit workflows
├── _lcy_work/
│ ├── docs/ # research notes and handoffs
│ ├── external/ # vendored evaluation/training references
│ ├── infrastructure/ # runtime, capture, validation, sweep scripts
│ └── memory/ # task board, config, protocol, retrospectives
└── sglang/ # application case submodule
This repository intentionally excludes model weights, Hugging Face artifacts,
large run outputs under _lcy_work/runs/, submission tarballs, and teammate
workspace contents. The checked-in files are the harness, memory, scripts, and
references needed to understand the workflow.
For another coding-agent research project, the portable pieces are:
CLAUDE.md entry file with only hard rules and navigation./report) from cross-run absorption (/review).task_board.md, current_config.md, and experiment reports the source
of truth instead of the chat transcript.The SOAR/SGLang work is the concrete testbed: agents used this harness to read code, modify inference paths, run correctness and speed gates, profile kernels, package submissions, and review failed directions. The important artifact here is not a single optimization. It is the workflow that made repeated coding-agent experiments inspectable and recoverable.
1 commits
Python
69.1%
HTML
17.3%
Shell
10.4%
Cuda
3.2%
A file-based harness for running long-horizon coding-agent research sessions.
SOAR Harness was built during the SOAR 2026 LLM inference optimization competition, but SGLang is only the application case. The reusable artifact is the harness layer: Markdown contracts, project memory, skills, hooks, and small Python utilities that keep coding agents constrained, auditable, and resumable across many sessions.
This repository is best read as a working research artifact, not a packaged Python framework. It shows how to structure a real multi-session coding-agent project so that experiments can be resumed, reviewed, and trusted after the original chat context is gone.
| Layer | What it does | Files to inspect |
|---|---|---|
| Entry contract | Defines hard rules, role boundaries, and startup navigation | CLAUDE.md |
| Skills | Turns repeated workflows into explicit agent procedures | .claude/skills/ |
| Memory | Stores active tasks, current config, experiment history, and retrospectives | _lcy_work/memory/ |
| Evidence chain | Captures raw command outputs and validates report claims | capture.py, validate_report.py |
| Runtime guardrails | Tracks GPU locks, server processes, cleanup, and worktree isolation | runtime.py, worktree.py |
task_board.md
-> experiment session
-> capture.py raw logs + runs/<exp>/report.md
-> /report
-> experiment_history.md
-> coordinator /review
-> retro/, current_config.md, task_board.md
-> next experiment
The goal is not to make one agent "smarter" in a single prompt. The goal is to make many agent sessions behave like a disciplined engineering process:
CLAUDE.md stays small and points to memory,
protocol, and operations files instead of becoming a long manual./report; coordinator sessions absorb cross-run lessons with /review.CLAUDE.md is the session entry point. It keeps only the hard rules and file
navigation needed at startup: role boundaries, GPU/process safety, evidence
requirements, report/review discipline, and pointers into _lcy_work/memory/.
.claude/skills/ defines the repeatable agent workflows:
report: closes one experiment by completing report.md, updating
experiment_history.md, marking the task as ready for review, and running
report validation.review: used by the coordinator to absorb completed experiments, update
retro/ knowledge, revise current_config.md, and keep task_board.md
focused on active work.spec-worktree: provisions and finalizes isolated SGLang worktrees for risky
source-code experiments.submit: turns a validated experiment configuration into a competition
submission package._lcy_work/memory/ is the shared state layer. The most important files are:
task_board.md: the active queue, priorities, current assumptions, and
rejected directions.current_config.md: the current best known configuration and hardware facts.experiment_history.md: one-line index of completed runs and links to
reports.harness.md: the collaboration contract between human, experiment session,
and coordinator session.coordinator_protocol.md: the automatic dispatch loop and sub-agent contract.retro/: distilled lessons grouped by use case instead of by date.design_rationale.md: why the harness is structured this way and which
heavier designs were rejected.The harness uses code for the constraints that should not rely only on prompts:
_lcy_work/infrastructure/capture.py stores full stdout/stderr and metadata
for benchmark/eval commands, while showing only a short tail to the agent._lcy_work/infrastructure/validate_report.py checks report structure, raw
evidence, metric consistency, and the correctness threshold._lcy_work/infrastructure/coordinator/runtime.py manages GPU locks, runtime
state, server launch, PID/PGID registration, and owned-process cleanup._lcy_work/infrastructure/coordinator/worktree.py creates, binds, finalizes,
and releases experiment worktrees..claude/hooks/require_capture.sh blocks direct benchmark/eval commands that
are not wrapped by capture.py.| Session | Role | Closure |
|---|---|---|
| Experiment | Executes one scoped task, edits code, runs eval/speed/profiling, writes report.md | /report |
| Coordinator | Reads completed reports, updates memory, prunes or creates tasks | /review |
| Deep research | Reads papers/code and writes design notes or candidate directions | Handoff doc, no experiment claim |
| Automatic coordinator | Dispatches experiment agents and handles completion events | coordinator_protocol.md loop |
The human sets high-level direction, decides when to stop, and reviews strategic tradeoffs. The harness stores state, enforces workflow, and preserves evidence. The coding agent reads the scoped context, edits code, runs experiments, writes reports, and hands results back to the coordinator.
This separation is what lets the project run across many sessions without turning the task board into a chat log or losing the reason why a direction was accepted, rejected, or deferred.
.
├── CLAUDE.md # agent entry rules and navigation
├── .claude/
│ ├── hooks/ # prompt-time guardrails
│ └── skills/ # report/review/worktree/submit workflows
├── _lcy_work/
│ ├── docs/ # research notes and handoffs
│ ├── external/ # vendored evaluation/training references
│ ├── infrastructure/ # runtime, capture, validation, sweep scripts
│ └── memory/ # task board, config, protocol, retrospectives
└── sglang/ # application case submodule
This repository intentionally excludes model weights, Hugging Face artifacts,
large run outputs under _lcy_work/runs/, submission tarballs, and teammate
workspace contents. The checked-in files are the harness, memory, scripts, and
references needed to understand the workflow.
For another coding-agent research project, the portable pieces are:
CLAUDE.md entry file with only hard rules and navigation./report) from cross-run absorption (/review).task_board.md, current_config.md, and experiment reports the source
of truth instead of the chat transcript.The SOAR/SGLang work is the concrete testbed: agents used this harness to read code, modify inference paths, run correctness and speed gates, profile kernels, package submissions, and review failed directions. The important artifact here is not a single optimization. It is the workflow that made repeated coding-agent experiments inspectable and recoverable.
1 commits
Python
69.1%
HTML
17.3%
Shell
10.4%
Cuda
3.2%