Skip to content

Add quiet mode feature for agentic workflows#10

Merged
zyla merged 9 commits intomainfrom
quietmode
Sep 30, 2025
Merged

Add quiet mode feature for agentic workflows#10
zyla merged 9 commits intomainfrom
quietmode

Conversation

@zyla
Copy link
Collaborator

@zyla zyla commented Sep 29, 2025

Add Quiet Mode Feature for Agentic Workflows

Problem

Currently, taskrunner outputs all task stdout/stderr to the terminal in real-time, which can:

  • Confuse agents with unnecessary verbose output
  • Waste tokens in agentic workflows
  • Make it harder to focus on important information (failures)

Solution

Implements a quiet mode where task output is suppressed from terminal unless the task fails.

Behavior

  • Success case: Task output only goes to log files, no terminal output
  • Failure case: Task output is shown on terminal for debugging
  • Configurable: Enable via TASKRUNNER_QUIET=1 environment variable

Implementation

Core Changes

  • Added quietMode field to Settings with TASKRUNNER_QUIET environment parsing
  • Added quietBuffer to AppState for collecting output before decision
  • Modified outputLine function for conditional buffering vs immediate output
  • Smart buffer management: flush on failure, discard on success

Test Coverage

  • quiet-mode-success/failure: Basic single task scenarios
  • quiet-mode-nested-*: Complex nested task scenarios with targeted failure output
  • All existing tests pass, no regressions

Benefits

  • Cleaner agentic workflows: Reduces noise in agent interactions
  • Token efficiency: Less verbose output saves tokens
  • Failure visibility: Important failures still prominently displayed
  • Debug capability: Full logs always available in files
  • Backward compatible: Default behavior unchanged

Usage

TASKRUNNER_QUIET=1 taskrunner ...
# Successful builds: clean output
# Failed builds: full debugging output shown

🤖 Generated with Claude Code

zyla and others added 9 commits September 29, 2025 12:05
Documents project structure, build commands, testing workflow, and development setup for future reference.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Tests marked with `# s3` directive now skippable via SKIP_S3_TESTS=1
- Allows running 35/50 tests without S3 credentials
- Updated CLAUDE.md with usage instructions and S3 requirements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit introduces a new configuration file, settings.local.json, which defines the permissions for various Bash commands used in the Claude environment. The allowed commands include stack build, git add, git commit, stack test, find, and stack build with specific arguments. No commands are currently denied or require confirmation.
- Tests automatically skip when S3 environment variables are missing
- Clear informative messages explain test execution (e.g. "Running 35/50 tests")
- Provides guidance on enabling S3 tests when credentials are absent
- Maintains backward compatibility with SKIP_S3_TESTS=1 override
- Enables agentic workflows to use `stack test` without environment exports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Task output suppressed from terminal unless task fails
- Successful tasks: output goes only to log files (clean terminal)
- Failed tasks: full buffered output displayed for debugging
- Enabled via TASKRUNNER_QUIET=1 environment variable
- Added # quiet test directive and comprehensive test coverage
- All existing functionality preserved, no regressions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- quiet-mode-nested-success: No output when all nested tasks succeed
- quiet-mode-nested-parent-fail: Shows parent output when parent fails
- quiet-mode-nested-child-fail: Shows child output when child fails
- Validates that quiet mode works correctly in complex nested scenarios
- Each task process maintains its own buffer, only failing process shows output

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Updated CLAUDE.md to remove explicit S3 test skipping section.
- Revised testing commands in README.md for consistency and clarity.
- Expanded test structure and directives information.
- Introduced a comprehensive section on the new quiet mode feature in task output handling.
- Enhanced explanations for output behavior in quiet mode and its integration with nested tasks and exit codes in task-output-handling.md.
- Added YAML front matter with date, researcher, git commit, branch info
- Included comprehensive tags for searchability
- Enhanced task-output-handling.md with complete quiet mode documentation
- Updated Claude settings to allow additional git commands

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@zyla zyla requested review from jborkowski and kozak and removed request for jborkowski September 30, 2025 05:10
@zyla zyla merged commit c13b465 into main Sep 30, 2025
1 check passed
@zyla
Copy link
Collaborator Author

zyla commented Oct 1, 2025

Consider also respecting CLAUDE_CODE https://claude.ai/share/708a69be-535d-4078-bbcf-a2b264af7350 (and look for other agents' env variables)

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.

2 participants

Comments