fix: load workspace skills before building system prompt#1
Open
fix: load workspace skills before building system prompt#1
Conversation
The [approval_policy] TOML section was silently ignored because the Rust struct maps to [approval]. This caused require_approval to fall back to the hardcoded default (["shell_exec"]). Also adds `blocked_tools` field to ManifestCapabilities. Tools listed in blocked_tools are filtered out of available_tools() for both the ToolAll and ToolInvoke capability paths, giving operators a way to deny specific tools per agent without rebuilding the allowlist. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-and-tool-blocklist
Workspace skills were loaded AFTER the system prompt was built in kernel.rs. Both streaming and non-streaming code paths had the same ordering bug. Added build_skill_summary_from_registry() and collect_prompt_context_from_registry() static methods. Reordered both paths to create workspace-aware skill snapshot before prompt construction. Also: deploy requires codesign --force --sign - after cp on macOS Sequoia. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
sidecar-apiin Rex's workspace) were never injected into agent system promptsbuild_skill_summary()andcollect_prompt_context()read from the global skill registry, which doesn't include workspace skills. The workspace skill snapshot was created after the prompt was already built_from_registry()static methods that accept the snapshot directlykernel.rshad the same bugTest plan
cargo build --workspace --lib— compiles cleancargo test --workspace— 1830+ tests pass, 0 failurescargo clippy -p openfang-kernel --all-targets -- -D warnings— zero warningsDeploy note
On macOS Sequoia (arm64),
cpinvalidates the ad-hoc code signature. After deploying:🤖 Generated with Claude Code