Skip to content

bug: agent behavioral bugs — response ordering, sub-agent pattern, GH token refresh #139

Description

@henry-nsheaps

What

A living bug tracking issue for known behavioral defects that need validation after related work is complete. These bugs affect all agents (Jack and Henry) and span response ordering, sub-agent usage patterns, and authentication refresh.

Checklist

  • BUG-1: GH App token expiry not refreshed mid-session — GitHub App installation tokens expire after 1 hour; agents do not refresh the token mid-session; all GitHub API calls fail silently for the remainder of the session after expiry
  • BUG-2: Response ordering — agents jump straight to work — when receiving a user message, agents should: (1) see the message, (2) understand the request, (3) respond with acknowledgment, plan, and any open questions, (4) set expectations for what will be done, (5) THEN do the work, (6) share results at the end. Currently agents often skip steps 3 and 4 and jump directly to execution
  • BUG-3: Sub-agent output must always be to a file, never returned inline — sub-agents must always be instructed to save their output to a file; returning large results inline in the conversation bloats context and causes undesired behavior / agent crashes
  • BUG-4: Sub-agent pattern must be iterative, not one-shot — the correct sub-agent workflow is: main agent sends task → sub-agent confirms understanding and exits → main agent confirms → sub-agent is resumed for the actual work; agents must NOT send a single all-in-one prompt and wait for everything to come back at once
  • BUG-5: Inconsistent cron functionality — crons created via CronCreate are not reliably set up across session restarts; the scheduled-tasks.yaml persistence mechanism may have gaps; agents report uncertainty about whether crons are active
  • BUG-6: Ralph Wiggum loop — brain/relentlessly-fix skill infinite retry — the agentic-behavior:brain and/or relentlessly-fix skills can enter a loop where the agent repeatedly retries a failing action without making progress; no circuit breaker or max-retry mechanism exists
  • BUG-7: Agents doing work as Nate — shared GitHub auth bleeds rate limits and accounting — Agents are currently using Nate's personal GitHub credentials rather than isolated GitHub App tokens. This means all API calls count against Nate's personal rate limit, contaminate his activity feed, and make it impossible to attribute which agent performed which action.

Validation Criteria

Each bug is resolved when:

  • BUG-1: Token is proactively refreshed before expiry OR on first 401 error mid-session without agent interruption
  • BUG-2: All agents consistently respond before acting; no instance of tool use appearing in transcript before an acknowledgment message in the same turn
  • BUG-3: All sub-agent invocations include explicit instruction to output to file; large inline returns are eliminated
  • BUG-4: Multi-step sub-agent workflows demonstrate the confirm-then-resume pattern; no one-shot "do everything" sub-agent calls except for genuinely atomic tasks
  • BUG-5: All crons from scheduled-tasks.yaml are active after session restart; catch-up runs fire if a scheduled time was missed during the down window
  • BUG-6: No infinite retry loops observed; circuit breaker or max-retry mechanism in place; agent self-recovers or surfaces error to handler within N attempts
  • BUG-7: Each agent (Henry, Jack, Alex) authenticates GitHub using its own isolated credential; no GitHub API calls appear in Nate's personal rate limit or activity feed

PR Plan

Individual bugs will be fixed in separate PRs:

  • BUG-1: Fix in nsheaps/ai-mktpl (update github-app:github-app-token skill or add token refresh hook)
  • BUG-2: Fix in nsheaps/ai-mktpl (agentic-behavior plugin — add rule/hook for response-before-action ordering)
  • BUG-3: Fix in nsheaps/ai-mktpl (agentic-behavior plugin — rule or sub-agent agent definition file enforcing file output)
  • BUG-4: Fix in nsheaps/ai-mktpl (agentic-behavior plugin — rule or sub-agent agent definition file enforcing iterative pattern)
  • BUG-5: Fix in nsheaps/.ai-agent-henry and nsheaps/ai-mktpl (session start hook for cron restoration)
  • BUG-6: Fix in nsheaps/ai-mktpl (agentic-behavior:brain skill and/or fix-pr:relentlessly-fix skill)
  • BUG-7: Fix in nsheaps/agents (agent harness: pass isolated GitHub App token per agent) and nsheaps/ai-mktpl (github-app plugin)

Discord Source

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp1Need to do next

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions