hermes - 💡(How to fix) Fix [Bug]: Hermes Cronjob Tool Bug Report [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#15189Fetched 2026-04-25 06:23:58
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3commented ×1

Error Message

TypeError: create_job() got an unexpected keyword argument 'workdir'

Root Cause

Root Cause Analysis (optional)

Code Example

{"action": "create", "name": "...", "schedule": "...", "prompt": "..."}

---

TypeError: create_job() got an unexpected keyword argument 'workdir'

---

Error: create_job() got an unexpected keyword argument 'workdir'
Success: false

---

- **Debug Report:** https://paste.rs/sT8WP
- **agent.log:** https://paste.rs/1uqzN
- **gateway.log:** https://paste.rs/jNohO

---
RAW_BUFFERClick to expand / collapse

Bug Description

The cronjob tool (used by the AI agent via tool-calling) fails to create jobs due to a mismatched parameter between the tool wrapper and the backend create_job() function.

Steps to Reproduce

  1. Ask the Hermes agent to create a cron job using the cronjob tool with action=create.
  2. The agent calls:
    {"action": "create", "name": "...", "schedule": "...", "prompt": "..."}
  3. The tool wrapper automatically injects a workdir parameter into the underlying create_job() call.
  4. Backend raises:
    TypeError: create_job() got an unexpected keyword argument 'workdir'

Expected Behavior

The cronjob tool's create action should successfully create a job without throwing a TypeError, or the workdir parameter should be conditionally omitted if not explicitly provided.

Actual Behavior

The tool call fails immediately with a TypeError. The agent receives this response:

Error: create_job() got an unexpected keyword argument 'workdir'
Success: false

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

Telegram

Debug Report

- **Debug Report:** https://paste.rs/sT8WP
- **agent.log:** https://paste.rs/1uqzN
- **gateway.log:** https://paste.rs/jNohO

Operating System

MacOS

Python Version

3.12.13

Hermes Version

0.11.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

The cronjob tool's create action fails due to a mismatched workdir parameter between the tool wrapper and the backend create_job() function, which can be resolved by conditionally omitting the workdir parameter.

Guidance

  • Review the tool wrapper code to identify where the workdir parameter is being injected and consider adding a conditional check to omit it if not explicitly provided.
  • Verify the create_job() function signature to confirm it does not accept a workdir parameter and adjust the tool wrapper accordingly.
  • Check the debug reports and logs for any additional error messages or clues that may indicate a different root cause.
  • Consider modifying the create_job() function to accept a workdir parameter if it is a required field for job creation.

Example

# Tool wrapper code example
def create_job(action, name, schedule, prompt, workdir=None):
    if workdir:
        # Conditionally include workdir in the create_job call
        return backend.create_job(action, name, schedule, prompt, workdir)
    else:
        # Omit workdir if not provided
        return backend.create_job(action, name, schedule, prompt)

Notes

The provided information suggests a parameter mismatch between the tool wrapper and the backend function. However, without access to the full codebase, it's difficult to provide a definitive fix. The proposed solution assumes the workdir parameter is not required for job creation.

Recommendation

Apply workaround: Conditionally omit the workdir parameter in the tool wrapper to prevent the TypeError and allow job creation to proceed. This approach assumes the workdir parameter is not critical for job creation and can be safely omitted.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING