Skip to main content

Git automation & CI/CD

AgentDesk connects AI sessions to normal Git delivery. Its lifecycle hooks capture prompts, save session summaries, reconcile commits with backend memory and—when enabled—commit and push code.

The delivery flow

prompt → CLI session → changed files → attributed commit
→ backend commit/prompt link → batched push
→ existing GitHub or Bitbucket CI/CD pipeline

AgentDesk does not replace your CI provider. A push triggers the workflow already configured in the repository—for example GitHub Actions, Bitbucket Pipelines, Railway or another deployment service watching the branch.

Supported CLI lifecycle hooks

Project creation and the Settings refresh action install managed integration for:

  • Claude Code
  • Codex CLI
  • Gemini CLI

Prompt hooks capture the request and session identity. Stop hooks save the session summary, refresh memory, reconcile Git history, and perform commit/push work when enabled. This is separate from native .git/hooks; core.hooksPath does not need to be set.

Commit identity and messages

Commit messages identify the tool that produced the change, for example:

[codex cli] fix memory provenance reconciliation
[claude cli] add invoice validation
[gemini cli] update dashboard filters

The Git author remains the registered human user configured for the repository. The tool is recorded in the message and backend provenance; it does not impersonate a separate GitHub or Bitbucket user.

Push batching

AgentDesk can commit completed CLI work promptly while pushing only after a configurable number of commits (10 by default). This reduces noisy remote updates while preserving detailed local history. Change the interval in project Settings.

If a CLI or user commits directly, the Stop hook still reconciles that commit into AgentDesk—even when the working tree is clean. Reconciliation is repeatable and does not duplicate an already-known commit or work-log entry.

Reference a stable work-item ID in a commit message to make the relationship explicit:

[codex cli] fix expired sessions; fixes BU3001

AgentDesk links the commit to raw session evidence, advances the item to review and adds the result to its parent use case’s “What was done” history. Refreshed memory and .okf/ then expose that delivery to other tools.

Branches and remotes

AgentDesk works with GitHub and Bitbucket repositories, uses the repository's real Git root and respects its current/default branch. Remote connection, pull/push status and repository settings are available in the project Settings and Git views.

For safety, review branch protection and CI rules before enabling automatic pushes on a protected or production branch. Teams commonly use a development branch plus pull requests when deployments require approval.

Enable or repair automation

  1. Open the project in AgentDesk.
  2. Go to Settings and open the CLI/integration section.
  3. Enable automatic commit/push and choose the push interval.
  4. Refresh or repair integrations after installing a new CLI or moving the project.
  5. Confirm the remote and branch before the first automated push.

Next: Models & keys →