diff --git a/agent/loop.go b/agent/loop.go
index 4e72d0e..a64a137 100644
--- a/agent/loop.go
+++ b/agent/loop.go
@@ -341,7 +341,7 @@ func run(ctx context.Context, cfg agentConfig, state state) error {
result = "error: tool execution interrupted by user"
if cfg.PopInject != nil {
if injected := cfg.PopInject(); injected != "" {
- result += "\n```\n\n\n" + injected + "\n\n```\n"
+ result += "\n\n\n" + injected + "\n"
}
}
emit(cfg, Event{Role: "tool", Name: tc.Name, Content: result, OutputFormat: toolOutputFormat(cfg, tc.Name)})
@@ -377,11 +377,7 @@ func run(ctx context.Context, cfg agentConfig, state state) error {
}
if cfg.PopInject != nil {
if injected := cfg.PopInject(); injected != "" {
- fmt := toolOutputFormat(cfg, tc.Name)
- if fmt != "" {
- fmt = " " + fmt
- }
- suffix += "\n```\n\n\n" + injected + "\n\n```" + fmt + "\n"
+ suffix += "\n\n\n" + injected + "\n"
}
}
result += suffix