Skip to content

Critical bugs in person_follow mode (config parsing, lifecycle, async handling) #1592

Description

@bibi1977

🔴 Critical bugs in person_follow mode

1. Invalid escape sequences in system_prompt_base (CRASH)

File: config/unitree_go2_modes.json5

The system_prompt_base contains invalid escape sequences like:
\BEHAVIOR, \1, \SAFETY

This can cause JSON5 or runtime parsing failures.
Only \n should be escaped.


2. Duplicate config key (silent overwrite)

File: config/unitree_go2_modes.json5

The key history_length is defined twice in the same config block.
This silently overwrites values and can cause unpredictable behavior.


3. Lifecycle hook executed twice

File: config/unitree_go2_modes.json5

start_person_follow_hook is called in both on_startup and on_entry,
causing double enrollment attempts.


4. aiohttp ClientSession recreated every poll (performance / leak risk)

File: src/inputs/plugins/person_following_status.py

A new aiohttp.ClientSession() is created on every poll call.
This can lead to socket exhaustion and performance degradation.


5. Tracking status message spam to LLM

File: src/inputs/plugins/person_following_status.py

While tracking is active, status messages are sent every poll cycle,
causing excessive LLM token usage.


Suggested priority

Critical: 1–3
Medium: 4–5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions