Skip to content

feat(agentctl): update an agent in ~/agents from its source - #367

Open
elsand wants to merge 1 commit into
feat/agentctl-setupfrom
feat/setup-update
Open

elsand wants to merge 1 commit into
feat/agentctl-setupfrom
feat/setup-update

Conversation

@elsand

@elsand elsand commented Oct 29, 2026

Copy link
Copy Markdown

An agent that setup made could be connected, signed in or replaced, and replacing deletes its disk. So a change to its definition, in a team's repository or in a folder of your own, had no way in short of starting over.

Setup now records where it made an agent from, and offers to update it from there (--action update). The update fetches the definition again and keeps what setup's questions decided: name, size, default harness, mounts, GitHub access and an image built here. It reuses the .env, asking only for values the definition newly declares, lists the files that change, and applies the result in place, so the agent keeps its disk and sessions.

agentd cannot change some fields of an existing agent, such as its image. When an update changes one, setup names it and offers to create the agent again, as replacing does. A script must pass --replace. Those rules now live on Spec, so agentd and setup share one definition. Once #366 merges, instructions and skills leave that list, and updating them no longer takes creating the agent again.

Stacked on #359. Review the last commit only, and this retargets to main once #359 merges.

Try it

Comment /agentctl-experimental for an installable build. On a home of its own:

agentctl --home ~/.agent-try setup
  • Set up a team's agent from a local folder, such as a checkout of Altinn's agents/minimal.
  • Change its instructions.md, or a value in its manifest, and run setup again. Pick the agent, then "Update it from where it came from".
  • Change its image. Setup names the change and offers to create the agent again.

Clean up with agentctl --home ~/.agent-try delete agent/<name> and rm -rf ~/agents/<name>.

🤖 Generated with Claude Code

An agent in ~/agents could be connected, signed in or replaced, and
replacing deletes its disk. So an improvement to its definition, in a
team's repository or in a folder the agent edits itself, had no way in
short of starting over.

Setup now records where it made an agent from, and offers to update it
from there (`--action update`). The update fetches the definition again
and keeps what setup's questions decided: name, size, default harness,
mounts, GitHub access and an image built here. It reuses the `.env`,
lists the files that change, and applies the result in place.

agentd cannot change some fields of an existing agent, such as its
image or the list of skills it reads. When an update changes one, setup
names it and offers to create the agent again, as replacing does; a
script must pass `--replace`. Those rules now live on `Spec`, so agentd
and setup share one definition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1647f55e-5e4a-4294-9dfc-4b4ae7c99869

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@elsand
elsand added this pull request to stack #369 October 29, 2026 21:49
let mut kept = current.spec.sandbox.mounts.clone();
for mount in &mut spec.sandbox.mounts {
if let Some(index) = kept.iter().position(|current| target(current) == target(mount)) {
*mount = kept.remove(index);
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.

2 participants