Skip to content

Commit/rebase via PTY relay - #19

Merged
roulpriya merged 1 commit into
mainfrom
feat/commit-rebase-via-pty
Apr 30, 2026
Merged

Commit/rebase via PTY relay#19
roulpriya merged 1 commit into
mainfrom
feat/commit-rebase-via-pty

Conversation

@recrsn

Copy link
Copy Markdown
Contributor

Summary

Stacked on #17 (refactor/agents-router-factory)

Commit via PTY

POST /agents/:id/commit now sends a natural-language prompt to the running agent via PTY instead of calling git commit directly. If the agent is not running it is respawned first so it can receive the instruction. This means the agent decides the commit message and can handle staged/unstaged state itself.

Rebase conflict relay

When a rebase conflict occurs and the agent is running, the backend sends a conflict-resolution prompt via PTY and returns resolving: true. The frontend now uses result.resolving instead of checking agent.status === "running" locally, moving the detection server-side.

Merge button gated on commits ahead

  • DiffResult gains aheadCount (computed via rev-list --count merge-base..HEAD)
  • Merge button is visible whenever aheadCount > 0, regardless of ticket status
  • Previously required ticket.status === "review", which was never reached when the agent keeps running after committing via PTY

Kill → Restart

The KILL button is replaced by RESTART, wiring up the restart endpoint from #17.

Test plan

  • Click COMMIT with a running agent; confirm agent receives the prompt and commits
  • Click COMMIT with a stopped agent; confirm agent is respawned and receives the prompt
  • Trigger a rebase conflict on a running agent; confirm agent receives the conflict message
  • Make commits in a worktree; confirm MERGE button appears without needing to move ticket to review

🤖 Generated with Claude Code

@coderabbitai

coderabbitaiBot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@recrsn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 33 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3ae5c443-d070-4516-a393-0abd4ccb9108

📥 Commits

Reviewing files that changed from the base of the PR and between 3253856 and dd86bc6.

📒 Files selected for processing (5)
  • src/backend/routes/agents.ts
  • src/backend/services/GitWorktreeManager.ts
  • src/common/types.ts
  • src/frontend/components/AgentDetailPanel.tsx
  • src/frontend/lib/api.ts

Review rate limit: 0/3 reviews remaining, refill in 2 minutes and 33 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@recrsn
recrsnforce-pushed the refactor/agents-router-factory branch from 58796f6 to 798f470CompareApril 30, 2026 18:06
Base automatically changed from refactor/agents-router-factory to mainApril 30, 2026 18:12
Commit:
- POST /agents/:id/commit now sends a prompt to the running agent via PTY
instead of doing a raw git commit; if the agent is stopped it is
respawned first so it can receive the instruction
Rebase:
- When the agent is running and a rebase conflict occurs, the backend
sends a resolution prompt via PTY and returns resolving:true
- Frontend uses result.resolving instead of checking agent.status,
moving the detection server-side
Merge button:
- DiffResult gains aheadCount (rev-list --count merge-base..HEAD)
- Merge button is visible whenever aheadCount > 0, regardless of ticket
status — previously required ticket.status === "review" which was never
reached when the agent keeps running after committing
- Kill button replaced by Restart (wires up the restart endpoint from
the router refactor)
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@recrsn
recrsnforce-pushed the feat/commit-rebase-via-pty branch from 82beb3c to dd86bc6CompareApril 30, 2026 18:25
@recrsnrecrsn changed the title feat: commit/rebase via PTY relay; gate merge button on commits aheadCommit/rebase via PTY relayApr 30, 2026
@roulpriya
roulpriya merged commit 7d39129 into mainApr 30, 2026
2 checks passed
@roulpriya
roulpriya deleted the feat/commit-rebase-via-pty branch April 30, 2026 18:27
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@recrsn@roulpriya