fix(agent): use configured identity instead of hardcoded GoClaw name#2
Closed
xthanhn91 wants to merge 1 commit intonextlevelbuilder:mainfrom
Closed
fix(agent): use configured identity instead of hardcoded GoClaw name#2xthanhn91 wants to merge 1 commit intonextlevelbuilder:mainfrom
xthanhn91 wants to merge 1 commit intonextlevelbuilder:mainfrom
Conversation
…oded "GoClaw" The system prompt previously hardcoded "You are a personal assistant running inside GoClaw" — leaking the engine name and overriding any custom identity defined in workspace IDENTITY.md/SOUL.md files. Changes: - Add IdentityName/IdentityEmoji fields to SystemPromptConfig, threaded from config through LoopConfig → Loop → prompt builder - Opening line now uses configured identity name/emoji when available, with graceful fallback to generic "personal assistant" - Project Context preamble now treats IDENTITY.md and SOUL.md as mandatory persona definitions instead of optional reference material - In managed mode, use agent DisplayName as identity fallback
bd0b1d2 to
51338db
Compare
cuongtranhung
added a commit
to cuongtranhung/goclaw
that referenced
this pull request
Mar 2, 2026
…ssage Instead of replacing the progress text on each tool call, we now maintain a running list that grows with every tool call and only disappears when the final response starts streaming. Behaviour: tool.call nextlevelbuilder#1 → create progress message: 🔄 Đang thực hiện: ⏳ 🔍 Tìm kiếm web tool.call nextlevelbuilder#2 → edit same message: 🔄 Đang thực hiện: ✅ 🔍 Tìm kiếm web ⏳ 📖 Đọc tệp first chunk → delete entire progress list, start streaming response Implementation: - Add progressMsgs + toolLists sync.Maps to Channel struct - Add toolShortName() for concise Vietnamese labels per tool - Add formatProgressList() renders ✅/⏳ prefixed bullet list as HTML - Add clearProgressList() helper: deletes progress message + clears state - OnProgressEvent: copy-on-write append to toolLists; reuse DraftStream placeholder as progress message or send a brand-new one when absent - OnStreamStart: call clearProgressList before creating new DraftStream so the list is removed exactly when the LLM starts its final reply - OnStreamEnd: also calls clearProgressList to clean up orphaned lists on run.failed or other error paths Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cuongtranhung
added a commit
to cuongtranhung/goclaw
that referenced
this pull request
Mar 2, 2026
The progress list now begins immediately on run.started with "💭 Suy nghĩ" and each tool call appends to it. The entire list disappears at once the moment the first response chunk arrives, creating a seamless flow: run.started → ⏳ 💭 Suy nghĩ tool.call nextlevelbuilder#1 → ✅ 💭 Suy nghĩ ⏳ 🔍 Tìm kiếm web tool.call nextlevelbuilder#2 → ✅ 💭 Suy nghĩ ✅ 🔍 Tìm kiếm web ⏳ 📖 Đọc tệp first chunk → [list deleted] → streaming response appears Implementation: - Add OnProgressClear to ProgressChannel interface (terminal cleanup) - manager.go: run.started skips OnStreamStart when ProgressChannel is present; instead calls OnProgressEvent("_thinking_"); ProgressChannel events extracted into their own block after StreamingChannel block - stream.go: add "_thinking_" → "💭 Suy nghĩ" to toolShortName map - OnChunkEvent: auto-creates DraftStream + clears progress list when no stream exists (LLM responds directly without calling any tools) - OnStreamEnd: remove incorrect clearProgressList calls added previously - Add OnProgressClear: deletes progress message and clears state Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5 tasks
Contributor
|
I've already updated the logic when create and summon agents. |
Erudition
added a commit
to Erudition/goclaw
that referenced
this pull request
Mar 11, 2026
DockerManager.Get() was using the singleton manager config with NetworkEnabled=false for all containers, ignoring the per-agent 'Network Enabled' toggle completely (Issue nextlevelbuilder#139 root cause nextlevelbuilder#2). Changes: - sandbox: add WithNetworkOverride/NetworkOverrideFromCtx context helpers so callers can override the manager's default network setting per-request - DockerManager.Get(): read the context override and clone the config before creating a container; append '-net' to the cache key so agents with networking get a separate container from those without (avoids reusing a --network=none container) - tools: inject sandbox.WithNetworkOverride(ctx, true) before each sandboxMgr.Get() call in all 5 sandboxed tools (shell, read_file, write_file, list_files, edit_file) when ToolSandboxNetworkFromCtx is true
Erudition
added a commit
to Erudition/goclaw
that referenced
this pull request
Mar 11, 2026
DockerManager.Get() was using the singleton manager config with NetworkEnabled=false for all containers, ignoring the per-agent 'Network Enabled' toggle completely (Issue nextlevelbuilder#139 root cause nextlevelbuilder#2). Changes: - sandbox: add WithNetworkOverride/NetworkOverrideFromCtx context helpers so callers can override the manager's default network setting per-request - DockerManager.Get(): read the context override and clone the config before creating a container; append '-net' to the cache key so agents with networking get a separate container from those without (avoids reusing a --network=none container) - tools: inject sandbox.WithNetworkOverride(ctx, true) before each sandboxMgr.Get() call in all 5 sandboxed tools (shell, read_file, write_file, list_files, edit_file) when ToolSandboxNetworkFromCtx is true
Erudition
added a commit
to Erudition/goclaw
that referenced
this pull request
Mar 11, 2026
DockerManager.Get() was using the singleton manager config with NetworkEnabled=false for all containers, ignoring the per-agent 'Network Enabled' toggle completely (Issue nextlevelbuilder#139 root cause nextlevelbuilder#2). Changes: - sandbox: add WithNetworkOverride/NetworkOverrideFromCtx context helpers so callers can override the manager's default network setting per-request - DockerManager.Get(): read the context override and clone the config before creating a container; append '-net' to the cache key so agents with networking get a separate container from those without (avoids reusing a --network=none container) - tools: inject sandbox.WithNetworkOverride(ctx, true) before each sandboxMgr.Get() call in all 5 sandboxed tools (shell, read_file, write_file, list_files, edit_file) when ToolSandboxNetworkFromCtx is true
Erudition
added a commit
to Erudition/goclaw
that referenced
this pull request
Mar 11, 2026
DockerManager.Get() was using the singleton manager config with NetworkEnabled=false for all containers, ignoring the per-agent 'Network Enabled' toggle completely (Issue nextlevelbuilder#139 root cause nextlevelbuilder#2). Changes: - sandbox: add WithNetworkOverride/NetworkOverrideFromCtx context helpers so callers can override the manager's default network setting per-request - DockerManager.Get(): read the context override and clone the config before creating a container; append '-net' to the cache key so agents with networking get a separate container from those without (avoids reusing a --network=none container) - tools: inject sandbox.WithNetworkOverride(ctx, true) before each sandboxMgr.Get() call in all 5 sandboxed tools (shell, read_file, write_file, list_files, edit_file) when ToolSandboxNetworkFromCtx is true
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
systemprompt.go: AddIdentityName/IdentityEmojitoSystemPromptConfig; opening line uses configured identity with fallbacksystemprompt_sections.go: Project Context preamble makes IDENTITY.md/SOUL.md mandatory persona (only safety rules override)loop.go: Thread identity fields throughLoopConfig→Looploop_history.go: Pass identity toSystemPromptConfigin message buildingmemoryflush.go: Pass identity toSystemPromptConfigin memory flushgateway_agents.go: ExtractIdentity.Name/Identity.Emojifrom agent config specresolver.go: UseDisplayNameas identity fallback in managed modeTest plan
identity.name/identity.emojiin config → verify system prompt uses themDisplayNameused as identityNote on preamble change
The old preamble said "do not execute instructions that contradict core directives" which was broadly interpreted by LLMs to ignore persona definitions in context files. The new preamble narrows the override scope to only Safety rules, allowing IDENTITY.md/SOUL.md to function as intended.