feat(agent-runner): SC-4 resolve system prompt from DB at dispatch #641
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!641
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/626"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replace
config.system_prompt_template(in-memory agents.json) withresolveSystemPrompt(agentScope)so operator edits at any scope (instance/agent_type/global) take effect on the next dispatch without a service restart. Falls back to the WorkerConfig value when the DB has no rows.Test plan
agent-runner.test.ts: instance-scopesystem_promptrow overrides agent_type row at dispatch — verifies the DB ladder is consulted via the rendered prompt.builtin-sync.test.ts: drift detection re-syncs the builtinsystem_promptrow while preserving an existingagent_typeoverride.Closes #626
DB-first resolution with
config.system_prompt_templatefallback is correct. All three ACs covered by tests; CI green.