diff --git a/scripts/l3b_agent_stub.py b/scripts/l3b_agent_stub.py index 7eda0b3..bf1c93f 100755 --- a/scripts/l3b_agent_stub.py +++ b/scripts/l3b_agent_stub.py @@ -62,11 +62,12 @@ def render_contract(stack: str) -> str: ) -def read_issue_body(argv: list) -> str: - """Read issue body from argv[1] or stdin. Empty -> error.""" - if len(argv) >= 2 and argv[1].strip(): - return argv[1] - # Fall back to stdin if argv[1] is absent or empty. +def read_issue_body(args: list) -> str: + """Read issue body from args[0] (already-stripped argv, no script name) + or stdin. Empty -> error.""" + if len(args) >= 1 and args[0].strip(): + return args[0] + # Fall back to stdin if argv body is absent or empty. if not sys.stdin.isatty(): data = sys.stdin.read() if data.strip():