can1357/oh-my-pi · error · RpcCommandError
message
Error message
message
What it means
RpcCommandError raised by _raise_command, the shared helper host tools use to fail a tool invocation with a structured error payload. The exact message varies per call site (e.g. "this tool requires issue context") — it signals a precondition of the tool binding was not met.
Source
Thrown at python/robomp/src/host_tools.py:218
label_cleared = _remove_needs_info_label(bindings)
bindings.db.set_issue_state(bindings.issue_key, state)
return label_cleared
def _audit(
bindings: ToolBindings, name: str, args: Mapping[str, Any], result: Any | None = None, error: str | None = None
) -> None:
bindings.db.log_tool_call(
issue_key=bindings.issue_key,
tool=name,
args=args,
result=result if isinstance(result, Mapping) else ({"value": result} if result is not None else None),
error=error,
)
def _raise_command(message: str) -> NoReturn:
raise RpcCommandError(message, error={"message": message})
def _require_issue(bindings: ToolBindings) -> IssueInfo:
if bindings.issue is None:
_raise_command("this tool requires issue context")
return bindings.issue
def _require_release(bindings: ToolBindings) -> ReleaseToolContext:
if bindings.release is None:
_raise_command("this tool requires release context")
return bindings.release
def _git_identity_env(author_name: str, author_email: str) -> dict[str, str]:
"""Environment forcing agent git commits to use the configured bot identity."""
return {
"GIT_AUTHOR_NAME": author_name,View on GitHub (pinned to 9690622007)
Solutions
- Provide the required context (attach issue/release bindings) before invoking the tool
- Read the error `message` in the error payload — it names the missing precondition or underlying command failure
- If from bun pre-publish checks, fix the lint/typecheck/test failures reported underneath
Example fix
// before: calling issue tool with no context
await tools.execute("issue_comment", {...}) # bindings.issue is None
// after: ensure issue context, or handle
if bindings.issue is None:
raise Skip("issue tool requires issue context")
result = await tools.execute("issue_comment", {...}) Defensive patterns
Strategy: type-guard
Validate before calling
if bindings.issue is None:
raise Skip("issue context required")
issue = bindings.issue Type guard
def has_issue_context(b: ToolBindings) -> bool:
return b.issue is not None Try / catch
try:
result = await tool.execute(args)
except RpcCommandError as e:
log.warning("tool precondition failed: %s", e.message)
return fallback_result Prevention
- Check binding presence (issue/release) before invoking scoped tools
- Wire pre-publish bun checks locally (bun lint/typecheck/test) before calling release tools
- Surface the structured error.message to the operator instead of swallowing it
When it happens
Trigger: Calling a tool (execute, issue/release helpers, pre-publish bun fix/check/test) when the required binding context is absent — e.g. _require_issue fires when bindings.issue is None; bun pre-publish checks fail when the bun command fails.
Common situations: Invoking an issue-scoped tool outside an issue context (dashboard/manual call with no session issue), running release publish with failing bun lint/test/typecheck.
Related errors
- Unsupported language '{value}'. Supported: {}
- Unable to infer language from file extension: {}. Specify `l
- Invalid pattern: {err}
- Overlapping replacements detected; refine pattern to avoid a
- Computed edit range is out of bounds
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/86ea84952798251c.
Report an issue: GitHub.