Files
archie/.okf/codebase/internal/agentexec/subprocess.md
T
sam 7c34bdae5a okf: scaffold knowledge bundle and MCP server config
Adds a harvested .okf/ knowledge bundle (codebase concepts + starter
architecture/services/rules scaffolding) and .mcp.json pointing at the
shared okf MCP service (http://localhost:8765/archie-core/), which
serves multiple projects' bundles from a single process.
2026-07-22 04:36:50 +10:00

51 lines
1.1 KiB
Markdown

---
description: Source module internal/agentexec/subprocess.go (162 lines).
resource: internal/agentexec/subprocess.go
tags:
- go
- source
timestamp: "2026-07-21T18:36:22Z"
title: subprocess.go
type: Module
---
# Module subprocess.go
**Path**: `internal/agentexec/subprocess.go`
**Lines**: 162
## Snippet Preview
```
package agentexec
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"os/exec"
"strings"
)
const maxDiagnosticBytes = 64 << 10
// SubprocessRunner executes each agent stage in a fresh archie-agent process.
type SubprocessRunner struct {
Command string
Args []string
// Environ is the daemon environment to select from. AdditionalEnv names
// operator-approved compatibility variables; the requested provider's key
// variable is added automatically for that invocation only.
Environ []string
AdditionalEnv []string
Diagnostics io.Writer
Providers map[string]Provider
}
func (r *SubprocessRunner) Run(ctx context.Context, workspace string, req Request) (Result, error) {
providerName, _, ok := strings.Cut(req.Model, "/")
```