Skip to content

feat(agent-workspace): auto-execute agent command on terminal connect#2364

Open
MarsKubeX wants to merge 1 commit into
openkaiden:mainfrom
MarsKubeX:execute-agent-in-terminal
Open

feat(agent-workspace): auto-execute agent command on terminal connect#2364
MarsKubeX wants to merge 1 commit into
openkaiden:mainfrom
MarsKubeX:execute-agent-in-terminal

Conversation

@MarsKubeX

Copy link
Copy Markdown
Contributor

When switching to the workspace terminal for the first time, look up the agent's registered command from the sandbox labels and write it to the PTY once the shell is ready, removing the need for users to type it manually.

Closes #2357

Grabacion.de.pantalla.2026-07-03.a.las.13.50.40.mov

When switching to the workspace terminal for the first time, look up the
agent's registered command from the sandbox labels and write it to the PTY
once the shell is ready, removing the need for users to type it manually.

Closes openkaiden#2357

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Marcel Bertagnini <mbertagn@redhat.com>
@MarsKubeX MarsKubeX requested a review from a team as a code owner July 3, 2026 11:52
@MarsKubeX MarsKubeX requested review from benoitf and jeffmaury and removed request for a team July 3, 2026 11:52
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@MarsKubeX, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 93827b8c-a947-42aa-9567-b0fe96704247

📥 Commits

Reviewing files that changed from the base of the PR and between 0e5e19b and 3371f66.

📒 Files selected for processing (2)
  • packages/main/src/plugin/agent-workspace/agent-workspace-manager.spec.ts
  • packages/main/src/plugin/agent-workspace/agent-workspace-manager.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jeffmaury jeffmaury left a comment

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.

The command should be set at creation time see

@MarsKubeX

MarsKubeX commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

The command should be set at creation time see

Thanks for the suggestion @jeffmaury . Tried with command: [agent.command] and it doesn't work. The command in openshell sandbox create runs immediately during provisioning, before providers are ready (fails with "Missing provider: claude-code"). It's not stored as a connect-time command. So we need to write it to the terminal after the sandbox is fully up.

@MarsKubeX MarsKubeX requested review from a team, bmahabirbu and fbricon July 6, 2026 07:40

@bmahabirbu bmahabirbu left a comment

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.

Image

Gave it a whirl tested on my openclaw pr and it works!!

LGTM test wise

Sign up for free to 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.

When switching to the workspace terminal, execute the agent command

3 participants