Skip to content

AttributeError: 'TUI' object has no attribute 'status_bar' in show_error #543

Closed

Description

@szmania

Bug Description

An AttributeError occurs in cecli.tui.app.py when show_error is called, because the TUI object does not have a status_bar attribute.

Traceback

Starting cecli TUI...
╭─────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────────╮
│ C:\Users\PDitty\AppData\Roaming\uv\tools\cecli-dev\Lib\site-packages\cecli\tui\app.py:813 in on_input_area_submit                                                                │
│                                                                                                                                                                                  │
│    810 │   │   │   │   │   │   │   break                                                                                                                                         │
│    811 │   │   │                                                                                                                                                                 │
│    812 │   │   │   if target_uuid is None:                                                                                                                                       │
│ ❱  813 │   │   │   │   self.show_error(f"Agent '{agent_name}' not found.")                                                                                                       │
│    814 │   │   │   │   return                                                                                                                                                    │
│    815 │   │   │                                                                                                                                                                 │
│    816 │   │   │   if target_uuid != primary_uuid and target_uuid not in self._sub_agent_contai                                                                                  │
│                                                                                                                                                                                  │
│ ╭─────────────────────────────────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────────────────────────────────╮ │
│ │    agent_name = 'en'                                                                                                                                                         │ │
│ │ agent_service = <cecli.helpers.agents.service.AgentService object at 0x00000129E40CC980>                                                                                     │ │
│ │          info = SubAgentInfo(                                                                                                                                                │ │
│ │                 │   name='engineering_manager',                                                                                                                              │ │
│ │                 │   coder=<cecli.coders.sub_agent_coder.SubAgentCoder object at 0x00000129E5AC63F0>,                                                                         │ │
│ │                 │   parent_uuid='267b99c5-d9f5-4d2d-8341-0df81a785739',                                                                                                      │ │
│ │                 │   status=<SubAgentStatus.RUNNING: 'running'>,                                                                                                              │ │
│ │                 │   summary=None,                                                                                                                                            │ │
│ │                 │   error=None,                                                                                                                                              │ │
│ │                 │   generate_task=<Task pending name='Task-18514' coro=<AgentService.start_generate_task.<locals>._run_generate() running at                                 │ │
│ │                 C:\Users\PDitty\AppData\Roaming\uv\tools\cecli-dev\Lib\site-packages\cecli\helpers\agents\service.py:568> wait_for=<Future pending cb=[Task.task_wakeup()]>  │ │
│ │                 cb=[AgentService.start_generate_task.<locals>.<lambda>() at                                                                                                  │ │
│ │                 C:\Users\PDitty\AppData\Roaming\uv\tools\cecli-dev\Lib\site-packages\cecli\helpers\agents\service.py:598]>,                                                  │ │
│ │                 │   auto_reap=True                                                                                                                                           │ │
│ │                 )                                                                                                                                                            │ │
│ │    input_area = InputArea(id='input')                                                                                                                                        │ │
│ │       message = Submit()                                                                                                                                                     │ │
│ │         parts = ['/switch-agent', 'en']                                                                                                                                      │ │
│ │  primary_uuid = '267b99c5-d9f5-4d2d-8341-0df81a785739'                                                                                                                       │ │
│ │          self = TUI(title='TUI', classes={'-dark-mode'}, pseudo_classes={'dark', 'focus'})                                                                                   │ │
│ │      stripped = '/switch-agent en'                                                                                                                                           │ │
│ │   target_uuid = None                                                                                                                                                         │ │
│ │    user_input = '/switch-agent en'                                                                                                                                           │ │
│ │          uuid = 'b978fe86-f6b0-41a2-8eef-093b9d4cab5d'                                                                                                                       │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                                                                                                  │
│ C:\Users\PDitty\AppData\Roaming\uv\tools\cecli-dev\Lib\site-packages\cecli\tui\app.py:725 in show_error                                                                          │
│                                                                                                                                                                                  │
│    722 │                                                                                                                                                                         │
│    723 │   def show_error(self, message, agent_name: str | None = None):                                                                                                         │
│    724 │   │   """Show an error message in the status bar."""                                                                                                                    │
│ ❱  725 │   │   self.status_bar.show_notification(                                                                                                                                │
│    726 │   │   │   message, severity="error", timeout=5, agent_name=agent_name                                                                                                   │
│    727 │   │   )                                                                                                                                                                 │
│    728                                                                                                                                                                           │
│                                                                                                                                                                                  │
│ ╭──────────────────────────────────────── locals ─────────────────────────────────────────╮                                                                                      │
│ │ agent_name = None                                                                       │                                                                                      │
│ │    message = "Agent 'en' not found."                                                    │                                                                                      │
│ │       self = TUI(title='TUI', classes={'-dark-mode'}, pseudo_classes={'dark', 'focus'}) │                                                                                      │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────╯                                                                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'TUI' object has no attribute 'status_bar'

Activity

  1. moved this from Backlog to In progress in cecli-devon Jun 1, 2026
  2. szmania commented on Jun 2, 2026

    @szmania
    Author

    This issue is now in review, associated with PR #546.

  3. moved this from In progress to Done in cecli-devon Jun 2, 2026
  4. closed this as completedby moving to Done in cecli-devon Jun 2, 2026
  5. added a commit that references this issue on Jun 2, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions