Skip to content

feat(harness-guard): the agent chart renders the egress note, agent.systemMessage stays the person's - #250

Merged
marians merged 4 commits into
mainfrom
feat/platform-prompt-egress-note
Oct 23, 2026
Merged

marians merged 4 commits into
mainfrom
feat/platform-prompt-egress-note

Conversation

@marians

@marians marians commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Moves the egress note out of the person's prompt. For an agent on a coding Harness, create_agent, update_agent and validate_agent now set the agent chart's agent.platformPrompt.egressNote (giantswarm/agent#109) instead of appending the note to agent.systemMessage. The chart renders the note after the prompt.

  • setEgressNote sets or clears the flag and takes a note out of agent.systemMessage: a line that is its heading and the paragraph after it, up to the next blank line, in any line endings. Text after the note is kept; previously the prompt was cut at the heading, which silently dropped that text. Leading indentation is kept.
  • Every write to an agent on a kagent Harness clears the flag and the note, not only a Harness change, so an agent whose Harness became a kagent one by another route loses it too.
  • get_agent and list_agents report a managed agent's systemMessage from its release's values, without the note. Without a prompt in the values, they report the rendered prompt without the note (the chart default). An Agent no release renders is reported as is.
  • The 20000-character cap counts the person's prompt only; a pasted note is left out of the count, and the guard no longer checks the prompt plus the note.
  • When the chart that validates the agents has no agent.platformPrompt (an installation held below 2.4.0), values are written without the flag and without the note, instead of failing validation.
  • The embedded chart is 2.4.0.

What is the effect of this change to users?

  • The Dev Portal's prompt editor no longer shows the ## Network access (set by the platform) section, so the prompt cannot be edited or deleted by accident.
  • A change to the note's wording reaches every agent with a chart release, without anyone writing to the agents.
  • A coding agent created without a prompt of its own, whose prompt was the note alone, gets the chart's default prompt (You are a helpful agent.) before the note on its next write.

Any background context you can provide?

giantswarm/giantswarm#38803

What is needed from the reviewers?

giantswarm/agent#109 is released as 2.4.0, and internal/chart/embedded/agent.tgz is the published archive (oci://gsoci.azurecr.io/charts/giantswarm/agent:2.4.0, layer sha256:24cb6c4689230b3a3375f1290f56e1576206ad859b17b66199b6f46675624b66). Agents pick 2.4.0 up through their 2.x OCIRepository before this ships, which is the safe order: without the flag, the chart replaces the note agent-manager wrote with its own.

The note pattern exists in both repositories: the chart uses it to replace a note it finds in agent.systemMessage, agent-manager to take the note it wrote itself out of values and out of prompts pasted from them. Both copies go once no values carry the note any more.

Do the docs need to be updated?

README's coding-agent section is updated.

Should this change be mentioned in the release notes?

Yes.

  • CHANGELOG.md has been updated (if it exists)

@circleci-architect

circleci-architect Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Published Helm chart agent-manager

2.16.1-r38681f99t20261023102234h14b3769
Chart agent-manager
Version 2.16.1-r38681f99t20261023102234h14b3769
OCI reference oci://gsoci.azurecr.io/charts/giantswarm/agent-manager:2.16.1-r38681f99t20261023102234h14b3769
Digest sha256:f331d3b007be4c280f8994bc32ec560793e4521df779c6103b7f7f67a09e3ef3
Registry public — gsoci.azurecr.io
Git catalog giantswarm-test-catalog (index)
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/agent-manager --version 2.16.1-r38681f99t20261023102234h14b3769

Posted by architect-orb · build 5840 · commit 14b3769 · updated in place on every push

@marians
marians force-pushed the feat/platform-prompt-egress-note branch from 5724f7b to 2dfb796 Compare October 23, 2026 10:20
@marians
marians marked this pull request as ready for review October 23, 2026 10:20
@marians
marians requested a review from a team as a code owner October 23, 2026 10:20
@marians
marians merged commit 934fe01 into main Oct 23, 2026
16 checks passed
@marians
marians deleted the feat/platform-prompt-egress-note branch October 23, 2026 10:43
teemow added a commit that referenced this pull request Oct 23, 2026
* origin/main:
  feat(harness-guard): the agent chart renders the egress note, agent.systemMessage stays the person's (#250)
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