feat(codegen): optional local Claude Code agent via codegen-go#18
Merged
teslashibe merged 1 commit intomainfrom Apr 22, 2026
Merged
feat(codegen): optional local Claude Code agent via codegen-go#18teslashibe merged 1 commit intomainfrom
teslashibe merged 1 commit intomainfrom
Conversation
Adds an opt-in local-execution path for the Claude Code CLI (and any
other "prompt-on-stdin, edit-files-in-cwd" CLI like Codex / Aider /
OpenHands / Cline) via the new teslashibe/codegen-go module.
Complementary to the Anthropic Managed Agents path — Managed Agents
stays the default; reach for this when the agent needs filesystem
access on this machine, on-prem execution, off-platform tools, or a
non-Anthropic CLI you've already integrated with.
- New dep github.com/teslashibe/codegen-go v0.1.1
- backend/internal/codegen/codegen.go — ~100-LoC shim:
- LoadFromEnv() reads CODEGEN_* env vars and returns an Agent
- Re-exports Agent, Config, Result so callers stay on a single import
- backend/internal/codegen/codegen_test.go — defaults / generic /
missing-command / CSV-parser coverage
- backend/cmd/codegen-demo/main.go — runnable proof:
go run ./backend/cmd/codegen-demo "Summarise this directory."
- backend/.env.example: opt-in CODEGEN_* block (commented out)
- README.md: new "Local code-generation agent (optional)" section
Tested: go vet ./..., go build ./..., go test ./... — all green
(9 packages, includes new internal/codegen tests).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
teslashibe/codegen-gomodule.What's new
github.com/teslashibe/codegen-go v0.1.1.backend/internal/codegen/codegen.go— ~100-LoC shim:LoadFromEnv()— readsCODEGEN_*env vars and returns a configuredAgent.Agent,Config,Resultso callers stay on a single import.backend/internal/codegen/codegen_test.go— defaults / generic / missing-command / CSV-parser coverage.backend/cmd/codegen-demo/main.go— runnable proof:go run ./backend/cmd/codegen-demo "Summarise this directory in one paragraph."CODEGEN_*block inbackend/.env.example(commented out, opt-in).README.md.What's unchanged
cmd/provision,internal/agent, the SSE event shape, every API route — all identical.Test plan
cd backend && go vet ./...cd backend && go build ./...cd backend && go test ./...— 9 packages green, including newinternal/codegensuite