Skip to content

feat(cloud-agent): create GitHub-signed commits in cloud runs#2283

Merged
tatoalo merged 2 commits into
mainfrom
feat/cloud-agent/agent-signed-git-wiring
May 21, 2026
Merged

feat(cloud-agent): create GitHub-signed commits in cloud runs#2283
tatoalo merged 2 commits into
mainfrom
feat/cloud-agent/agent-signed-git-wiring

Conversation

@tatoalo
Copy link
Copy Markdown
Contributor

@tatoalo tatoalo commented May 21, 2026

Problem

The cloud agent must create GitHub-signed commits across both the Claude and Codex adapters

signed_commit

Changes

Wires the git_signed_commit MCP tool into the agent:

  • a shared tool definition (signed-commit-shared.ts) used by both adapters
  • claude adapter support
  • codex adapte support
  • cloud system prompt updated to stage with git add and commit through the tool

Copy link
Copy Markdown
Contributor Author

tatoalo commented May 21, 2026

@tatoalo tatoalo force-pushed the feat/cloud-agent/signed-commit-git branch from 75ff8ae to 59c67ab Compare May 21, 2026 12:33
@tatoalo tatoalo force-pushed the feat/cloud-agent/agent-signed-git-wiring branch from ab183fb to 988ae14 Compare May 21, 2026 12:33
@tatoalo tatoalo changed the title feat(agent): create GitHub-signed commits in cloud runs feat(cloud-agent): create GitHub-signed commits in cloud runs May 21, 2026
@tatoalo tatoalo self-assigned this May 21, 2026
@tatoalo tatoalo force-pushed the feat/cloud-agent/signed-commit-git branch from 59c67ab to e10d218 Compare May 21, 2026 13:18
@tatoalo tatoalo force-pushed the feat/cloud-agent/agent-signed-git-wiring branch 2 times, most recently from 465d5df to c8c1b8f Compare May 21, 2026 13:33
@tatoalo tatoalo force-pushed the feat/cloud-agent/signed-commit-git branch from e10d218 to af4129c Compare May 21, 2026 13:33
@tatoalo tatoalo marked this pull request as ready for review May 21, 2026 13:33
@tatoalo tatoalo force-pushed the feat/cloud-agent/signed-commit-git branch from af4129c to ed1b37b Compare May 21, 2026 13:37
@tatoalo tatoalo force-pushed the feat/cloud-agent/agent-signed-git-wiring branch from c8c1b8f to 6e930dd Compare May 21, 2026 13:37
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 21, 2026

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
packages/agent/src/adapters/codex/codex-agent.ts:587-590
The `meta?.taskId ?? meta?.persistence?.taskId` resolution pattern is duplicated verbatim in both `claude-agent.ts` (line 1101) and here. Extracting it to a small helper in `signed-commit-shared.ts` (or `utils/common.ts`) would satisfy the OnceAndOnlyOnce rule and keep the two adapters in sync if the fallback chain ever changes.

```suggestion
  private applySignedCommit<
    T extends { cwd?: string; mcpServers?: McpServer[]; _meta?: unknown },
  >(request: T, meta: NewSessionMeta | undefined): T {
    const taskId = resolveTaskId(meta);
```

Reviews (1): Last reviewed commit: "feat(cloud-agent): create GitHub-signed ..." | Re-trigger Greptile

Comment thread packages/agent/src/adapters/codex/codex-agent.ts Outdated
@tatoalo tatoalo force-pushed the feat/cloud-agent/agent-signed-git-wiring branch from 6e930dd to 114628d Compare May 21, 2026 13:47
@tatoalo tatoalo force-pushed the feat/cloud-agent/signed-commit-git branch from ed1b37b to c34db07 Compare May 21, 2026 13:49
@tatoalo tatoalo force-pushed the feat/cloud-agent/agent-signed-git-wiring branch from 114628d to fb90079 Compare May 21, 2026 13:49
@tatoalo tatoalo requested a review from a team May 21, 2026 13:53
* Wraps the runtime-agnostic core in `@posthog/git/signed-commit`. Registered
* per cloud session in `claude-agent.ts`.
*/
export function createSignedCommitMcpServer(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we do a standard MCP server for all these local tools we'll want, instead of one for each? small thing but it'd be nice to let other folks add tools easily to a general local mcp server

@tatoalo tatoalo force-pushed the feat/cloud-agent/signed-commit-git branch from c34db07 to ecbb810 Compare May 21, 2026 15:17
@tatoalo tatoalo force-pushed the feat/cloud-agent/agent-signed-git-wiring branch from fb90079 to 0f102dc Compare May 21, 2026 15:17
@tatoalo tatoalo added the Create Release This will trigger a new release label May 21, 2026
@tatoalo tatoalo changed the base branch from feat/cloud-agent/signed-commit-git to graphite-base/2283 May 21, 2026 15:28
Wire the git_signed_commit MCP tool into the Claude (in-process) and Codex (stdio) adapters via a shared definition. Block git commit/push in cloud runs with a PreToolUse guard and update the cloud system prompt to commit through the tool.
@tatoalo tatoalo force-pushed the graphite-base/2283 branch from ecbb810 to 31db29c Compare May 21, 2026 15:28
@tatoalo tatoalo force-pushed the feat/cloud-agent/agent-signed-git-wiring branch from 0f102dc to bdf1fc8 Compare May 21, 2026 15:28
@graphite-app graphite-app Bot changed the base branch from graphite-base/2283 to main May 21, 2026 15:28
Replace the per-tool MCP servers (signed-commit) with a single general
'posthog-local' server driven by a shared tool registry, so new local
tools are added with one registry entry and exposed on both the Claude
(in-process) and Codex (stdio) adapters automatically.
@tatoalo tatoalo force-pushed the feat/cloud-agent/agent-signed-git-wiring branch from bdf1fc8 to 39665b5 Compare May 21, 2026 15:28
@tatoalo tatoalo merged commit bf3293b into main May 21, 2026
16 checks passed
Copy link
Copy Markdown
Contributor Author

tatoalo commented May 21, 2026

Merge activity

@tatoalo tatoalo deleted the feat/cloud-agent/agent-signed-git-wiring branch May 21, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Create Release This will trigger a new release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants