Skip to content

Bug: -n flag ignored when prompt contains special characters #87

@that-github-user

Description

@that-github-user

Summary

When running thinktank run "$PROMPT" -n 5, the -n 5 flag was ignored and only 3 agents (the default) were spawned. The prompt was loaded from a file via PROMPT=$(cat .thinktank/prompt.txt).

Suspected cause

The prompt text likely contains characters that confuse commander's argument parser. When the prompt string expands, it may contain sequences that look like flags or consume the -n argument.

Steps to reproduce

echo "Some long prompt with special chars" > .thinktank/prompt.txt
PROMPT=$(cat .thinktank/prompt.txt)
npx tsx src/cli.ts run "$PROMPT" -n 5 -t "npm test"
# Expected: 5 agents
# Actual: 3 agents (default)

Proposed investigation

  1. Check if newlines in the prompt break commander's parsing
  2. Check if -n inside the prompt text is consumed as the flag
  3. Consider requiring quotes around the prompt argument or using stdin

Acceptance criteria

  • Root cause identified
  • -n 5 respected regardless of prompt content
  • Test case for prompts with special characters

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions