Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b8248c7
[AI-68] docs: design for hosted Codex agents on macOS and Linux
alexeyzimarev May 14, 2026
9ef7929
[AI-68] docs: address review findings on hosted-Codex design
alexeyzimarev May 14, 2026
cfe4c3a
[AI-68] docs: address second-round review on hosted-Codex design
alexeyzimarev May 14, 2026
58a6495
[AI-68] docs: address third-round review on hosted-Codex design
alexeyzimarev May 14, 2026
a0fcc50
[AI-68] docs: address fourth-round review on hosted-Codex design
alexeyzimarev May 14, 2026
b549d30
[AI-68] docs: drop back-compat layers; vendor is a required field
alexeyzimarev May 14, 2026
34669e7
[AI-68] docs: implementation plan for hosted Codex agents (CLI/daemon…
alexeyzimarev May 14, 2026
88f8018
[AI-68] deps: add Tomlyn for Codex config.toml pre-trust
alexeyzimarev May 14, 2026
87ba40f
[AI-68] deps: pin Spectre.Console + Microsoft.* to versions matching …
alexeyzimarev May 14, 2026
16ea6ae
[AI-68] core: extract CodexHooksParser for daemon-side preflight reuse
alexeyzimarev May 14, 2026
24e1fbd
[AI-68] test: enforce CodexHookEvents order positionally
alexeyzimarev May 14, 2026
bbfdfbe
[AI-68] core: make CodexPaths computed so tests can scope HOME
alexeyzimarev May 14, 2026
ea290bd
[AI-68] cli: extract DaemonBridgeUrl loopback helper for Codex reuse
alexeyzimarev May 14, 2026
1ef2dc8
[AI-68] cli: collapse TryGetLoopbackDaemonUrl to single delegation
alexeyzimarev May 14, 2026
96f2384
[AI-68] daemon: add CodexHooksNotInstalledException for preflight fai…
alexeyzimarev May 14, 2026
f90b472
[AI-68] daemon: CodexConfigWriter pre-trusts worktrees in ~/.codex/co…
alexeyzimarev May 14, 2026
90fff64
[AI-68] test: serialise HOME-mutating tests via shared NotInParallel key
alexeyzimarev May 14, 2026
8d52377
[AI-68] models: required Vendor field on LaunchAgentCommand
alexeyzimarev May 14, 2026
542c7cd
[AI-68] models: required Vendor field on AgentRunStarted
alexeyzimarev May 14, 2026
0d7ed1d
[AI-68] daemon: ServerConnection.RequestPermissionAsync gains vendor …
alexeyzimarev May 14, 2026
3b04c85
[AI-68] cli: Claude permission-request posts to /claude/permission-re…
alexeyzimarev May 14, 2026
1458b3d
[AI-68] daemon: define IHostedAgentLauncher strategy interface
alexeyzimarev May 14, 2026
d3f80a9
[AI-68] daemon: WIP extract ClaudeLauncher (next: wire through orches…
alexeyzimarev May 14, 2026
2bbab72
[AI-68] daemon: AgentInstance carries Vendor for cleanup dispatch
alexeyzimarev May 14, 2026
9664019
[AI-68] daemon: orchestrator dispatches launches through IHostedAgent…
alexeyzimarev May 14, 2026
067b95b
[AI-68] daemon: add CodexPath config field
alexeyzimarev May 14, 2026
8c4f8d9
[AI-68] daemon: CodexLauncher with overlay + hook preflight + pre-trust
alexeyzimarev May 14, 2026
4049422
[AI-68] daemon: LocalPermissionBridge per-vendor URL routing + respon…
alexeyzimarev May 14, 2026
74c58da
[AI-68] cli: codex-hook PermissionRequest bridges through daemon (fai…
alexeyzimarev May 15, 2026
b556ce0
[AI-68] daemon: DI registers ClaudeLauncher + CodexLauncher
alexeyzimarev May 15, 2026
62f22da
[AI-68] docs: README + help text for hosted Codex agents
alexeyzimarev May 15, 2026
cfccafd
[AI-68] verify: AOT clean + all tests green
alexeyzimarev May 15, 2026
eea9419
[AI-68] cli: long PermissionRequest hook timeout (24h) so dashboard d…
alexeyzimarev May 15, 2026
78e49fe
[AI-68] config: wire claude_path + codex_path through daemon profile
alexeyzimarev May 15, 2026
ed4e6b0
[AI-68] merge: integrate main (AI-629 skills install, AI-630 flock, A…
alexeyzimarev May 15, 2026
4173de3
[AI-68] fix: harden HomeDirectory against empty/relative HOME and Fil…
alexeyzimarev May 15, 2026
5633b19
[AI-68] test: globally serialize Stop + PermissionRequest_records to …
alexeyzimarev May 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<MinVerTagPrefix>v</MinVerTagPrefix>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MinVer" Version="7.0.0" PrivateAssets="All" />
<PackageReference Include="MinVer" PrivateAssets="All" />
</ItemGroup>
</Project>
17 changes: 17 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="IdentityModel.OidcClient" Version="6.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.Client" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.8" />
<PackageVersion Include="MinVer" Version="7.0.0" />
<PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="Spectre.Console" Version="0.55.2" />
<PackageVersion Include="Tomlyn" Version="2.4.0" />
<PackageVersion Include="TUnit" Version="1.18.37" />
<PackageVersion Include="WireMock.Net" Version="1.7.0" />
</ItemGroup>
</Project>
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ kapacitor setup --server-url https://capacitor.example.com --default-visibility

#### Also using Codex CLI?

`setup` installs Claude Code hooks only. If you also use Codex CLI and want those sessions captured too, install the Codex hook surface separately:
`setup` installs Claude Code hooks only. If you also use Codex CLI — either for local sessions or for hosting agents via the daemon — install the Codex hook surface separately:

```bash
kapacitor plugin install --codex # user-wide (~/.codex/hooks.json)
Expand Down Expand Up @@ -193,7 +193,7 @@ Non-interactive runs (no TTY, e.g. CI) must pass both a scope flag and `--yes`.

### Agent daemon

The agent daemon connects to the Capacitor server and runs Claude Code agents in isolated git worktrees, controlled from the dashboard.
The agent daemon connects to the Capacitor server and runs Claude Code agents in isolated git worktrees, controlled from the dashboard. The daemon supports hosted Claude and Codex agents on macOS and Linux — choose the vendor from the dashboard's launch dialog.

```bash
kapacitor agent start # start in foreground (defaults --name to your OS username)
Expand All @@ -211,6 +211,42 @@ Each daemon process holds an exclusive `flock` on `~/.config/kapacitor/agents/<n

Two daemons with **different** `--name` values can run side-by-side. Two daemons under the **same name** on the same machine collide on the flock and the second one exits with code 2. Even if that guard is bypassed somehow, the server rejects the second daemon's `DaemonConnect` with a typed error and the second daemon exits with code 3 — no more silent slot-displacement oscillation.

#### Hosted Codex agents

To launch hosted Codex agents from the dashboard, the Codex hook surface must be installed first:

```bash
kapacitor plugin install --codex # user scope (~/.codex/hooks.json)
kapacitor plugin install --codex --project # project scope (<repo>/.codex/hooks.json)
```

The daemon starts Codex with `--sandbox workspace-write` and `--ask-for-approval on-request`. This lets Codex edit files in the agent's worktree but escalates sensitive operations (e.g. network calls, shell commands outside the worktree) through the daemon's permission bridge to the dashboard.

> **Upgrading from an earlier version of kapacitor?** Re-run `kapacitor plugin install --codex` to refresh your `~/.codex/hooks.json`. Older installs used a 30-second timeout on the `PermissionRequest` hook, which would cause Codex to kill the hook before the dashboard could send back an approval or denial for prompts that take longer than 30 seconds to decide. The current install writes a 24-hour timeout for that event.

PR review for hosted Codex agents is not yet supported (tracked in AI-632). The sandbox and approval-mode selectors in the launch dialog are also planned as a follow-up (AI-633).

#### Daemon config settings

Use `kapacitor config set` to configure the binary paths used by the daemon. The values are stored in the active profile and take effect the next time the daemon starts.

```bash
kapacitor config set daemon.claude_path /opt/claude/bin/claude
kapacitor config set daemon.codex_path /opt/codex/bin/codex
```

| Key | Default | Description |
|-----|---------|-------------|
| `daemon.claude_path` | `"claude"` | Path to the Claude CLI binary. Resolved via `PATH` when not an absolute path. |
| `daemon.codex_path` | `"codex"` | Path to the Codex CLI binary. Resolved via `PATH` when not an absolute path. |

You can also override these at runtime with environment variables (take precedence over the profile):

```bash
KAPACITOR_CLAUDE_PATH=/opt/claude/bin/claude kapacitor daemon
KAPACITOR_CODEX_PATH=/opt/codex/bin/codex kapacitor daemon
```

### Repository paths

Manage known repo paths for the agent launch dialog. Repos are automatically added when agents are launched, but you can also manage the list manually:
Expand Down
Loading
Loading