Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion src/coding_agent_telegram/agent_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,9 @@ def _claude_base(
"--output-format",
"stream-json",
"--verbose",
f"--print={self.PROMPT_PREFIX}{user_message}",
"-p",
"--",
f"{self.PROMPT_PREFIX}{user_message}",
]
)
return args
Expand Down
10 changes: 7 additions & 3 deletions tests/test_agent_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,9 @@ def test_claude_runner_uses_print_mode_shape(monkeypatch):
"--output-format",
"stream-json",
"--verbose",
f"--print={runner.PROMPT_PREFIX}hello",
"-p",
"--",
f"{runner.PROMPT_PREFIX}hello",
]
assert calls[0][1] == Path("/tmp/project")
assert result.success is True
Expand Down Expand Up @@ -730,7 +732,7 @@ def test_claude_runner_isolates_hyphen_prefixed_message(monkeypatch):

runner.create_session("claude", Path("/tmp/project"), "- pls fix A")

assert calls[0][0][-1] == "--print=- pls fix A"
assert calls[0][0][-2:] == ["--", "- pls fix A"]


def test_claude_runner_passes_model_and_tool_flags_when_configured(monkeypatch):
Expand Down Expand Up @@ -763,7 +765,9 @@ def test_claude_runner_passes_model_and_tool_flags_when_configured(monkeypatch):
"--output-format",
"stream-json",
"--verbose",
f"--print={runner.PROMPT_PREFIX}hello",
"-p",
"--",
f"{runner.PROMPT_PREFIX}hello",
]


Expand Down
Loading