Basic use
bash
cd ~/code/your-project
xc i # start a session in the current repo
xc i "implement OAuth login" # with an initial prompt
xc i --skill ui # explicit skill (skips auto-detect)What happens on boot
xc bootruns as a SessionStart hook — the agent receives a fresh orientation block (recent merges, open PRs, active branches, fresh specs) plus the flow-discipline framing.- PreToolUse hooks become live:
no-edit-on-integrationon every edit/commit,typecheck-must-pass-before-commiton every commit,commit-must-reference-issueon every commit message. - Stop hook becomes live:
session-end-pr-backstopfires when the agent ends with commits ahead of integration but no PR. - Skills (auto-detected from the repo) inject system prompts —
ui,backend,devops,testing,pr-iteration, etc.
Choosing the agent runtime
xCoder wraps several coding-agent runtimes. The default is whichever you have installed; you can pin a specific one with xc mode:
| Runtime | Mode id | Notes |
|---|---|---|
| Claude Code | claude-code | Default. Best hook integration today. |
| Cursor | cursor | Headless mode via composer-run; partial hook integration. |
| Codex | codex | OpenAI Codex CLI. |
| OpenCode | opencode | open-source Claude alternative; settings.json-based hooks. |
| Zed | zed | Zed AI assistant; experimental driver. |
bash
xc modes # list available runtimes
xc mode <agent-id> codex # pin a specific agent to CodexWatching from another terminal
While your session runs, you can watch the FlowEngine's view of the world from another terminal:
bash
xc flow status
xc flow events --type flow.transition
xc flow events --type flow.bypass
xc autopilot status # if you also have autopilot runningBypassing a guard mid-session
Sometimes you genuinely need to override. xCoder makes that explicit:
Three explicit override paths
XCODER_ALLOW_INTEGRATION_EDIT=1 git ...— single shell invocation; right for hotfixes.XCODER_SKIP_QA_GATE=1 git commit ...— single shell invocation; right for WIP commits.xc flow override I-N --reason "..."— recorded for the active task; emitsflow.bypass.
When the session ends
The Stop hook fires. If you've finished real work but forgot to push and open a PR, you'll see this in stderr:
text
xCoder backstop notice — branch `feat/widget` has 3 commits ahead of `main` but no open PR.
Open a PR to ship this work:
gh pr create --fill --base main
Or set XCODER_AUTO_PR=1 to have the backstop auto-open future PRs.