Skip to content

AssertionError: Application is already running. #78

@josuf107

Description

@josuf107

Issue

Aider version: 0.88.3
Python version: 3.12.11
Platform: macOS-15.6.1-arm64-arm-64bit
Python implementation: CPython
Virtual environment: Yes
OS: Darwin 24.6.0 (64bit)
Git version: git version 2.39.5 (Apple Git-154)

An uncaught exception occurred:

Traceback (most recent call last):
  File "aider-ce", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 474, in main
    return asyncio.run(main_async(argv, input, output, force_git_root, return_coder))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "runners.py", line 195, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_events.py", line 691, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "main.py", line 1212, in main_async
    await coder.run()
  File "base_coder.py", line 1065, in run
    return await self._run_patched(with_message, preproc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 1132, in _run_patched
    await processing_task
  File "base_coder.py", line 1172, in _processing_logic
    await self.run_one(user_message, preproc)
  File "base_coder.py", line 1228, in run_one
    async for _ in self.send_message(message):
  File "base_coder.py", line 1943, in send_message
    add_rel_files_message = await self.check_for_file_mentions(content)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 2565, in check_for_file_mentions
    if await self.io.confirm_ask(
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "io.py", line 84, in wrapper
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "io.py", line 1023, in confirm_ask
    return await asyncio.create_task(self._confirm_ask(*args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "io.py", line 1129, in _confirm_ask
    res = await prompt_task
          ^^^^^^^^^^^^^^^^^
  File "prompt.py", line 1252, in prompt_async
    return await self.app.run_async(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "application.py", line 651, in run_async
    assert not self._is_running, "Application is already running."
           ^^^^^^^^^^^^^^^^^^^^
AssertionError: Application is already running.

This occurred while adding files to chat I think. Last couple messages from history:

To answer your questions, please **add these files to the chat**:

1. **`src/sa/payment_sources.rs`** - to see the full implementation
2. **`src/sa/mod.rs`** - to see what other statement account commands exist
3. Any files that define **`CliOutputFormat`** - likely in `src/cli_utils.rs` or a related module
4. Any files that might contain table formatting logic - possibly in the `cli_utils` or a display/formatting module

This will help me trace:
- Where the JSON serialization happens for statement accounts
- How table columns are defined and aligned
- What data structures are being formatted

> Tokens: 1.2k sent, 225 received.  
> src/cli_utils.rs  
> Unable to complete ask: Application is already running.  

#### y  
> Aider v0.88.3  
> Main model: openai/claude-sonnet-4.5 with whole edit format  
> Weak model: openai/gpt-5-mini  
> Git repo: .git with 118 files  
> Repo-map: using 1024 tokens, auto refresh  

I need you to add the files to the chat. You've acknowledged with "y" but I don't see the file contents yet.

Please add these files to the chat so I can examine them:

1. `src/sa/payment_sources.rs` (full file)
2. `src/sa/mod.rs` 
3. `src/cli_utils.rs` (full file, not just the summary)
4. Any other files that define `CliOutputFormat` or table formatting logic

Once you add them, I'll be able to find where the statement account JSON is generated and how the table view columns are aligned.

> Tokens: 2.1k sent, 126 received.  
> src/cli_utils.rs

Version and model info

My config:

% cat ~/.aider.conf.yml 
openai-api-base: https://api.githubcopilot.com
openai-api-key:  "*****"
model: openai/claude-sonnet-4.5
weak-model: openai/gpt-5-mini
show-model-warnings: false
watch-files: true
gitignore: false
read: [CLAUDE.md]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions