Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(acp): pass session working_dir to on_call_tool
ACP goose/call_tool was constructing ToolCallContext with working_dir:
None, so tools that require a session cwd (e.g. summarize) always failed
with "working_dir is required". Load the session and pass its working_dir,
matching the agent dispatch path.
  • Loading branch information
Abhijay007 committed Jul 25, 2026
commit e2a61db1855dd5628f1de76812ac632e0e69ab98
15 changes: 14 additions & 1 deletion crates/goose/src/acp/server/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,20 @@ impl GooseAcpAgent {
params
};

let ctx = crate::agents::ToolCallContext::new(session_id.clone(), None, None);
let session = self
.session_manager
.get_session(session_id, false)
.await
.map_err(|_| {
agent_client_protocol::Error::resource_not_found(Some(session_id.to_string()))
.data(format!("Session not found: {}", session_id))
})?;

let ctx = crate::agents::ToolCallContext::new(
session_id.clone(),
Some(session.working_dir),
None,
);
let tool_result = agent
.extension_manager
.dispatch_tool_call(&ctx, tool_call, CancellationToken::new())
Expand Down