Skip to content

Comments

fix: check top-level instruction field for agent .md file instructions#55

Merged
bkrabach merged 1 commit intomainfrom
fix/agent-instruction-loading
Jan 21, 2026
Merged

fix: check top-level instruction field for agent .md file instructions#55
bkrabach merged 1 commit intomainfrom
fix/agent-instruction-loading

Conversation

@bkrabach
Copy link
Collaborator

Summary

Companion fix to amplifier-foundation PR that ensures agent instructions from .md files are properly used when spawning agent sessions.

Problem

The session spawner was only checking agent_config.get("system", {}).get("instruction") for the agent's system instruction. However, when agent instructions come from the markdown body of agent .md files, they are now exposed at the top level as instruction (after the foundation fix).

Solution

Updated session_spawner.py to check for instruction at the top level first, then fall back to the nested system.instruction path:

system_instruction = agent_config.get("instruction") or agent_config.get(
    "system", {}
).get("instruction")

Related

Companion fix to amplifier-foundation change. The session spawner now checks
for instruction at the top level (from agent .md file body) first, then falls
back to the nested system.instruction path.

This ensures agent instructions from .md files are properly injected into
spawned agent sessions.
@bkrabach bkrabach merged commit 0d542b8 into main Jan 21, 2026
1 check passed
@bkrabach bkrabach deleted the fix/agent-instruction-loading branch January 21, 2026 23:44
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