Skip to content

feat(coding-agent): add public agent creation command - #1991

Closed
sethkarten wants to merge 1 commit into
mainfrom
fix/new-prime-agent-session-cli
Closed

feat(coding-agent): add public agent creation command#1991
sethkarten wants to merge 1 commit into
mainfrom
fix/new-prime-agent-session-cli

Conversation

@sethkarten

@sethkarten sethkarten commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a public prime-agent create [options] [name] -- <message> command
  • create the top-level agent and submit its first user prompt through the existing daemon protocol
  • start the background service on cold invocations
  • cover routing, prompt parsing, empty-message rejection, JSON output, and cold startup

Context

PR #423 intentionally removed the public prime-agent daemon ... hierarchy in favor of task-oriented commands. Automation that created top-level sessions with daemon create and daemon prompt then had no supported replacement, while list, send, attach, and other agent operations did.

This adds the missing task-oriented operation without restoring the old daemon command group. It is a backward-compatible CLI addition and does not change the daemon protocol or response schema.

Linear: RES-1256

Related: #423

Validation

  • cd packages/coding-agent && npx tsx ../../node_modules/vitest/dist/cli.js --run test/daemon-command.test.ts test/daemon-launch.test.ts test/public-command.test.ts (85 passed)
  • npm run check

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 63f4875. Configure here.

) {
return fail(`Usage: ${APP_NAME} ${getCommandSpec(["create"])!.usage}`);
}
return runInternalAgentCommand("create", args.slice(1));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cold create can fail to connect

High Severity

Public create only kicks off a fire-and-forget early daemon launch, then DaemonClient.connect runs immediately. That connect fails as soon as the socket is missing, so a cold prime-agent create can error while the background service is still starting. Interactive startup awaits ensureInteractiveDaemonRunning, and runOpen starts the daemon if needed; this path does neither.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 63f4875. Configure here.

@sethkarten

Copy link
Copy Markdown
Contributor Author

Closing in favor of #1996.

This PR added a second CLI entry point, but the intended capability is explicit top-level session creation from the RLM host. #1996 keeps rlm(...) child semantics unchanged and adds the separate rlm.create_session(...) operation for daemon-backed depth-0 agents.

@sethkarten sethkarten closed this Sep 2, 2026
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.

1 participant