Autonomous Coding Agent
A Go binary that runs on your server, polls GitHub Issues for tasks, and executes them end-to-end using Claude Code — committing code, opening PRs, watching CI, and looping back when tests fail.
Madar is an autonomous software engineering agent written in Go. It bridges
GitHub Issues and Claude Code CLI — you describe
a task in a GitHub Issue, apply the ready label, and Madar does the rest:
coding, testing, committing, PR creation, and CI monitoring, all without human interaction.
Open a GitHub Issue with a clear description and apply the ready label.
The agent polls every 15–60 seconds, claims the issue, transitions it to in-progress, and spawns a Claude Code session inside a local clone of the repo.
Claude Code edits files, runs shell commands, commits changes, creates a branch, and opens a PR — all autonomously.
Madar watches GitHub Actions. If CI fails, it re-invokes Claude with the failure output, up to a configured retry limit.
On success, the issue is marked done and you get a Telegram notification. If clarification is needed, Madar posts a question and waits for your GitHub reply.
Wraps the Claude Code CLI in headless stream-json mode. Each task maps to a persistent session UUID — resumable after crashes or human replies.
No custom UI. State is expressed as labels: ready → in-progress → done. Search, filter, and assign natively in GitHub.
Polls GitHub Actions after each PR. Automatically re-invokes Claude with test failure output until green or a retry cap is reached.
Instant alerts when tasks complete or Claude needs input. Reply on GitHub — Madar detects your comment and resumes the session.
Persists task ↔ session mapping, CI retry counters, and an audit log. Survives process restarts; zero operational overhead.
An idempotent shell installer sets up dependencies, authenticates Claude, configures the agent interactively, and installs a systemd service.
Madar wraps the claude CLI rather than reimplementing agentic behavior. Claude Code already handles file edits, shell execution, and session memory — Madar provides the loop, board integration, and lifecycle management.
Polling requires no inbound networking — the server needs no open ports. For a single-operator setup, 15–60 second latency is acceptable and keeps the deployment simple.
One active task at a time. The concurrency guard uses GitHub labels as a distributed lock — no race conditions by design. Parallel execution is a config switch away.
UUIDs are minted at claim-time before Claude launches. The task ↔ session link exists in SQLite even if the process crashes mid-run, enabling safe resumption.
One command installs everything: Node.js, gh CLI, Claude Code, the Madar binary, and a systemd service — with interactive prompts for your tokens.