Skip to content

Capture command output and user responses in agent actions#2

Merged
DylanBlakemore merged 2 commits intomainfrom
feat/capture-agent-output
Apr 3, 2026
Merged

Capture command output and user responses in agent actions#2
DylanBlakemore merged 2 commits intomainfrom
feat/capture-agent-output

Conversation

@DylanBlakemore
Copy link
Copy Markdown
Collaborator

Summary

  • Add Output field to AppliedActionResult to capture stdout/stderr from commands, file read results, and user responses
  • Change ToolRunner.RunCommand signature from error to (string, error) to surface command output
  • Feed captured output back into LLM context (truncated to 4KB) so the agent can reason about results across rounds

Details

The agent previously discarded stdout from successful commands and silently no-op'd ask_user prompts, which meant it couldn't reason about what actually happened during execution. This change threads output through every action type — run_command returns stdout on success and stderr on failure, list_files and read_files capture their results, and ask_user now prompts the user and stores their response. The formatApplyResults function in the setup command includes this output (truncated to 4KB) when building context for subsequent LLM rounds, enabling the agent to make informed decisions based on prior results.

This is Section 1 of the agent setup improvements plan (docs/AGENT_SETUP_IMPROVEMENTS.md).

@DylanBlakemore DylanBlakemore merged commit b34a48c into main Apr 3, 2026
7 checks passed
@DylanBlakemore DylanBlakemore deleted the feat/capture-agent-output branch April 3, 2026 09:34
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